HackerPapers

arXiv:2103.03198cs.PL

Catala: A Programming Language for the Law

Denis Merigoux, Nicolas Chataing, Jonathan Protzenko

Abstract

Law at large underpins modern society, codifying and governing many aspects of citizens' daily lives. Oftentimes, law is subject to interpretation, debate and challenges throughout various courts and jurisdictions. But in some other areas, law leaves little room for interpretation, and essentially aims to rigorously describe a computation, a decision procedure or, simply said, an algorithm. Unfortunately, prose remains a woefully inadequate tool for the job. The lack of formalism leaves room for ambiguities; the structure of legal statutes, with many paragraphs and sub-sections spread across multiple pages, makes it hard to compute the intended outcome of the algorithm underlying a given text; and, as with any other piece of poorly-specified critical software, the use of informal language leaves corner cases unaddressed. We introduce Catala, a new programming language that we specifically designed to allow a straightforward and systematic translation of statutory law into an executable implementation. Catala aims to bring together lawyers and programmers through a shared medium, which together they can understand, edit and evolve, bridging a gap that often results in dramatically incorrect implementations of the law. We have implemented a compiler for Catala, and have proven the correctness of its core compilation steps using the F* proof assistant. We evaluate Catala on several legal texts that are algorithms in disguise, notably section 121 of the US federal income tax and the byzantine French family benefits; in doing so, we uncover a bug in the official implementation. We observe as a consequence of the formalization process that using Catala enables rich interactions between lawyers and programmers, leading to a greater understanding of the original legislative intent, while producing a correct-by-construction executable specification reusable by the greater software ecosystem.

arXiv comments
Journal reference
DOI
doi:10.1145/3473582
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Jul 2023 to Oct 2024. Found in 4 HN submissions from Mar 2021 to Feb 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • Or something like Catala language - https://catala-lang.org/? Catala: A Programming Language for the Law - https://arxiv.org/abs/2103.03198

      shchegrikovichView on HNParent context

    • I'll see your 'reduce complexity' and raise you "laws that compute things and have hyperlinks to other parts of the law should be written in a programming language" or even a con-lang designed for specificity. Hell, it's even called "the U.S. Code". I believe there's some…

      mdanielView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.