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 feel like legislation is a field that would benefit a great deal from the progress that software engineering has made in a number of fields. It's already evolved somewhat into a DSL. With some nudging and technical leadership, I suspect that we could move it over entirely into a format that can be readily parsed, tested, and version control. The tax code is especially well-suited to this, because it's a lot of rule…
A Modern Compiler for the French Tax Code
91–100 of 136 posts
Re: A Modern Compiler for the French Tax Code
#92> 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…
Ed: ah, same country https://news.ycombinator.com/item?id=25210009
A little unfortunate that we threw it out.
Re: A Modern Compiler for the French Tax Code
#93Earlier quoted context omitted.
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 v…
> 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. But that is not how law works. A ju…
Re: A Modern Compiler for the French Tax Code
#94Earlier quoted context omitted.
I feel like legislation is a field that would benefit a great deal from the progress that software engineering has made in a number of fields. It's already evolved somewhat into a DSL. With some nudging and technical leadership, I suspect that we could move it over entirely into a format that can be readily parsed, tested, and version control. The tax code is especially well-suited to this, because it's a lot of rule…
It would be more valuable to write many fewer, simpler policies, but transparently document the why when it comes to decisions by stakeholders. For example, the only difference between getting something from the government (say, a California Public Records request) and a court is (1) cost and (2) the court almost always has to write a defensible opinion for why something happened some way, but a government agency doe…
That's not true. Agencies that do rulemaking have to provide justification for why they're enacting or repealing particular regulations, otherwise those regulations can be struck down as capricious. This is a major problem the Trump administration had: a lot of their attempts to rollback Obama's policies or enact new ones foundered on the ability to provide this justification.
Re: A Modern Compiler for the French Tax Code
#95Earlier quoted context omitted.
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 v…
> law-as-code is a bad idea because its "dynamic"/"always changing" I don't think it was meant in classical terms of an SQL UPDATE. It was meant in a way that a new rule may affect the application of an existing rule. Academically speaking, it makes reasoning non-monotonic. This is exactly why https://en.wikipedia.org/wiki/Defeasible_logic is proposed. > The second argument is an outright straw man fallacy. I think t…
You cannot completely successfully codify something that is based on the vagaries of wishy-washy language, nor specific legal concepts like the intent of regulations or the context of prior judgements. Therefore, improve the language: don't give up!
Imagine if latitude and longitude weren't invented because "sorta over there a few days sail beyond the cape" was too hard to quantify. This is the same ridiculous argument. It just so happens that there are also a vast number of ingratiated rent seeking and powerful people and corporations interested in the status quo: literally all of them.
I believe that as engineers and as optimists within the greater human endeavour, over time in all fields we should seek to create means of trust and means of precision: in our measurements, in our communications, in our analyses, in our references and in our collaborations.
We don't need to fire all the judges. But maybe 90% of the solicitors and standard procedural lawyers, a large part of whose job is explaining to the average citizen what exactly is the done thing in some particular area or how exactly they can expect to be treated the hands of a system that cannot otherwise explain itself.
Also, in terms of community governance if it becomes crystal clear that a law is being abused through increased fidelity in the logging of police actions brought about by such a system, then the law can more rapidly be identified and repealed.
Re: A Modern Compiler for the French Tax Code
#96Earlier quoted context omitted.
How can you tell? All "Languages" I get is "Java 100.0%".
The COBOL part is from memory. I'll have a look to see if I can find a copy floating around somewhere. Edit: the transition appears to be more like 2016, and one of the commits then refers to a file generated from COBOL: https://github.com/Skatteetaten/trekktabell/commit/5181d86c5...
> IDENTIFICATION DIVISION. PROGRAM-ID. FT7P200T. AUTHOR. PER J. RISTUN. DATE-WRITTEN. NOVEMBER 1993 ---------------------------------------------------------------- * BESKRIVELSE : PROGRAMMET BEREGNER FORSKUDDSTREKK FOR ÅR 2017 * (...)
Re: A Modern Compiler for the French Tax Code
#97I'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 feel like legislation is a field that would benefit a great deal from the progress that software engineering has made in a number of fields. It's already evolved somewhat into a DSL. With some nudging and technical leadership, I suspect that we could move it over entirely into a format that can be readily parsed, tested, and version control. The tax code is especially well-suited to this, because it's a lot of rule…
Re: A Modern Compiler for the French Tax Code
#98I'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 feel like legislation is a field that would benefit a great deal from the progress that software engineering has made in a number of fields. It's already evolved somewhat into a DSL. With some nudging and technical leadership, I suspect that we could move it over entirely into a format that can be readily parsed, tested, and version control. The tax code is especially well-suited to this, because it's a lot of rule…
Cornell Law has providing version control releases of the federal laws for some time for free, and Lexis and their competitors have been doing the same for decades for commercially.
Re: A Modern Compiler for the French Tax Code
#99They 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.
https://blog.merigoux.fr/en/2019/12/20/taxes-formal-proofs.h...
Re: A Modern Compiler for the French Tax Code
#100I'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…
Do you plan on open-sourcing it, or do you have any recommendations for similar projects/research? Very excited about the computational law space.