按年被提到
20202021 · 4 次2026
编程语言与编译器›类型系统与函数式语言·arXiv:2011.07966 · cs.PL

A Modern Compiler for the French Tax Code

法国税法的现代编译器
Denis Merigoux, Raphaël Monat, Jonathan Protzenko · 2020

Mlang:把法国所得税遗留语言重写为现代编译器

开始阅读 ↗PDFalphaXiv 讨论
被推荐 · 9 人首次 2020-11-25 · 最近 2024-07-22
9不同的人
9活跃月份
9讨论串
12被引(OpenAlex)

法国所得税由公共财政总局(DGFiP)用一套 1990 年设计的遗留自定义语言和编译器来计算,越来越难维护。作者重构了这套基础设施,提出开源编译工具链 Mlang:它基于逆向工程得到的形式化语义,并用 DGFiP 的私有测试集充分验证;消除了手写的 C 语言补丁,可编译到 Python,并支持多种插桩分析。DGFiP 已正式过渡到使用 Mlang 作为生产系统。

HN 为什么提它

评论者把它当作「把法律条文变成可执行代码」的案例,借它讨论法律规则的可计算性、DSL,以及编译到 Python 后衍生出的 OpenFisca 等项目。

方法难度 3 / 5约 40 分钟经得起时间
读之前最好知道
1编译器原理
2形式语义(formal semantics)
3领域特定语言(DSL)
4税法计算基础

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
推荐benrbray · 2021-03

“You might be interested in Merigoux et al 2021”

推荐 Merigoux 等人的论文,把法国税法编译成可执行代码
Templating for Lawyers原评论 ↗
引用wahern · 2020-12

“A recent paper on a new language for compiling those rules”

提到近期有篇论文用新语言来编译这些规则
To the brain, reading computer code is not the same as reading language原评论 ↗
引用paulvorobyev · 2021-05

“* A Modern Compiler for the French Tax Code -- A Modern Compiler for the French Tax Code”

把它列入参考,一种把法国税法编码为可执行代码的领域语言
Legalese – Computational Law原评论 ↗
引用wahern · 2021-10

“The paper for the compiler references some interesting literature on the computability of legal codes.”

指出该编译器论文引用了一些关于法律条文可计算性的有趣文献
Open Source Tax Software原评论 ↗
引用BiteCode_dev · 2021-10

“Someone then decided to create an OCaml compiler that takes mlang and emits python: A Modern Compiler for the French Tax Code”

指出有人据此做了把 mlang 编译成 Python 的 OCaml 编译器,进而有了 OpenFisca
Open Source Tax Software原评论 ↗
引用fsflyer · 2022-06

“The paper [1] gives an overview of the implementation language, mlang.”

指出论文概述了实现法国税法的 mlang 语言
Show HN: Calculator for US individual income tax, from 1970-present原评论 ↗
看全部 7 条 →
引用mdaniel · 2023-02

“translate the tax code into python or Mlang (A Modern Compiler for the French Tax Code [LINK] [LINK] )”

把它列为把税法翻译成 Python 或 Mlang 的编译器工作
Intuit pouring money into lobbying amid push for free government-run tax filing原评论 ↗
被提交为 story · 3 次