package catala

  1. Overview
  2. Docs
Low-level language for tax code specification

Install

Dune Dependency

Authors

Maintainers

Sources

0.2.0.tar.gz
md5=4c6f725ef4d21c5ff91f60d74b454ef7
sha512=98806e03daa6f33740b80a0f78a37320fb70ebea8cb927ea8fed022673459189c32e2389ccba0fa25d93f754b0fa0128a5ee28e1bb9abefa330deb4be8cc7d95

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

Module Desugared.DependencySource

Scope dependencies computations using OCamlgraph

Sourcemodule Pos = Utils.Pos
Sourcemodule Errors = Utils.Errors

Graph declaration

Sourcemodule Vertex : sig ... end

Vertices: scope variables or subscopes.

Sourcemodule Edge : 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.

Sourcemodule ScopeDependencies : sig ... end

Module of the graph, provided by OCamlGraph

Sourcemodule TopologicalTraversal : sig ... end

Module of the topological traversal of the graph, provided by OCamlGraph

Sourcemodule SCC : sig ... end

Tarjan's stongly connected components algorithm, provided by OCamlGraph

Graph computations

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

OCaml

Innovation. Community. Security.