“You might be interested in Merigoux et al 2021”
A Modern Compiler for the French Tax Code
Mlang:把法国所得税遗留语言重写为现代编译器
法国所得税由公共财政总局(DGFiP)用一套 1990 年设计的遗留自定义语言和编译器来计算,越来越难维护。作者重构了这套基础设施,提出开源编译工具链 Mlang:它基于逆向工程得到的形式化语义,并用 DGFiP 的私有测试集充分验证;消除了手写的 C 语言补丁,可编译到 Python,并支持多种插桩分析。DGFiP 已正式过渡到使用 Mlang 作为生产系统。
评论者把它当作「把法律条文变成可执行代码」的案例,借它讨论法律规则的可计算性、DSL,以及编译到 Python 后衍生出的 OpenFisca 等项目。
HN 书评
推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及“A recent paper on a new language for compiling those rules”
“* A Modern Compiler for the French Tax Code -- A Modern Compiler for the French Tax Code”
“The paper for the compiler references some interesting literature on the computability of legal codes.”
“Someone then decided to create an OCaml compiler that takes mlang and emits python: A Modern Compiler for the French Tax Code”
“The paper [1] gives an overview of the implementation language, mlang.”
看全部 7 条 →
“translate the tax code into python or Mlang (A Modern Compiler for the French Tax Code [LINK] [LINK] )”
- A Modern Compiler for the French Tax Code ↗wut42 · 2020-11-25 · 188 分
- A Modern Compiler for the French Tax Code ↗sebg · 2023-01-30 · 1 分
- A Modern Compiler for the French Tax Code (2021) ↗gnyeki · 2024-07-22 · 2 分