= 768" x-on:close-sidebar="sidebar=window.innerWidth >= 768 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Scope dependencies computations using OCamlgraph
Scope variables dependency graph
Graph declaration
Vertices: scope variables or subscopes.
The vertices of the scope dependency graph are either :
- the variables of the scope ;
- the subscopes of the scope.
Indeed, during interpretation, subscopes are executed atomically.
module Vertex : sig ... end
module Edge : Graph.Sig.ORDERED_TYPE_DFT with type t = Utils.Pos.t
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 ScopeDependencies :
Graph.Sig.P with type V.t = Vertex.t and type E.label = Edge.t
Module of the graph, provided by OCamlGraph
Graph computations
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
Exceptions dependency graph
module ExceptionsDependencies :
Graph.Sig.P with type V.t = Ast.RuleName.t and type E.label = Edge.t
val build_exceptions_graph :
Ast.rule Ast.RuleMap.t ->
Ast.ScopeDef.t ->
ExceptionsDependencies.t
val check_for_exception_cycle : ExceptionsDependencies.t -> unit