paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Catala: a programming language for the law

Catala:一种面向法律的编程语言
ICFP 5(ICFP)2021匹配度 2/10 · 该论文属于法律领域专用语言与编译器形式化验证,虽涉及 PL 和 F* 证明,但不涉及用户核心关注的 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,也未与 AI 交叉。引用 53 inbox
Denis Merigoux, Nicolas Chataing, Jonathan Protzenko
crossref: 2026-09-10

AI 速览

一句话:提出面向成文法的编程语言 Catala,支持一般/例外规则,并用 F* 验证编译器核心步骤,评估中发现官方实现 bug。

许多法律条文本质上是算法或决策过程,但自然语言散文易生歧义,跨页条款与例外结构使预期结果难以计算,非形式化说明还会遗漏边界情况。Catala 是专为成文法系统化翻译为可执行实现而设计的编程语言,能自然表达一般规则与例外逻辑,旨在为律师与程序员提供共同理解、编辑和演化的媒介。作者实现了 Catala 编译器,并用 F* 证明助手证明核心编译步骤的正确性;在美国联邦所得税第 121 节、法国家庭福利等法律文本上评估,并发现法国福利官方实现中的一个错误。结果表明,Catala 促进法律与技术协作,可生成构造即正确的可执行规范供软件生态复用。

问题
法律条文常以自然语言散文描述计算或决策过程,容易产生歧义、遗漏边界情况,并导致错误的官方实现。
方法
设计 Catala 编程语言,使成文法到可执行实现的翻译更系统化,并特别支持一般规则与例外逻辑;实现编译器并用 F* 证明助手验证核心编译步骤。
评估
在美国联邦所得税第 121 节和法国家庭福利等法律文本上评估 Catala,并在过程中发现法国福利官方实现中的一个 bug。
原文摘要(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, natural 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. Notably, Catala makes it natural and easy to express the general case / exceptions logic that permeates statutory law. Catala aims to bring together lawyers and programmers through a shared medium, which together they can understand, edit and evolve, bridging a gap that too 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 of the French benefits. 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. Doing so, Catala increases trust in legal institutions, and mitigates the risk of societal damage due to incorrect implementations of the law.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1138,
  title = {Catala: a programming language for the law},
  author = {Denis Merigoux and Nicolas Chataing and Jonathan Protzenko},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {5},
  number = {ICFP},
  year = {2021},
  doi = {10.1145/3473582}
}