Live data from Hacker News

A Modern Compiler for the French Tax Code

arxiv.org

31–40 of 136 posts

Re: A Modern Compiler for the French Tax Code

#31
During one of those rabbit hole journeys I discovered that Dutch Tax authorities use MPS, a DSL creation language/tool by JetBrains [1]

It makes me wonder, why haven't DSLs caught up? Their claim that it allows developers spend more time implementing the business logic makes sense. But somehow that promise hasn't been realised. I'm curious to know from those who tried DSLs.

[1] https://www.jetbrains.com/mps/documentation/

Re: A Modern Compiler for the French Tax Code

#32
post #20
post #5

Here's the source code of the implementation of the tax code: https://github.com/etalab/calculette-impots-m-source-code

The languages breakdown is interesting. It seems GitHub refuses to admit defeat and categorises the .m files into various other languages which use the extension (M, MATLAB, Objective-C, Mathematica and Mercury). I wonder if they use some sort of fuzzy ML solution for categorising them rather than conventional parsing.

[deleted]

Re: A Modern Compiler for the French Tax Code

#33
post #5

Here's the source code of the implementation of the tax code: https://github.com/etalab/calculette-impots-m-source-code

I can't help but wonder what awesome things happen in "iliad" and "ocean" mode after looking at some of those files: application : pro, batch , iliad,oceans ;

Iliad means "Informatisation de L'inspection d'Assiette et de Documentation" which roughly translates to "computerisation of tax base and documentation inspection".

Re: A Modern Compiler for the French Tax Code

#34
post #33

Earlier quoted context omitted.

I can't help but wonder what awesome things happen in "iliad" and "ocean" mode after looking at some of those files: application : pro, batch , iliad,oceans ;

Iliad means "Informatisation de L'inspection d'Assiette et de Documentation" which roughly translates to "computerisation of tax base and documentation inspection".

Hi, author here :) You seem to be well-informed of the DGFiP jargon, do you know if news of my work has been spreading among the IT department there?

Re: A Modern Compiler for the French Tax Code

#36

> 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. This interesting. When it comes to legacy code we think of COBOL and FORTRAN most of the t…

In my country, with an admittedly quite simple tax code, the authorities used to publish each year official COBOL code that computed income tax. They switched to Java in 2018-ish - and to Github instead of a random FTP server. Doing your taxes has also been a no-op for many people the past decade or so. You don't do anything except read the tax report, unless you spot some mistakes or items missing in the report that…

Cool - which country? Could you link to the Github repo?

Re: A Modern Compiler for the French Tax Code

#37

> 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. This interesting. When it comes to legacy code we think of COBOL and FORTRAN most of the t…

In my country, with an admittedly quite simple tax code, the authorities used to publish each year official COBOL code that computed income tax. They switched to Java in 2018-ish - and to Github instead of a random FTP server. Doing your taxes has also been a no-op for many people the past decade or so. You don't do anything except read the tax report, unless you spot some mistakes or items missing in the report that…

That sounds amazing. Which country is it?

Re: A Modern Compiler for the French Tax Code

#38
post #35

If tax codes are so complex that authorities struggle to maintain the code that implements them, how are humans supposed to understand them well enough to follow the incentives they are designed to create?

Most people don't know about the muscles or bone structures in their hands, but most people seem to know how to use their hands anyway, despite the gross complexity involved.

Re: A Modern Compiler for the French Tax Code

#39
post #33

Earlier quoted context omitted.

Iliad means "Informatisation de L'inspection d'Assiette et de Documentation" which roughly translates to "computerisation of tax base and documentation inspection".

Hi, author here :) You seem to be well-informed of the DGFiP jargon, do you know if news of my work has been spreading among the IT department there?

Hi! Unfortunately I have no idea, I don't work there nor have any affiliation with them.

Re: A Modern Compiler for the French Tax Code

#40
I've been asked to write parser of _my_country_law_ and something that's capable of doing diffs and putting it together (diff+original=>newest version) docs without knowledge in that domain

after seeing sample doc I've estimated it on something like 1 week of work (XD)

month later I've been crying and having like 20-30% done

this shit has been so sensitive (insanely error prone) and debugging was time costly. I think I didn't spent enough time on thinking about its architecture, but on the other hand my experience was pretty small with this stuff

easy & fast to test and reliably

have solid abstraction over original documents

have solid abstraction over operation (e.g Article 5's meaning is changed)

_____________

project died because it was needed "fast" (in that time there was very specific peroid of changes in law) and we weren't getting to the viable version fast enough

Post reply on HN