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.9.0.tar.gz
md5=8f891209d18b6540df9c34b2d1a6a783
sha512=737770b87a057674bceefe77e8526720732552f51f424afcebcb6a628267eab522c4fd993caca1ae8ed7ace65a4a87e485af10c1676e51ca5939509a1b841ac2

doc/dcalc.html

Default calculus

This representation is the fourth in the compilation chain (see Architecture). Its main difference with the previous desugared representation is that scopes have been lowered into regular functions, and enums and structs have been lowered to sum and product types. The default calculus can be later compiled to a lambda calculus.

The module describing the abstract syntax tree is Dcalc.Ast. This intermediate representation corresponds to the default calculus presented in the Catala formalization.

Related modules:

  • Dcalc.Ast Abstract syntax tree of the default calculus intermediate representation

Invariants

While Dcalc is a superset of a fully-fledged simply typed lambda calculus, the Dcalc code actually generated from the previous intermediate representation obeys some strict structural invariants. Those are formalized and empirically tested in Dcalc.Invariants.

Related modules:

  • Dcalc.Invariants This file makes explicit few structural invariants of the dcalc asbtract syntax tree. Those invariants have been checked on all tests and examples of catala. The behavior of the compiler on programs that don't follow those invariant in undefined.
OCaml

Innovation. Community. Security.

On This Page
  1. Invariants