Live data from Hacker News

Catala – Law to Code

catala-lang.org

21–30 of 67 posts

Re: Catala – Law to Code

#21
post #15

Earlier quoted context omitted.

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.

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.

To avoid harm, you must identify intent.

To punish, you must establish intent.

Intent has been the core underiding feature of the law since the Magna Carta. To ignore or trivialise it is nothing short of advocating for the return of kings.

Re: Catala – Law to Code

#22
Catala is a fantastic project and a real attempt to bring computer science and law together. Which is not easy! That said, for practical projects in legaltech a modern pure Prolog system has a lot of useful properties. A project that attempts to use Scryer Prolog for this is VATmiral.

Re: Catala – Law to Code

#23
Obviously it would be great if this caught on, but it's not even widely understood/agreed on that read-time precision is a desirable quality in a legal system. This is something almost everyone here takes for granted; we want the interpreter or machine to give the same result for the same input. We want that property so we can know the run-time behavior during development.

There are judges and politicians in the US that advocate for various "interpretations" of laws including parts of the constitution, which are different from what the law literally says. In fact they refer to the literal meaning as the "literal interpretation", implying it is one of many valid interpretations, and casting doubt on the idea of language having a precise meaning. The crowd here knows that it is totally possible and often invaluable to work in languages with precise meaning. Anyways, in practice this means: all the steps happened for the law to get passed by the legislature including arguing about the exact text, and instead of enforcing it as written, the judiciary enforces some slightly different but similar law.

A technology like this necessarily concentrates power in the legislature, and takes it away from the judicial system. It concentrates legal power at write time and removes it from run/read time.

Re: Catala – Law to Code

#24

Obviously it would be great if this caught on, but it's not even widely understood/agreed on that read-time precision is a desirable quality in a legal system. This is something almost everyone here takes for granted; we want the interpreter or machine to give the same result for the same input. We want that property so we can know the run-time behavior during development. There are judges and politicians in the US t…

It’s also the case that the massive set of constantly evolving case law is akin to the most convoluted and buggy “libc” ever implemented, running on a system where random bit flips occur frequently. Any lawyer who says they know how to definitively encode an assumption is inherently making a probabilistic statement colored by their own experience and definitionally limited exposure to case law - it may be near perfect, but it exists in an imperfect runtime environment.

This doesn’t mean that this isn’t a useful tool as an aid for interpretability. And perhaps we can reach a point where ambiguity in case law can “propagate” through a graph of nodes to give a range of answers to any question about a regulation - perhaps with the aid of LLMs. But until we have such a system, it can be dangerous to draw conclusions from systems like this one.

(Not a lawyer, this is not legal advice.)

Re: Catala – Law to Code

#25
Can't wait for lawmakers to get a red CI before merging ;)

Jokes aside, I'm trying to imagine what a pull request workflow would be for law making.

For example, there might be a test that checks that a law has adequate budget before applying it; or to get an error if it conflicts with another law.

Also (Italian here), I would be very happy to do "git blame" and discover who actually introduced a modification.

Re: Catala – Law to Code

#27

> 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"?

A lot of law is based around subjective gray lines. “How would a reasonable person behave in this unique situation?” Is at the root of a lot of legal situations.

Write a function for that, keeping in mind that “this situation” needs to be modeled with potentially infinite variables. Then try to define a “reasonable person”.

Hell, the reason most trials happen is because there is huge grey area, and the written laws are not obvious as to what the outcome should be.

Re: Catala – Law to Code

#28

> 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"?

Commercial law nuts and bolts is very algorithmic often.

Criminal law is often fundamentally subjective, incorporating questions of intent and remorse.

Re: Catala – Law to Code

#30

Obviously it would be great if this caught on, but it's not even widely understood/agreed on that read-time precision is a desirable quality in a legal system. This is something almost everyone here takes for granted; we want the interpreter or machine to give the same result for the same input. We want that property so we can know the run-time behavior during development. There are judges and politicians in the US t…

I have a potentially more optimistic (and simultaneously more pessimistic!) view to offer.

Some differing interpretations of the law distinguish between the lawmakers' intention vs the literal meaning (and keep in mind that language itself changes a lot in just a few centuries. The hard problem is that, in PL terms, the law is written in syntax without agreed upon semantics. So a decent step could be just using some agreed upon semantics, like we do in code! Then at least "interpreting" it would be unambiguous.

Maybe a decent analogy would be gcc vs clang might produce different programs for certain undefined behavior, and different combinations of pieces might lead to different behavior too (like race conditions), and somebody (the plaintiff/user) is asking you (the judge/compiler) to decide what's going to happen in this next loop/program/whatever.

Or maybe a decent analogy would be getting a ticket that the API is erroring in some rare user's case and having to look into the code and stacktrace to realize it's some weird unanticipated interaction between two different pieces of legacy code (150 year old law) that now interact due to a recent merge (a new law from last year), and now it's crashing, so we have to figure out how to interpret/compile/resolve this user's case.

If law was usable like code, we'd never have any of those issues, just like we never have those issues with actual literal programs. And when we do, it's just because we're using the wrong language/aren't encoding enough things in the types and semantics/shouldn't have used this niche compiler so now let's get a new interpretation from another Supreme Compiler/etc. Life would be easier \s

So it's maybe more optimistic than you, in that the run/read time power (judicial) doesn't get diminished, but more pessimistic in that I believe it because I believe that changing the language from english law jargon to some formal language doesn't actually eliminate the issues it might be intended to eliminate.

Post reply on HN