Catala – Law to Code

(catala-lang.org)

41 points | by Grognak 5 hours ago ago

15 comments

  • mkl 3 hours ago

    How strange to give it the same name as an unrelated natural language spoken by millions of people: https://en.wikipedia.org/wiki/Catala

  • ajax33 an hour ago

    Past discussions:

    1. (https://news.ycombinator.com/item?id=27059899) - May 2021 (126 comments) 2. (https://news.ycombinator.com/item?id=28633122) - Sept 2021 (40 comments) 3. (https://news.ycombinator.com/item?id=37546874) - Sept 2023 (277 comments)

  • kimfc 2 hours ago

    Huh I just finished a book by Jaron Lanier that described a hypothetical system literally just like this. Always fun to get a coincidence like this

  • sublinear 2 hours ago

    > The aim is not to formalise or put into code all the law, because that would make no sense, but we are interested in the law that is already executed automatically, such as the calculation of social benefits, tax or unemployment.

    Can anyone explain why it's believed this "would make no sense"?

    • embedding-shape 2 hours ago

      Law isn't written to cover 100% of real life scenarios and potential cases, it's written with deliberate parts of ambiguity, that will ultimately be up to courts to set the precedents for, in various situations and context.

      I think the idea is that you can't really cover 100% of real-life cases in "code", either legal or software, so the areas you'll leave this out of would be those "not-entirely-strict" parts.

    • recursivecaveat an hour ago

      A computer program takes digital bytes, runs some discrete logic on them, outputs some more bytes. Laws take messy real world stuff, run some subjective decision tree on them, and output some messy real world actions to take. If you model the former with the latter you end up 'shelling out' to human judgement every 2 words. Suppose you accidentally shoot somebody while duck hunting, the meaning or value of pretty much everything here can't be determined by a computer, so the code-law version of this random snippet of natural-language-law would be pretty useless:

      > If it is found that the defendant did the killing or wounding, but that it was not intentional or negligent, the court shall dismiss the proceeding. Otherwise, if it is found that the defendant did the killing or wounding intentionally, by an act of gross negligence, or while under the influence of alcohol, the court shall issue an order permanently prohibiting the defendant from taking any bird or mammal.

    • kelvindegrees 2 hours ago

      I assume it would fail to compile, or error out, because of myriad conflicts throughout the body of laws.

    • samrus an hour ago

      Basically, all human knowledge is an application of either math or philosophy, and law is philosophy, so cant be modeled by math

      • bigbadfeline an hour ago

        > Basically, all human knowledge is an application of either math or philosophy

        Philosophy is not knowledge, it's pure speculation.

        > law is philosophy, so cant be modeled by math

        Law is not philosophy unless it was written based on sloppy speculations. In other words, what law is, depends on how it was written, it can certainly be modeled by logic and math methods can be developed for it too.

        It's nothing new, lawyers have to master logic as part of their training.

        • shakna an hour ago

          Modelling intent, with math, is not going to happy. Law is based around the intent of those taking actions, and understanding intent is absolutely philosophy.

          • bigbadfeline 27 minutes ago

            Understanding intent is understanding interest and that's not philosophy. If it's not about interest, it's psychiatry - not philosophy either.

            Besides, only a lesser part of law is about intent, the major part is about punishing and avoiding harm, finding the true facts and applying the written law to them.

            Down-voting can't change the truth, we've been led by the nose for far too long.

    • nathan_compton 2 hours ago

      I think the primary reason is that laws are about human convention, not real objects which one can clearly and deliberately define. Like at the most basic level nothing exists at all except for quantum fields or something like that. Everything else we talk about on a regular basis, people, dogs, streets, businesses, etc, is defined by convention to a greater or lesser degree.

      It is therefore quite hard to create a formal system to refer to objects in the world in a way which induces no contradictions with intuition. This is why we have courts, among other functions of government.

  • side_up_down 3 hours ago

    How does this incorporate case law?

    • Y_Y 2 hours ago

      That's not so important in Napoleonic/Civil jurisdictions like France. Judges can consider prior rulings, but the law as-written is the main thing.