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.

Scope dependencies

module SDependencies : Graph.Sig.P with type V.t = Scopelang.Ast.ScopeName.t and type E.label = Utils.Pos.t

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

val build_program_dep_graph : Ast.program -> SDependencies.t
val check_for_cycle_in_scope : SDependencies.t -> unit
val get_scope_ordering : SDependencies.t -> Scopelang.Ast.ScopeName.t list

Type dependencies

module TVertex : sig ... end
module TVertexSet : Stdlib.Set.S with type elt = TVertex.t
module TDependencies : Graph.Sig.P with type V.t = TVertex.t and type E.label = 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 : Ast.typ Utils.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 -> TVertex.t list
OCaml

Innovation. Community. Security.