Catala Lang: DSL designed for deriving implementations from legislative texts
catala-lang.org
catala-lang.org
https://news.ycombinator.com/item?id=27059899 (5 months ago, 129 comments)
https://news.ycombinator.com/item?id=24948342 (10 months ago, 37 comments)
As I see it, a language intended for use in legal contexts such as contract law and legislation must satisfy two key desiderata:
(1) it must be able to express the intended laws and contracts
(2) it can used to conveniently reason about these rules themselves too.
It is property (2) I miss most when seeing this proposal.
When I undertake the task of formalizing legislation or any type of rules, one of the key benefits I would like to obtain as a result is the ability to answer questions such as: "Are there redundant regulations or clauses?", "Can these conditions be simplified?", "Are these conflicting conditions?" etc. Such questions require reasoning about these rules themselves.
Catala is just a functional language under the hood, and its syntax is very basic (it has an LR(1) parser) with just verbose keywords.
Could you please give a short example of how we can use Catala to interpret for instance the sample program that is shown on the project page? Does it have a natural representation as a Catala data structure that can be reasoned about conveniently within Catala?
You could go on for some time defining terms here, and would have to if you want to mechanically determine legal outcomes, once the required quantifiable facts have been established. I think you'd end up with something look like one of the ill-fated expert systems of yesteryear.
If there's a dispute around existing code, who's going to translate it to Catala?
If there's legal reason to write a specific program for something, why wouldn't that be some kind of patent or similar?
The only English example (US Tax Code) has a broken link too, "source code files of the example", so I can't even see that.
Idk. Just doesn't seem useful from what I see so far.
https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=uriserv:...
Article 14 mandates that a technical system be built and states, among other requirements:
"Where competent authorities lawfully issue, in their own Member State and in an electronic format that allows automated exchange, evidence that is relevant for the online procedures referred to in paragraph 1, they shall also make such evidence available to requesting competent authorities from other Member States in an electronic format that allows automated exchange."
The core of this task is therefore to translate evidences between different European Member States. It would be nice to formalize this in the form of logical rules that clearly state which documents can be used to establish the necessary evidences. For instance, the contents of an Austrian birth certificate could be used to prove a required age to a different Member State. The logical rules could take changes in legislation and data formats into account without requiring a redeployment of the entire system, if there is a way to read and interpret the rules dynamically.
Your question is spot-on; for me the Catala code has to be officially published from the government service that uses it to apply a piece of law automatically with a legal expert system : tax administration, social benefits administration, etc.
If you disagree with the code, then I guess you could sue the administration in court. The legal process for that depends on the country though.
The status quo now is that if I have a contract dispute with a big corporation I'm probably SOL as they will bury me under lawyers. But if I can get a summary judgment saying "hey, the code says he's right, pay up BigCo." Suddenly the courts are a lot more accessible to me.
Not saying this will be a net win for the little man (automation usually isn't) but there may be some benefits, which is interesting.
the courts have had to rule over whether action figures are toys or dolls, because those had different tariffs: https://en.wikipedia.org/wiki/Toy_Biz,_Inc._v._United_States
you can make an incredibly verbose smart contract but lawyers will weasel about the inputs like this.
Not all law will be like this, it's too complicated, but some of it might be and that's interesting.
It sounds like your concept of law is rather static. Don't you think human society will eventually start to create "law" that doesn't follow the traditional model of imprecisely expressed statements, expressed in a weird bastardization of natural language?
Found a code sample in the README:
https://github.com/CatalaLang/catala/raw/master/doc/images/S...
Unsolicited feedback: this should be the first or second thing visible on the home page, ideally in a less funky font.
i was hoping to see something along the lines of a dsl that improved the precision of how law is expressed in a more general sense, and perhaps tooling for collaborating, patching, managing, diffing and otherwise computerized reasoning about the law that doesn't necessarily supplant a lot of what legislators and the judiciary do, but rather increases the effectiveness with which they are able to do their jobs.
Congress won't write an exception to permit the possession of un-extracted naturally occurring quantities of endogenous substances within one's body because they know that the law is not enforced by robots who will automatically arrest everyone in the country. They probably never even gave the concept a passing thought because it's entirely outside the realm of what a judge would ever consider to be reasonable.
The 1993 case State v. Lowe gives a good explanation of the legal reasoning:
"The absence of proof to evince knowledgeable possession is the key. The drug might have been injected involuntarily, or introduced by artifice, into the defendant's system."
On second thought, that applies to many laws, but my question still stands.