论文标题
法国税法的现代编译器
A Modern Compiler for the French Tax Code
论文作者
论文摘要
在法国,所得税是根据法国公共财政局(DGFIP)撰写,设计和维护的算法,从纳税人的个人收益中计算出所得税。该算法依赖于最初设计的旧式定制语言和编译器,与法国葡萄酒不同,随着时间的流逝,它的年龄不佳。由于输入语言的缺点以及编译器的技术局限性,该算法越来越难以维持,依靠临时行为和解决方法来实施税法的最新变化。能力损失和老化代码还意味着该系统不会从任何会增加对实施信心的现代编译器技术中受益。我们大修了这个基础架构,并介绍了Mlang,这是一种开源编译器工具链,其目标是替换现有的基础架构。 Mlang基于DGFIP系统的反向设计形式化,并已针对私人DGFIP测试套件进行了彻底验证。因此,Mlang具有正式的语义。消除了C中先前的手写解决方法;编译现代语言(Python);并实现各种仪器,提供有关法国所得税计算本质的深刻见解。 DGFIP现在正式过渡到Mlang的生产系统。
In France, income tax is computed from taxpayers' individual returns, using an algorithm that is authored, designed and maintained by the French Public Finances Directorate (DGFiP). This algorithm relies on a legacy custom language and compiler originally designed in 1990, which unlike French wine, did not age well with time. Owing to the shortcomings of the input language and the technical limitations of the compiler, the algorithm is proving harder and harder to maintain, relying on ad-hoc behaviors and workarounds to implement the most recent changes in tax law. Competence loss and aging code also mean that the system does not benefit from any modern compiler techniques that would increase confidence in the implementation. We overhaul this infrastructure and present Mlang, an open-source compiler toolchain whose goal is to replace the existing infrastructure. Mlang is based on a reverse-engineered formalization of the DGFiP's system, and has been thoroughly validated against the private DGFiP test suite. As such, Mlang has a formal semantics; eliminates previous handwritten workarounds in C; compiles to modern languages (Python); and enables a variety of instrumentations, providing deep insights about the essence of French income tax computation. The DGFiP is now officially transitioning to Mlang for their production system.