Desugared.Dependency
Scope dependencies computations using OCamlgraph
Vertices: scope variables or subscopes.
The vertices of the scope dependency graph are either :
Indeed, during interpretation, subscopes are executed atomically.
module Vertex : sig ... end
On the edges, the label is the position of the expression responsible for the use of the variable. In the graph, x -> y
if x
is used in the definition of y
.
Module of the graph, provided by OCamlGraph
Returns an ordering of the scope variables and subscope compatible with the dependencies of the computation
val correct_computation_ordering : ScopeDependencies.t -> Vertex.t list
Returns an ordering of the scope variables and subscope compatible with the dependencies of the computation
val check_for_cycle : Ast.scope -> ScopeDependencies.t -> unit
Outputs an error in case of cycles.
val build_scope_dependencies : Ast.scope -> ScopeDependencies.t
Builds the dependency graph of a particular scope
module ExceptionVertex : sig ... end
val build_exceptions_graph :
Ast.rule Shared_ast.RuleName.Map.t ->
Ast.ScopeDef.t ->
ExceptionsDependencies.t
val check_for_exception_cycle :
Ast.rule Shared_ast.RuleName.Map.t ->
ExceptionsDependencies.t ->
unit