Programming language for literate programming law specification
Go to file
2022-02-02 12:23:52 +01:00
.github/workflows add CI check to nix-unstable 2021-11-29 11:38:01 +01:00
.nix bump version 2021-12-01 15:57:32 +01:00
compiler clarify make_matchopt + lcalc's ast ocamlformat 2022-02-02 12:23:52 +01:00
doc Update syntax reference 2021-10-01 16:31:50 +02:00
examples Fix #161 2021-11-29 10:33:43 +01:00
french_law Merge branch 'master' into alain_default-option 2021-11-30 16:52:19 +01:00
syntax_highlighting refactor(syntax-highlighting): support the new catala-metadata markup 2021-10-01 15:52:45 +02:00
tests Merge branch 'master' into grouped_exceptions 2021-11-28 13:19:00 +01:00
.gitattributes Factorise lexer translations 2021-08-19 18:26:06 +02:00
.gitignore style: Formatting 2021-10-29 15:17:26 +02:00
.ocamlformat Switch ocamlformat to 0.19.0 2021-08-19 11:35:56 +02:00
catala.opam Bumping version numbers and fixing 0.5.0 build 2021-11-07 11:00:46 +01:00
CITATION.cff Push citation file 2021-11-08 09:26:35 +01:00
CONTRIBUTING.md refactor(parser): add the new catala-metadata markup 2021-10-01 10:01:25 +02:00
default.nix wip (compiling but can't compile catala program without internal errors) 2021-12-16 19:16:57 +01:00
Dockerfile Add a Dockerfile for builds 2021-09-23 17:08:52 +02:00
dune Big renaming and dir reorg 2021-06-21 11:39:06 +02:00
dune-project Bumping version numbers and fixing 0.5.0 build 2021-11-07 11:00:46 +01:00
french_law.opam Bumping version numbers and fixing 0.5.0 build 2021-11-07 11:00:46 +01:00
generate_website_assets.sh Building a JS version of the Catala compiler 2021-11-12 10:07:13 +01:00
INSTALL.md Merge pull request #155 from lIlIlIlIIIIlIIIllIIlIllIIllIII/feat/nix-support 2021-11-09 15:19:32 +01:00
LICENSE.txt Code reorg 2019-09-04 10:32:33 +02:00
Makefile Building a JS version of the Catala compiler 2021-11-12 10:07:13 +01:00
README.md docs(README): comestic changes 2021-11-29 12:33:56 +01:00
release.nix style: Formatting 2021-10-29 15:17:26 +02:00
shell.nix style: Formatting 2021-10-29 15:17:26 +02:00

Catala logo

Catala

Explore the docs »
View TutorialReport BugContributeJoin Zulip Chat

CI Opam Licence Tag LoC Language Issues Contributors Activity

Catala is a domain-specific language for deriving faithful-by-construction algorithms from legislative texts. To learn quickly about the language and its features, you can jump right to the official Catala tutorial. You can join the Catala community on Zulip!


Table of Contents

Concepts

Catala is a programming language adapted for socio-fiscal legislative literate programming. By annotating each line of the legislative text with its meaning in terms of code, one can derive an implementation of complex socio-fiscal mechanisms that enjoys a high level of assurance regarding the code-law faithfulness.

Concretely, you have to first gather all the laws, executive orders, previous cases, etc. that contain information about the socio-fiscal mechanism that you want to implement. Then, you can proceed to annotate the text article by article, in your favorite text editor :

Screenshot

Once your code is complete and tested, you can use the Catala compiler to produce a lawyer-readable PDF version of your implementation. The Catala language has been specially designed in collaboration with law professionals to ensure that the code can be reviewed and certified correct by the domain experts, which are in this case lawyers and not programmers.

Screenshot

The Catala language is special because its logical structure mimics the logical structure of the law. Indeed, the core concept of "definition-under-conditions" that builds on default logic has been formalized by Professor Sarah Lawsky in her article A Logic for Statutes. The Catala language is the only programming language to our knowledge that embeds default logic as a first-class feature, which is why it is the only language perfectly adapted to literate legislative programming.

Building and installation

Catala is available as an opam package! If opam is installed on your machine, simply execute:

opam install catala

To get the cutting-edge, latest version of Catala, you can also do

opam pin add catala --dev-repo

However, if you wish to get the latest developments of the compiler, you probably want to compile it from the sources of this repository or use nix. For that, see the dedicated readme.

Usage

Use catala --help to get more information about the command line options available.

The top-level Makefile contains a lot of useful targets to run. To display them, use

    make help

Examples

To explore the different programs written in Catala, see the dedicated readme.

API

To know how to use the code generated by the Catala compiler in your favorite programming language, head to the readme of the French law library

Contributing

To know how you can contribute to the project, see the dedicated readme.

Test suite

To know how to run or improve the Catala reference test suite, see the dedicated readme.

Documentation

Formal semantics

To audit the formal proof of the partial certification of the Catala compiler, see the dedicated readme.

Compiler documentation

The compiler documentation is auto-generated from its source code using dune and odoc. Use

make doc

to generate the documentation, then open the doc/odoc.html file in any browser. The documentation is also accessible online.

License

The compiler and all the code contained in this repository is released under the Apache license (version 2) unless another license is explicited for a sub-directory.

Limitations and disclaimer

Catala is a research project from Inria, the French National Research Institute for Computer Science. The compiler is yet unstable and lacks some of its features.

Pierre Catala

The language is named after Pierre Catala, a professor of law who pionneered the French legaltech by creating a computer database of law cases, Juris-Data. The research group that he led in the late 1960s, the Centre détudes et de traitement de linformation juridique (CETIJ), has also influenced the creation by state conselor Lucien Mehl of the Centre de recherches et développement en informatique juridique (CENIJ), which eventually transformed into the entity managing the LegiFrance website, acting as the public service of legislative documentation.