HAL will be down for maintenance from Friday, June 10 at 4pm through Monday, June 13 at 9am. More information
Skip to Main content Skip to Navigation
Preprints, Working Papers, ...

A Modern Compiler for the French Tax Code

Abstract : 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 instrumen-tations, providing deep insights about the essence of French income tax computation. The DGFiP is now officially transi-tioning to Mlang for their production system.
Document type :
Preprints, Working Papers, ...
Complete list of metadata

Cited literature [31 references]  Display  Hide  Download

Contributor : Denis Merigoux Connect in order to contact the contributor
Submitted on : Monday, November 16, 2020 - 1:57:46 PM
Last modification on : Tuesday, January 11, 2022 - 11:16:05 AM
Long-term archiving on: : Wednesday, February 17, 2021 - 6:11:43 PM


Files produced by the author(s)


  • HAL Id : hal-03002266, version 1
  • ARXIV : 2011.07966


Denis Merigoux, Raphaël Monat, Jonathan Protzenko. A Modern Compiler for the French Tax Code. 2020. ⟨hal-03002266v1⟩



Record views


Files downloads