Catala: a programming language for socio-fiscal legislative literate programming

  • If 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_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-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_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_bYX...)

    * MIT started a journal on the topic ~1 year ago https://law.mit.edu/

    If you want to work on this topic DM me :)

  • I 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... (It's independent of this one as far as I know)

    Wouldn't it be great to have laws managed in a git repo.

  • Cool 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.

  • I can’t think a worse name for a programming language that of an actual language.

  • In Russian katala means a card sharp, a crook. The name has a great fit for the language purpose.

  • It’s such a French thing to write software supporting French and English while making all the examples in README French...

  • This is something I've given some thought to since encountering logic programming. Could something like this be done in say, Prolog?

  • Interesting 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.

  • https://news.ycombinator.com/item?id=24731327 Compiler for the M language of the French DGFiP

  • Does it handle implicit special cases (rich, connected, etc.)?

    I kid, I kid...

  • Hi, Catala author here :) Since I'm here please shoot your questions, I'll try to answer them.

  • How 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.

  • So what is the actual benefit of having the law represented in a programming language?

  • how 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.

  • Wow. 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.

  • Are Executive Orders considered hotfixes?