Live data from Hacker News

CatalaLang/catala: Programming language for law specification

github.com

91–100 of 301 posts

Re: CatalaLang/catala: Programming language for law specification

#91

It would be interesting to also "weave" in test cases. The workface of logic statements is exactly where bugs are introduced. Especially around temporal events, and that goes to formal models (and even more bugs). Typically, if there is a rule around height, there would be at least three tests¹: one taller, one equal to, and one shorter. (Without types or something, then also negative, null, and max/min boundary inpu…

It will not compile (sarcasm).

Many laws are written with a lot of double meaning (recent eu regulations on allowing or not allowing russian cars is a good example).

Though, it could be a good idea to find all the possible double meanings or vague definition when trying to "digitise" the laws into the programming language.

Re: CatalaLang/catala: Programming language for law specification

#92
without formal training, one key thing I picked up is that most public understanding of legal concepts diverges from court understanding because law follows logical and/or gates

so “and” isnt a list of accepted criteria, it is a list of things that must be simultaneously satisfied

but its only using logical gates most of the time

this is a good step in showing that. not a panacea but a good step!

Re: CatalaLang/catala: Programming language for law specification

#94

It would be interesting to also "weave" in test cases. The workface of logic statements is exactly where bugs are introduced. Especially around temporal events, and that goes to formal models (and even more bugs). Typically, if there is a rule around height, there would be at least three tests¹: one taller, one equal to, and one shorter. (Without types or something, then also negative, null, and max/min boundary inpu…

That would be nice also to have unit tests

Re: CatalaLang/catala: Programming language for law specification

#95

Laws are often written in most vague language to allow wide interpretation, especially laws regarding treason, communism, foreign agents, anti-war speeches and such things. Programming language won't help here.

I'm also somewhat skeptical. How would a program deduce that "cookies and similar technologies" will mean localStorage, sessionStorage, IndexedDB, etc. Remember that the law was written well before some of these technologies even existed.

Re: CatalaLang/catala: Programming language for law specification

#96

Earlier quoted context omitted.

I think for something like this to be effective, you need the actual intent encoded correctly (so this use case wouldn’t have been solved), and lawmakers acting in good faith (i.e., not drafting legislation that’s intentionally vague such that it can cast a wide net and force people to use the courts to dispute things).

Intent could be derived by parliament debates minutes.

Yeah, uhh, having seen some of the hearings in recent state legislatures regarding abortion, that’s some flawed thinking. Lawmakers are intentionally vague throughout the entire process sometimes.

Re: CatalaLang/catala: Programming language for law specification

#97
post #43

I think what I'd rather see is a standardize test suite format for laws that spells out the intentions. Once I lived in a state that proposed a very simple anti-child porn law with good intent, but it was too simple. It read sort of like "anyone sending explicit pictures of minors from a cell phone will be guilty of conveying child porn". It was written in the proper legal jargon, but wasn't a whole lot more detailed…

I partly like this idea in theory, but believe it is literally 100% impossible to come up with a better "test suite" than "the actual court system?"

If it was 'literally 100% impossible', you wouldn't need to believe it, you'd know it to be so.

As for test suites and courts - the two are complementary so there's need to compare them to one another.

Re: CatalaLang/catala: Programming language for law specification

#98
post #53

I'd be interested in seeing something like this for verifying game designs / new game rules given an existing design

Why? What do game designs have to do with law?

Games are activities bound by rules. Laws are rules for government/governed.

AFAIK There's not really a programming language specific for describing how players interact in a game, so although there's no reason you couldn't implement it in any old programming language. I guess the same thing could be said of the law too until Catala.

Re: CatalaLang/catala: Programming language for law specification

#99
post #89
post #43

Earlier quoted context omitted.

I partly like this idea in theory, but believe it is literally 100% impossible to come up with a better "test suite" than "the actual court system?"

Yeah, there’s no way that a modern computer could outdo the logical accuracy and processing power of our 300 year old legal system. Court rooms and arguing and paperwork, much more efficient than silicon.

With developments in AI I doubt that will stand the test of time.
Post reply on HN