package catala

  1. Overview
  2. Docs

Graph representation of the dependencies between scopes in the Catala program. Vertices are functions, x -> y if x is used in the definition of y.

module Pos = Utils.Pos
module Errors = Utils.Errors
module SVertex : sig ... end
module SEdge : sig ... end

On the edges, the label is the expression responsible for the use of the function

module SDependencies : sig ... end
module STopologicalTraversal : sig ... end
module SSCC : sig ... end

Tarjan's stongly connected components algorithm, provided by OCamlGraph

val build_program_dep_graph : Ast.program -> SDependencies.t
val check_for_cycle_in_scope : SDependencies.t -> unit
val get_scope_ordering : SDependencies.t -> Ast.ScopeName.t list
module TVertex : sig ... end
module TVertexSet : sig ... end
module TEdge : sig ... end

On the edges, the label is the expression responsible for the use of the function

module TDependencies : sig ... end
module TTopologicalTraversal : sig ... end
module TSCC : sig ... end

Tarjan's stongly connected components algorithm, provided by OCamlGraph

val get_structs_or_enums_in_type : Ast.typ Pos.marked -> TVertexSet.t
val build_type_graph : Ast.struct_ctx -> Ast.enum_ctx -> TDependencies.t
val check_type_cycles : Ast.struct_ctx -> Ast.enum_ctx -> unit