package catala

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

Install

Dune Dependency

Authors

Maintainers

Sources

0.5.0.tar.gz
md5=41b0317af37925b16ae7aedfddbcc8b4
sha512=f02c4e4c7d8ca92c4c2100d1dfc31c56218a8fae3760135335c9cdd10d9edbeb6eb5e407b430c095f579ce2226c3fe4c314788af5aa35c37d04e4dee5f459cb8

doc/desugared.html

Desugared representation

This representation is the second in the compilation chain (see Architecture). Its main difference with the surface representation is that the legislative text has been discarded and all the definitions of each variables have been collected in the same place rather than being scattered across the code base.

The module describing the abstract syntax tree is:

  • Desugared.Ast Abstract syntax tree of the desugared representation

Translation to the scope language

Related modules:

Before the translation to the scope language, Desugared.Dependency checks that within a scope, there is no computational circular dependency between the variables of the scope. When the dependency graph is a DAG, Desugared.Desugared_to_scope performs a topological ordering to produce an ordered list of the scope definitions compatible with the computation order. All the graph computations are done using the Ocamlgraph library.

The other important piece of work performed by Desugared.Desugared_to_scope is the construction of the default trees (see Dcalc.Ast.EDefault) from the list of prioritized rules.

OCaml

Innovation. Community. Security.