News for hackers. Stuff that matters.
Re:Catala: A Programming Language for the Law by applepple on Thursday May 06, 2021 @04:45AM (#27060588)
Judging by how most people write code today, I find this idea terrifying. I sometimes wonder if it would be better if we went back to an ancient-Roman style legal system which maximizes the human interpretive element rather than attempts to remove it.

It's already the case in many countries today that there is too much focus on the wording of the law and not enough on the intent. People try to use a rigid fixation on the importance of words to twist the law in any direction which benefits them, even in ways that don't feel right.

We risk a Kafkaesque situation.

Re:Catala: A Programming Language for the Law by alpaca128 on Thursday May 06, 2021 @05:01AM (#27060718)
> Judging by how most people write code today, I find this idea terrifying

Most people today don't write code for safety critical systems. The abstract mentions they already uncovered a "bug" in an active law by rewriting it in their language, so it could be an immensely helpful tool for finding edge cases and loopholes in that mess.

> It's already the case in many countries today that there is too much focus on the wording of the law and not enough on the intent

Again, as the abstract mentions this is intended for laws that are meant to be interpreted 100% literally like an algorithm. Those exist and those are also exactly the ones that should be absolutely consistent.

The real problem I see is that clear, loophole-free laws are often not in the interest of the lawmakers. You only need to take a look at the underhanded ways various parties are trying to undermine privacy.

Re:Catala: A Programming Language for the Law by kwhitefoot on Thursday May 06, 2021 @09:16AM (#27062741)
Another problem is that it will probably increase the proliferation of strict liability offences.

The fact that a law is internally consistent and free of loopholes does not necessarily mean that it is a good law but an algorithmic approach to creating such laws risks making their creation too easy so that we end up with a large body of law that can't be argued against because it has been 'proven' correct.

I'm reminded of a remark that Donald Knuth made regarding a piece of code. It went something like this: "Be careful if you use this, I have merely proven it correct but not tried to run it."

Re:Catala: A Programming Language for the Law by 6gvONxR4sf7o on Thursday May 06, 2021 @01:42PM (#27066717)
I'd urge people to consider their experience writing unit tests. It's not uncommon for me to write a test that my code fails, not because the code was wrong, but because my test was wrong. The same applies to proofs. You can prove that your code does something, but that doesn't prove it does what you wanted. It's easy for us to understand, but I could imagine lay people misinterpreting it.
Re:Catala: A Programming Language for the Law by seanhunter on Thursday May 06, 2021 @09:46AM (#27063106)
>> Judging by how most people write code today, I find this idea terrifying

> Most people today don't write code for safety critical systems. The abstract mentions they already uncovered a "bug" in an active law by rewriting it in their language, so it could be an immensely helpful tool for finding edge cases and loopholes in that mess.

I'll give you an example from a field that I (unfortunately) have a reasonable amount of experience of where the law and contracts are supposed to be interpreted 100% literally like an algorithm: structured finance (eg the subject matter of the 2008 financial crisis). The prospectus of a structured security like a mortgage bond is typically a hundred or more pages of very dense legalese that was worked on intensively by highly-specialised lawyers and bankers for months. Its intent is to set up a small special-purpose company with strict rules on how it operates down to the last penny and zero discretion. This allows investors (in theory) to understand how the bond will perform.

The opening chapter of my introductory textbook on structured credit analysis says the author (who has been part of those teams for years and has worked on hundreds or possibly thousands of bonds) has never read a bond prospectus for a structured security that does not contain serious drafting errors. I personally worked on a bond for months and read, edited and commented on the bond model and prospectus hundreds of times. We certainly were trying to make our prospectus as simple, clear and loophole-free as possible. Then a few years after it launched we discovered we had made a big mistake in drafting it that had gone unnoticed by me, the expert bankers and lawyers and all the investors so far. Luckily we were able to fix the problem without negative consequences. There is literally no chance that this error would have been found or solved by a formal system and if anything it would actually have been worse.

Some things are complex enough that they are just very hard to do. The existing system allows for that by having a rigorous process of dispute, interpretation and argument to decide complex questions post facto.

Re:Catala: A Programming Language for the Law by MockObject on Thursday May 06, 2021 @11:34AM (#27064808)
> we discovered we had made a big mistake in drafting it that had gone unnoticed by me, the expert bankers and lawyers and all the investors so far. There is literally no chance that this error would have been found or solved by a formal system and if anything it would actually have been worse.

There is no chance that a formal system wouldn't have revealed this bug? Static analysis and simulations wouldn't have helped?

Re:Catala: A Programming Language for the Law by teucris on Thursday May 06, 2021 @11:52AM (#27065115)
> Some things are complex enough that they are just very hard to do.

I agree with this wholeheartedly. Engineers have the ability to automate some very complex issues. But there will always be a class of issues beyond automation, simulation, analysis, etc. and we just have to accept that the only way to solve them is with slow, hard, error-prone work.

Re:Catala: A Programming Language for the Law by muskox2 on Thursday May 06, 2021 @10:00AM (#27063302)
Do you think that smart contacts could be useful in this area?
Re:Catala: A Programming Language for the Law by seanhunter on Thursday May 06, 2021 @11:27AM (#27064686)
Not smart contracts exactly but there is a specific part of each bond called the waterfall (basically specifies what happens with all the cashflows under different circumstances and is a little bit like an equity cap table plus liquidity preferences). I've always thought there should be a dsl specifying the waterfall that can be used for the bond model and used to generate the legalese in the prospectus. A common problem is the bond model doesn't match the prospectus and that problem would just disappear. I intend to do this as a research project if I ever get time (it's been 12 years since I had the idea to do this so it may never happen...).
Re:Catala: A Programming Language for the Law by alpaca128 on Thursday May 06, 2021 @12:50PM (#27066008)
If I understand it correctly smart contracts are just another piece of software combined with some blockchain magic. If you can't prove a piece of code is correct, wrapping it in a trendy buzzword won't make the code more correct.

Maybe I'm wrong, but I don't know how decentralization would change anything other than adding safeties against manipulation if done right.

Re:Catala: A Programming Language for the Law by hobbyjogger on Thursday May 06, 2021 @01:56PM (#27066902)
That line in the summary is a bit misleading. The authors didn't find a "bug" in any law - instead they found a corner case that wasn't coverred by an online tool hosted by the French government to estimate family benefits under French law:

> After close inspection of the OpenFisca code, a discrepancy was located with the Catala implementation. Indeed, according to article L755-12 of the Social Security Code, the income cap for the family benefits does not apply in overseas territories with single-child families. This subtlety was not taken into account by OpenFisca, and was fixed after its disclosure by the authors.

Here's the pull request for their fix to the benefits simulator: https://github.com/openfisca/openfisca-france/issues/1426

Re:Catala: A Programming Language for the Law by kirkules on Thursday May 06, 2021 @11:41AM (#27064934)
There's a real slippery slope issue here too though, for several reasons, that I'd expect would lead to overuse.

It's a fancy new thing that will be branded as helping to avoid mistakes, reduce legal system costs, increase consistency, etc.

So, it will be applied to existing laws more generally than the abstract suggests it should be.

New laws will be made with this in mind, increasing application regardless of whether the new laws are actually literally interpretable.

It will become entrenched and hard to remove as allocated funds to pay people to do the same jobs disappear.

Re:Catala: A Programming Language for the Law by jgilias on Thursday May 06, 2021 @05:15AM (#27060804)
To me it seems like you contradict yourself.

> it would be better [to adopt a law system] which maximizes the human interpretive element rather than attempts to remove it.

> twist the law in any direction which benefits them, even in ways that don't feel right.

The first statement seems to say that the more humans can interpret the law the better, the second statement seems to imply that people actually doing such interpretation with the tools available now is a bad thing.

It's a good thing your comment is not a legal text though. Otherwise some formalism would be quite welcome to derive the intended meaning.

Re:Catala: A Programming Language for the Law by elcomet on Thursday May 06, 2021 @08:25AM (#27062153)
I don't think it's a contradiction.

If you follow the exact wording of the law, it's easier to find loopholes (like a hacker looking for a breach).

If you follow the intent of the law, then it's much harder. A judge will see if you acted in bad faith, if your actions are against the spirit of the law.

Re:Catala: A Programming Language for the Law by applepple on Thursday May 06, 2021 @05:31AM (#27060909)
There is no contradiction. Countries which put more focus on the intent of the law (like Europe) tend to have fairer outcomes than countries which focus too much on the wording of the law like in the US. I read that many criminals in the US get away with crimes because of failures of procedure by the prosecution for example; this is a clear sign that there is too much focus on the wording of the law. If intent counted more, then nobody would be acquitted of a crime on the basis of a technicality.

It's the fact that people have accepted the primacy of the written word that they allow themselves to be swayed to accept verdicts which don't make sense. It's important to factor in the fact that criminal justice involves multiple jurors, so you don't want some outdated wording written in the 1900s to allow one bad juror to use wording of a law or precedent to convince other jurors of a conclusion which best matches the wording but defies common sense.

It's like in the US constitution, there is this paragraph:

”No State shall enter into any Treaty, Alliance, or Confederation; grant Letters of Marque and Reprisal; coin Money; emit Bills of Credit; make any Thing but gold and silver Coin a Tender in Payment of Debts"

And yet today the US government (which is clearly an alliance of states) pays back its debts by printing more money not backed by gold. People have used the wording "No state" to imply that the Federal government is not a state and therefore, it doesn't apply. But clearly this defies common sense about the intent of the law which was to prevent the government from printing unlimited money not tethered to any scarce asset to inflate away its true debt... And yet this is exactly what the federal government (the alliance of states) is doing nowadays.

Re:Catala: A Programming Language for the Law by dctoedt on Thursday May 06, 2021 @06:40AM (#27061301)
> And yet today the US government (which is clearly an alliance of states)

That's not correct: The "alliance of states" was under the (superseded) Articles of Confederation — the governance failures of which led to the 1787 constitutional convention. In contrast, the very first words of the Constitution state explicitly that "We, the People of the United States" [emphasis added] were joining together to establish a national polity that transcended the states.

> People have used the wording "No state" to imply that the Federal government is not a state

It's far, far more than just a mere implication — it's a foundational assumption. See, for example, the Supremacy Clause of the Constitution. [0]

[0] https://www.law.cornell.edu/wex/supremacy_clause

Re:Catala: A Programming Language for the Law by mellavora on Thursday May 06, 2021 @06:06AM (#27061109)
I strongly agree with your main intent, i.e. that law should be interpreted by humans. However,

Your fact " I read that many criminals in the US get away with crimes because of failures of procedure by the prosecution for example;"

which you interpret as

"this is a clear sign that there is too much focus on the wording of the law. "

could also be interpreted as:

police often use illegal means to target people and fabricate evidence, and the US's well-functioning legal system stops this.

Re:Catala: A Programming Language for the Law by bryanrasmussen on Thursday May 06, 2021 @05:50AM (#27061024)
>People have used the wording "No state" to imply that the Federal government is not a state

in a document delineating what qualifies as states and what qualifies as the federal government with all sorts of text about relations between the two it would seem to be a really reasonable implication to make.

Furthermore your example is in a paragraph that starts "No State shall enter into any Treaty, Alliance, or Confederation", by your logic it follows that the Federal Government cannot ever enter into any Treaty, Alliance, or Confederation because the Federal Government is after all a State.

Re:Catala: A Programming Language for the Law by applepple on Thursday May 06, 2021 @06:15AM (#27061161)
>> in a document delineating what qualifies as states and what qualifies as the federal government with all sorts of text about relations between the two

If those definitions were tacked on afterwards, then it would exemplify exactly the kinds of distortions I'm referring to. I don't know the order in which the US constitution was written but that definitely should affect the intent.

>> Furthermore your example is in a paragraph that starts "No State shall enter into any Treaty, Alliance, or Confederation"

TBH, I didn't even see this interpretation. I guess some people are focused on the wording to an entirely different level. I used the semicolons to interpret it as "no alliance pertaining to the payment of debt" based on my interpretation, it doesn't say anything about alliances pertaining to other matters.

But this seems to reinforce my point. The words can be ambiguous but it doesn't mean we should disqualify the intent altogether.

Re:Catala: A Programming Language for the Law by bryanrasmussen on Thursday May 06, 2021 @07:10AM (#27061513)
ok so, those definitions were not tacked on afterwards, they were really the reason for the Constitution to be written in the first place. What was tacked on afterwards was the Bill of Rights.

The reason for the writing of the Constitution was the Articles of Confederation https://en.wikipedia.org/wiki/Articles_of_Confederation being rather problematic for running a nation.

In fact for any judge familiar with the Articles of Confederation and the history thereof, which I would hope was every judge, the interpretation of the paragraph you cite would be completely obvious and pertaining only to the states, because some of the original problems between the states that caused the Constitution to be written was states doing such things as entering into treaties with foreign nations, coining their own money (making trade between states more difficult than needed), etc. etc.

Basically the paragraph is saying "all the stuff you guys were doing or maybe thinking about doing, stops now!" - I say "maybe thinking about doing" because unsure about letters of Marque although I could certainly see it having been done by some of the more haughty states at the time - say New York or Virginia.

Re:Catala: A Programming Language for the Law by jgilias on Thursday May 06, 2021 @06:32AM (#27061257)
But how do you actually know the intent if you can't trust the words and you weren't there when the text to write down was discussed? This is literally your interpretation of the document versus someone else's.
Re:Catala: A Programming Language for the Law by myfavoritedog on Thursday May 06, 2021 @08:27AM (#27062166)
If intent counted more, then nobody would be acquitted of a crime on the basis of a technicality

One person's "technicality" is another person's last hope to have a core principle enforced like "innocent until proven guilty".

Intent is a squishy thing that's open to endless subjectivity and biases. Intent should only be used when the letter of the law isn't sufficiently clear.

Separation of Powers was one of the most brilliant concepts undergirding the US Constitution. It's already been damaged pretty badly over the years. We don't need to double down on that damage by insisting upon having judges ignore the wording of laws so they can go with their feelings regarding intent.

Re:Catala: A Programming Language for the Law by jfengel on Thursday May 06, 2021 @01:03PM (#27066179)
I have never seen any law, ever, that came anywhere near close to "sufficiently clear".

Upthread there was a discussion of hundreds of pages going into something as trivially straightforward as the requirements of a financial contract. For something involving human behavior, there will always be billions of corner cases, exceptions, confounding events, and other factors leaving decisions open to a judgment call.

That's why lawyers spend years just learning to read the law, and then reading and synthesizing thousands of decisions that try to patch together all those inconsistencies and gaps. And even then, every case ultimately comes down to a judge's judgment call on which lawyer has done so more successfully... or worse, a jury of twelve people deliberately selected for their ignorance of the law.

Human beings are too squishy to write genuinely precise laws. Lawyers try to pretend otherwise, and that pretension is fundamental to trying to actually have a society. But let's not kid ourselves into thinking that any law is actually rigorous in a sense that a computer programmer, scientist, or logician would recognize.

Re:Catala: A Programming Language for the Law by themulticaster on Thursday May 06, 2021 @07:47AM (#27061807)
IANAL and I am not too familiar with the US constitution, but the paragraph you mentioned seems to have a very clear intention: To forbid the individual states from a) performing diplomacy/foreign policy on their own and b) creating their own currency.

At this point, I want to point out that while a lot of discussion always surrounds the status and the individual rights of the states, I think it really is clear that the US is the state (as in nation) and the individual states, while they have some autonomy, are the inseparable parts that the US is made of, just like in other federal states (nations).

From that perspective, I think the justification for the paragraph you mention is clear: The states are not independent, and therefore they can't have diplomatic ties with other nations. In diplomacy, this has always been the case: Diplomatic ties always exist between independent nations, never between an independent nation and a federal, dependent state. There is nothing like an "Embassy of the U.S. State of Texas to the United Mexican States" since the State of Texas can't have diplomatic ties on its own.

What you mention regarding printing more money does not apply here: The paragraph you mention talks about the US states, but not about the (nation) state itself, the USA. There exists no alliance of states, rather there is a federal republic consisting of states (which in turn are not allowed to have any diplomatic ties of their own). The (nation) state represented by the US government is obviously not a (federal) state inside the US, that would be absurd.

Re:Catala: A Programming Language for the Law by jcranmer on Thursday May 06, 2021 @04:32PM (#27068727)
> But clearly this defies common sense about the intent of the law which was to prevent the government from printing unlimited money not tethered to any scarce asset to inflate away its true debt...

That is a really, really strained interpretation of this clause. Because these exact words are used to give these powers to other entities in government:

Article I, Section 8, clause 5: [The Congress shall have Power] To coin Money, regulate the Value thereof, and of foreign Coin, and fix the Standard of Weights and Measures;

Article I, Section 8, clause 11: [The Congress shall have Power] To declare War, grant Letters of Marque and Reprisal, and make Rules concerning Captures on Land and Water;

Article II, Section 1, clause 2: [The President] shall have Power, by and with the Advice and Consent of the Senate, to make Treaties, provided two thirds of the Senators present concur

Some of the other things forbidden with "No State" are also expressly forbidden to Congress itself. How is it common sense that "No state" also includes "the federal government" when the federal government is sometimes given the power which is allotted to "no state" and sometimes expressly forbidden as well that which is allotted to "no state"?

Re:Catala: A Programming Language for the Law by throwaway210222 on Thursday May 06, 2021 @05:36AM (#27060935)
> I read that many criminals in the US get away with crimes because of failures of procedure by the prosecution for example;

How does anyone know they got away with a crime if their cases never went to trial? Isn't that exactly what a trial is there to establish.

The USA has a long history of village folk "just knowing" that an accused is guilty. Seldom worked out well.

Pilots have procedures they must follow. So do cops. They just need to do their jobs properly.

Re:Catala: A Programming Language for the Law by applepple on Thursday May 06, 2021 @05:53AM (#27061041)
>> How does anyone know they got away with a crime if their cases never went to trial?

Based on probability, you can safely assume that some percentage of them were guilty. That is more correct than assuming that they were all innocent. But to presume innocence simply on the basis that they were not convicted is itself part of the problem wereby the procedure and the wording takes precedence over the intent.

In reality, there is no certainty; some guilty people will be acquitted and some innocent people will be charged. To put too much weight on the words 'guilty' or 'innocent' is to ignore this reality.

Re:Catala: A Programming Language for the Law by UncleEntity on Thursday May 06, 2021 @11:22AM (#27064613)
> But to presume innocence simply on the basis that they were not convicted is itself part of the problem wereby the procedure and the wording takes precedence over the intent.

Unless the intent is "it is better a hundred guilty persons should escape than one innocent person should suffer."

Re:Catala: A Programming Language for the Law by jackpirate on Thursday May 06, 2021 @11:10AM (#27064373)
You seem to have several misunderstandings about the intent of US law in this thread.

The intent of US law is specifically to allow many guilty people to be freed due to procedural errors, and so the fact that this happens is not taking "precedence over the intent".

Also, in the US, no one is ever found "innocent" in court. They are found either guilty or not guilty.

Re:Catala: A Programming Language for the Law by smitty1e on Thursday May 06, 2021 @05:14AM (#27060800)
"Risk"

Yeah, we crossed that Rubicon like Evil Kenevil jumped the Grand Canyon a long time ago.

I'd like to see this sort of rigor applied to the tax code so that we can all agree that "complexity is a subsidy" and just scuttle the whole mess in favor of something not an iron rod of oppression.

Re:Catala: A Programming Language for the Law by GlennS on Thursday May 06, 2021 @06:49AM (#27061357)
Clearly it needs an easy way to drop to a command prompt for input.

Seek death penalty? Abort, Retry, Fail?_

Re:Catala: A Programming Language for the Law by _0ffh on Thursday May 06, 2021 @03:07PM (#27067774)
I concur, and as a result the same goes for contracts.

A friend recently told me "I never needed a lawyer because someone did not understand a contract, but several times because someone tried to finagle with legal sophistry".

Re:Catala: A Programming Language for the Law by Balgair on Thursday May 06, 2021 @11:50AM (#27065086)
Related:

When trying to compare the legal systems of various countries, it is instructive to note that they differ by large amounts. The basics of Law, and the governing principles and assumptions behind Law, vary quite a lot. Even within countries, the law is often not the same everywhere. Wikipedia has a good map of the 'basic' law systems used throughout the world:

https://en.wikipedia.org/wiki/List_of_national_legal_systems

Re:Catala: A Programming Language for the Law by da39a3ee on Thursday May 06, 2021 @12:59PM (#27066119)
> Judging by how most people write code today, I find this idea terrifying.

Writing code is not a single activity, it is a modern means of communication and information transmission. Code is written for a vast range of purposes, some better suited to less rigorous programmers than others. No-one is asking or expecting the authors of bad code that you have in mind to formalize legal systems. The latter task will be on the rigorous side of programming, presumably leaning heavily on static type checking / automated theorem proving.

Re:Catala: A Programming Language for the Law by quasarj on Thursday May 06, 2021 @07:55PM (#27070319)
As a programmer, and indeed a logical thinker in general, I find the fact that there is any human interpretation to be horrifying. At worst this means undesirables get worse punishments, and at best it means when going into the legal system, you have no idea what to expect. Indeed, you have no way to manage the risk that the law presents to you. Your only hope is to avoid it at all costs.
Re:Catala: A Programming Language for the Law by pharmakom on Thursday May 06, 2021 @08:11AM (#27062031)
Can we solve this by generating example scenarios from the code and putting them to a common sense test? This is an integration test, of sorts.
Re:Catala: A Programming Language for the Law by nautilus12 on Thursday May 06, 2021 @12:03PM (#27065272)
Not if its functional programming. And it has a chance to move just about the same speed as the legal system.