Module Scopelang.Dependency

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.

Scope dependencies

type vertex =
  1. | Scope of Shared_ast.ScopeName.t * Shared_ast.ModuleName.t option
  2. | Topdef of Shared_ast.TopdefName.t
module SDependencies : Graph.Sig.P with type V.t = vertex and type E.label = Catala_utils.Pos.t

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

val build_program_dep_graph : 'm Ast.program -> SDependencies.t
val check_for_cycle_in_defs : SDependencies.t -> unit
val get_defs_ordering : SDependencies.t -> vertex list
module TDependencies : Graph.Sig.P with type V.t = Shared_ast.TypeIdent.t and type E.label = Catala_utils.Pos.t

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

val get_structs_or_enums_in_type : Shared_ast.typ -> Shared_ast.TypeIdent.Set.t
val build_type_graph : Shared_ast.struct_ctx -> Shared_ast.enum_ctx -> TDependencies.t