7 ms·
Catala: a programming language for socio-fiscal legislative literate programming
- nickreese 6y agoWow. Cool idea but naming a programming language that isn’t related to the spoken and written language with the same name is a terrible way to get traction for it.
- d3ckard 6y agoIt’s such a French thing to write software supporting French and English while making all the examples in README French...
- programLyrique 6y agoThere is an example of the US tax code on the landing page of website (https://catala-lang.org/en/ https://catala-lang.org/en/) so they actually seem to have also tried the language on English-written law!
- firebacon 6y agoMaybe that was done to prove the point that the language, unlike most other programming languages, does not have any built-in English assumptions? Also I think the examples are actually quite comprehensible even to non french speakers.
- d3ckard 6y agoThey aren’t. Also, it doesn’t seem to make sense to use only French examples in midst of English written text. I don’t think its a major problem of course and main project page contains English examples, I just found that funny.
- rwmj 6y agoI think this topic is really interesting. There is also an effort to encode US law: https://law.stanford.edu/codex-the-stanford-center-for-legal-informatics/ https://law.stanford.edu/codex-the-stanford-center-for-legal... (It's independent of this one as far as I know) Wouldn't it be great to have laws managed in a git repo.
- vthriller 6y agoHow do those similar projects actually handle ambiguously written laws? All that I see in Catala paper is basically "let this whole thing bounce back and forth between lawyer and programmer until it becomes unambiguous."
- rwmj 6y agoTo be honest I don't really know in detail. There is an interesting paper about "Computational Law": http://logic.stanford.edu/publications/genesereth/complaw.pdf http://logic.stanford.edu/publications/genesereth/complaw.pd... which says (§3): Computational Law derives its power from its emphasis on deductive reasoning. As such, it simply cannot be applied in cases requiring analogical or inductive reasoning. Fortunately, it is sometimes the case that there are enough judicial rulings that the net result is, in effect, a set of categorical constraints even where the original wording of the regulations is not definitive. And, in such cases, Computational Law can be applied to the combination of regulatory and judicial law. I guess this is why the French programmers are concentrating on the tax code which might be more precisely written!
- denismerigoux 6y agoHi, Catala author here :) Totally, tax law is usually the most precisely written. But it's still ambiguous as Sarah Lawsky points out https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2987065 https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2987065
- yowlingcat 6y agoI agree. There are a couple interesting platform pieces before things start getting really interesting: 1) Getting US laws encoded in GitHub 2) Building a better proof of identity/residence verification provider that feels more like Authy and less like shitty SSN/identity questions, which provides a semi-anonymous user ID and geo range 3) Building a distributed consensus layer on top of that which makes it easy to conduct and tally anonymous polls across geo ranges for identity/geo verified users
- ekabod 6y agohow does it handle the effective date of a new rule, or retro active rule? That is a challenge in writing billing or insurance policies management applications.
- xondono 6y agoI can’t think a worse name for a programming language that of an actual language.
- 627467 6y ago> The language is named after Pierre Catala, a professor of law who pionneered the French legaltech by creating a computer database of law cases, Juris-Data.
- 627467 6y agoBy the way: catala is latin spelling of bengali name for a fish as well.
- dmurray 6y agoThe human language is called Catalan in English and català in Catalan.
- xondono 6y agoAs a catalan myself I’m well aware of the spelling, but good luck trying to explain that to a search engine. I get regular hits while looking up Rust just because there’s a game with the same name.
- csb6 6y agoInsightful comment that really adds something to the conversation. Thank you!
- daniellarusso 6y agoAre Executive Orders considered hotfixes?
- lykahb 6y agoIn Russian katala means a card sharp, a crook. The name has a great fit for the language purpose.
- pierre 6y agoIf you are intrigued by the idea that law can and will be represented as computer code / data, here are a few link to go deeper : * British national act as a logic program (1982): the paper that is the based of most current effort in this domain https://www.researchgate.net/publication/234805335_The_British_Nationality_Act_as_a_Logic_Program https://www.researchgate.net/publication/234805335_The_Briti... * Standford codex LSP initiative that try to standarize the format in which legal rule will be encoded https://law.stanford.edu/publications/developing-a-legal-specification-protocol-technological-considerations-and-requirements/ https://law.stanford.edu/publications/developing-a-legal-spe... (as far as I know the initiative is still going, don't hesitate to contact oliver goodenough if you want to get involved) * OECD recently publish (2 weeks a go) a full repport on current initiative in the domain https://www.oecd-ilibrary.org/governance/cracking-the-code_3afe6ba5-en https://www.oecd-ilibrary.org/governance/cracking-the-code_3... * There was a workshop at last ICAIL where a lot of people showed their progress on the topic (link to all demo video in this gdoc : https://docs.google.com/document/u/0/d/1-7cJ0KsYzQ8IOY3L_bYXD3uCT7Eqh-crRJJaKMSb9yo/mobilebasic https://docs.google.com/document/u/0/d/1-7cJ0KsYzQ8IOY3L_bYX...) * MIT started a journal on the topic ~1 year ago https://law.mit.edu/ https://law.mit.edu/ If you want to work on this topic DM me :)
- orbifold 6y agoDo you think it might be possible to eventually use a Deep Learning model like GPT-3 to do the formalisation for us? It seems like a herculean task to do it by hand.
- pierre 6y agoGPT-3 is a good step but not enough. We had some good result trying to use it to translate legaleese to more parasable pseudo code. However there is still to much approximation for it to be useful today. Short/mid term I believe that we will have tool allowing lawyer / regulator to draft in a formal form from which we will derive the legaleese. The stanford LSP is pushing in this direction and there is early tentative tools already published such as blawx or Oracle Policy Automation. I m aware of at least 3 other tool under development that push for this paradigm. Fun fact one of the earliest effort in computational law involve lawyer writing contract in a formal english in ~1957 (original paper still full of good ideas on legal formalism https://digitalcommons.law.yale.edu/cgi/viewcont https://digitalcommons.law.yale.edu/cgi/viewcont )
- GartzenDeHaes 6y agoInteresting idea. Some complications are that most laws are written as updates, or change sets, to existing laws. Then there's the agency administrative rules that clarify what the laws are supposed to do, and the administrative law rulings about the rules, and the civil law rulings about the administrative law rulings, etc.
- jankotek 6y agoHow is this different from normal languages such as Java? Lawyers do not have a problem to learn actual programming language. This does not have a IDE support and all the goodies. We implemented tax law. Split each paragraph as a javadoc for method. Manually calculated data were read from excel sheets, and unit tested. We even used Jira for bug tracking and integration.
- raizinho 6y agoThis is something I've given some thought to since encountering logic programming. Could something like this be done in say, Prolog?
- pierre 6y agoLogic oriented programming is really well suit for this problem. Most complaw research happen in the logic department of universities. - blawx.com use ergo 2 in the backend - Kowalski ( author of iso prolog ) wrote a paper on the topic in the 80's http://www.doc.ic.ac.uk/~rak/papers/British%20N http://www.doc.ic.ac.uk/~rak/papers/British%20N ationality%20Act.pdf
- denismerigoux 6y agoYes it could, although I'm not sure there is a single Prolog system running in production inside a large government agency at the moment. Also Prolog does not solve all the problems related to programming the law, especially it doesn't have a nice way to handle redefinitions of variables with legislative exceptions as described https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3088206 https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3088206
- projektfu 6y agoDoes it handle implicit special cases (rich, connected, etc.)? I kid, I kid...
- based2 6y agohttps://news.ycombinator.com/item?id=24731327 https://news.ycombinator.com/item?id=24731327 Compiler for the M language of the French DGFiP
- socialdemocrat 6y agoCool idea but also comes across as an ultra French idea. French court ruling a as far as I understand are very technocratic. You just must paragraphs applied to reach verdict. At least here in Norway there tends to be a strong emphasis on laws being readable by the common people so regular people better know their rights. E.g. we read consumer laws in high school and that was easy. Older laws are written in a very lawyer like Danish form. But there is continuous effort to simplify law texts. While I do have an affinity for rigorous definitions I think this could make the law text less accessible to common people. Also based upon what I know of the US system, it would not work as t he Us system is strongly based on past rulings rather than paragraphs. That makes a formalized approach much harder.
- denismerigoux 6y agoHi, Catala author here :) I totally agree that law should be readable and the Norwegian initiative seems great ! However at least in France we're stuck with the law he have and while some are rightfully proposing some simplification (https://www.revolution-fiscale.fr/ https://www.revolution-fiscale.fr/), we need a good way to apply the current law faithfully not to end up in situations like this one: https://twitter.com/DMerigoux/status/1304367420639973381 https://twitter.com/DMerigoux/status/1304367420639973381.
- denismerigoux 6y agoHi, Catala author here :) Since I'm here please shoot your questions, I'll try to answer them.
- meh2frdf 6y agoSo what is the actual benefit of having the law represented in a programming language?
- denismerigoux 6y agoIt helps the State and private organizations to comply with the law when computing income tax, payroll taxes, etc. There's a huge gap between the law and how it is applied in some situations https://twitter.com/DMerigoux/status/1304367420639973381 https://twitter.com/DMerigoux/status/1304367420639973381