Live data from Hacker News

A Modern Compiler for the French Tax Code

arxiv.org

21–30 of 136 posts

Re: A Modern Compiler for the French Tax Code

#21

Translating legal texts to mathematical form is very interesting. It could decimate most legal jobs if a lawsuit can be converted to mathematical form and then 'executed' against the laws that are also in mathematical form. You get your judgement and the explanation as to how that conclusion was reached, all automatically. It could even cause headaches if contradictions in legal judgements are detected. It all relies…

Australian CSIRO is working exactly on that

https://theconversation.com/csiro-wants-our-laws-turned-into...

https://research.csiro.au/bpli/our-research/reasoning/

https://people.csiro.au/G/G/Guido-Governatori

They are using https://en.wikipedia.org/wiki/Deontic_logic and https://en.wikipedia.org/wiki/Defeasible_logic describe laws in terms closest to how it's done in the legal community.

Can't find a link but they codified some parts of the Australian import duties laws that we went through in a workshop of theirs that I had a chance to attend.

Re: A Modern Compiler for the French Tax Code

#23
post #19

Earlier quoted context omitted.

My entire industry (subset of healthcare) mostly uses a single application for 95% of our core business functions. That application is written in Visual FoxPro and is, predictably, pretty terrible. Obviously it isn't going to get better, either, but it'll be a decade or more before there's a serious competitor.

I'm not near the space any longer (in a former life, the healthcare industry was a big customer of our computer systems). But a significant portion of healthcare in the US used to use a proprietary language called MUMPS. https://en.wikipedia.org/wiki/MUMPS

Epic has been trying to move on for years, or so a recruiter told me half a decade ago. Their job posting now describes “Using leading-edge technologies and languages like JS, TS, and C#”, though I wouldn’t put a bait and switch past them.

Re: A Modern Compiler for the French Tax Code

#24

> 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 was autofilled by the government, then you can go into the web form and submit the amendments necessary.

Re: A Modern Compiler for the French Tax Code

#25

Translating legal texts to mathematical form is very interesting. It could decimate most legal jobs if a lawsuit can be converted to mathematical form and then 'executed' against the laws that are also in mathematical form. You get your judgement and the explanation as to how that conclusion was reached, all automatically. It could even cause headaches if contradictions in legal judgements are detected. It all relies…

Australian CSIRO is working exactly on that https://theconversation.com/csiro-wants-our-laws-turned-into... https://research.csiro.au/bpli/our-research/reasoning/ https://people.csiro.au/G/G/Guido-Governatori They are using https://en.wikipedia.org/wiki/Deontic_logic and https://en.wikipedia.org/wiki/Defeasible_logic describe laws in terms closest to how it's done in the legal community. Can't find a link but they co…

https://theconversation.com/csiro-wants-our-laws-turned-into... claims law-as-code is a bad idea because its "dynamic"/"always changing" and "discretionary"/"requires or open to interpretation".

The first argument is nonsensical (computers are great at changing data: in fact way faster and more accurate than humans, having the capacity for things like single source of truth, change logs, peer consensus, and dynamic versioning while preserving historic versions automatically... and also better at publishing it, analyzing it, and documenting it).

The second argument is an outright straw man fallacy. Who cares if some laws require interpretation. Just write MAY instead of WILL (like RFC language) to make it clear the judge can decide, then provide statistical information regarding past case law. Nobody is saying "fire all the judges", they're just saying make the law clear. Right now it's not clear, and it's a big problem.

Refugee? Read up to date law in your language, automatically. Business? Determine what is required by law in order to execute a transaction. Human? Determine what you are and are not allowed to do in some field (like architecture, driving, sailing, pet walking or rock collecting) without being fined.

Re: A Modern Compiler for the French Tax Code

#26
post #19

Earlier quoted context omitted.

I'm not near the space any longer (in a former life, the healthcare industry was a big customer of our computer systems). But a significant portion of healthcare in the US used to use a proprietary language called MUMPS. https://en.wikipedia.org/wiki/MUMPS

Epic has been trying to move on for years, or so a recruiter told me half a decade ago. Their job posting now describes “Using leading-edge technologies and languages like JS, TS, and C#”, though I wouldn’t put a bait and switch past them.

MEDITECH, maybe others, had a proprietary operating system too. (We had a special deal to sell them hardware without an OS at a time when they were normally bundled.) Eventually they moved on to NT.

Re: A Modern Compiler for the French Tax Code

#27
post #11

They opitimized it by removing dead code etc. So I wonder if that could be fed back into the original laws to simplilfy them.

I was rather thinking about fuzzying it to find gaps in tax laws.

In a previous job we built an advisor for banking and pensions using a mathematical optimiser solving over a model of the Danish tax rules. It would normally find enough tax savings to retire about a year earlier by finding the best savings strategies (e.g exploiting dynamic and temporal effects between taxation on spouses retiring at different times, using the house mortgage as a savings buffer to shift pension payouts to lower tax years etc). It was quite an eye opener.

Re: A Modern Compiler for the French Tax Code

#28
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.

Here you go!

https://github.com/github/linguist#how-linguist-works

Re: A Modern Compiler for the French Tax Code

#29
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 ;

Re: A Modern Compiler for the French Tax Code

#30
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.

Wonder no more! https://github.com/github/linguist/blob/7c2adbdb15d4efd25d92...

As most AI, it's regex and ifs all the way down.

Post reply on HN