https://github.com/CatalaLang/catala Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Customer Stories + White papers, Ebooks, Webinars + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} CatalaLang / catala Public * Notifications * Fork 65 * Star 1.3k Programming language for literate programming law specification catala-lang.org License Apache-2.0 license 1.3k stars 65 forks Activity Star Notifications * Code * Issues 55 * Pull requests 9 * Actions * Security * Insights More * Code * Issues * Pull requests * Actions * Security * Insights CatalaLang/catala This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 26 branches 6 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/C] Use Git or checkout with SVN using the web URL. [gh repo clone Catala] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @AltGr AltGr Improvements to the Polish translation (#499) ... 3cc77f4 Sep 13, 2023 Improvements to the Polish translation (#499) 3cc77f4 Git stats * 3,510 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Remove from scripts September 13, 2023 16:16 .nix add ocolor as a dependency July 31, 2023 16:19 build_system Improvements to searching for libs at runtime (plugins, runtime, etc.) September 4, 2023 09:57 compiler Improvements to the Polish translation (#499) September 13, 2023 16:19 doc Update ocamlformat September 1, 2023 16:19 examples Improvements to the Polish translation (#499) September 13, 2023 16:19 french_law Remove catala_legifrance September 13, 2023 16:16 runtimes Reformat September 1, 2023 16:24 syntax_highlighting bugfix: address breaking change in markdown-mode v2.6 September 5, 2023 23:11 tests Temporarily disable unstable test September 13, 2023 14:23 .git-blame-ignore-revs Update reformatting commits list September 1, 2023 16:26 .gitattributes Remove generated files from git July 10, 2023 15:48 .gitignore add missing french_law/python/src/runtime.py to .gitignore September 9, 2023 21:11 .ocamlformat Update ocamlformat September 1, 2023 16:19 CITATION.cff Renaming and correct autorship July 12, 2023 11:55 CONTRIBUTING.md Replace the type conversion and rounding operators with overloads December 13, 2022 15:32 Dockerfile Update CI build August 2, 2023 12:22 INSTALL.md docs: update the generating website assets section from the INSTALL file May 7, 2023 15:13 LICENSE.txt Code reorg September 4, 2019 10:32 Makefile Remove from scripts September 13, 2023 16:16 README.md Remove catala_legifrance September 13, 2023 16:16 build_release.sh Correctly setup ocolor on all output channels June 8, 2023 12:14 catala.opam Update ocamlformat September 1, 2023 16:19 clerk.opam Clerk: replace colordiff with diff --color August 2, 2023 15:12 dune Remove from scripts September 13, 2023 16:16 dune-project Bump version to 0.8.0 March 8, 2023 18:07 flake.lock update flakes file July 31, 2023 16:24 flake.nix Update ocamlformat September 1, 2023 16:19 french_law.opam Bump version to 0.8.0 March 8, 2023 18:07 generate_website_assets.sh Remove from scripts September 13, 2023 16:16 ninja_utils.opam Bump version to 0.8.0 March 8, 2023 18:07 View code [ ] Catala Concepts Getting started Building and installation Usage Catala Plugin backends Clerk Catleg Documentation Syntax cheat sheet Formal semantics Compiler documentation Examples API Contributing Test suite License Limitations and disclaimer Pierre Catala README.md Catala logo Catala Explore the docs >> View Tutorial * Report Bug * Contribute * Join 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 * Getting started * Building and installation * Usage + Catala + Clerk * Documentation + Syntax cheat sheet + Formal semantics + Compiler documentation * Examples * API * Contributing * Test suite * License * Limitations and disclaimer * Pierre Catala 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. Getting started To get started, the best place is the tutorial of the language. A French version is also available but might be out of sync with the latest language features. Note: bleeding-edge version If you are interested in the latest development version, pre-built artifacts including binaries and API documentation can be found at https://catalalang.github.io/catala 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 Catala Use catala --help if you have installed it to get more information about the command line options available. The man page is also available online. To get the development version of the help, run make help_catala after make build. The catala binary corresponds to the Catala compiler. The top-level Makefile contains a lot of useful targets to run. To display them, use make help Plugin backends While the compiler has some builtin backends for Catala (Python, Ocaml, etc.), it is also possible to add a custom backend to the Catala compiler without having to modify its source code. This plugin solution relies on dynamic linking: see the dedicated README. Clerk Use clerk --help if you have installed it to get more information about the command line options available. To get the development version of the help, run make help_clerk after make build. The clerk binary corresponds to the Catala build system, responsible for testing among other things. To get more information about Clerk, see the dedicated readme Catleg Catleg is a command line utility providing useful integration with LegiFrance, the official repository of French legal documentation. See the decidated repository for more information. Documentation Syntax cheat sheet A complete and handy reference of the Catala syntax can be found in the cheat sheet (for French and English versions of the syntax). Formal semantics To audit the formal proof of the partial certification of the Catala compiler, see the dedicated readme. Compiler documentation The documentation is accessible online, both for the latest release and bleeding-edge version. It is otherwise generated from the compiler source code using dune and odoc. Run make doc to generate the documentation, then open the doc/odoc.html file in any browser. 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. The corresponding pre-built examples are also available. 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. 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'etudes et de traitement de l'information juridique (CETIJ), has also influenced the creation by state conselor Lucien Mehl of the Centre de recherches et developpement en informatique juridique (CENIJ), which eventually transformed into the entity managing the LegiFrance website, acting as the public service of legislative documentation. About Programming language for literate programming law specification catala-lang.org Topics programming-language legislative-texts Resources Readme License Apache-2.0 license Activity Stars 1.3k stars Watchers 22 watching Forks 65 forks Report repository Releases 4 v0.8.0 Latest Mar 9, 2023 + 3 releases Used by 2 * @CatalaLang @CatalaLang / catala-explain * @CatalaLang @CatalaLang / catala-dsfr * @CatalaLang @CatalaLang / catala-website Contributors 39 * @denismerigoux * @AltGr * @EmileRolley * @adelaett * @R1kM * @Lilyaslm * @rprimet * @wozniakpl * @jemsab * @rmonat * @Numero7 + 28 contributors Languages * OCaml 88.3% * Python 6.4% * JavaScript 1.4% * Makefile 1.0% * Vim Script 0.7% * R 0.6% * Other 1.6% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.