package catala

  1. Overview
  2. Docs
Compiler and library for the literate programming language for tax code specification

Install

dune-project
 Dependency

Authors

Maintainers

Sources

1.0.0-beta.tar.gz
md5=c41cbc1fa003e167bbc0bb1cd7723ab3
sha512=1e07951e2d73040bc0bea89f04bcb50c3a533323a7c7d8bac9ee9aa6be5233f795a32857421d04f17e52a841057cdc78b33f79fa239a17dd12de97a738c81999

doc/catala.desugared/Desugared/Dependency/index.html

Module Desugared.DependencySource

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.

Sourcemodule 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

Graph computations

Returns an ordering of the scope variables and subscope compatible with the dependencies of the computation

Sourceval correct_computation_ordering : ScopeDependencies.t -> Vertex.t list

Returns an ordering of the scope variables and subscope compatible with the dependencies of the computation

Sourceval check_for_cycle : Ast.scope -> ScopeDependencies.t -> unit

Outputs an error in case of cycles.

Sourceval build_scope_dependencies : Ast.scope -> ScopeDependencies.t

Builds the dependency graph of a particular scope

Sourceval scope_dependencies_to_json : ScopeDependencies.t -> Yojson.Safe.t

Exceptions dependency graph

Sourcemodule ExceptionVertex : sig ... end
Sourceval check_for_exception_cycle : Ast.rule Shared_ast.RuleName.Map.t -> ExceptionsDependencies.t -> unit