This is the real advantage of codifying law into a programming language. You can have validation and assertion that is automated. And a strict structure, free from ambiguity.
As an additional advantage, multilingualism becomes more accessible, with the codified program/definition acting as the lingua franca of law. Thus, someone who only knows English could make sense of Japanese laws by reading it.
I cannot imagine some system that goes from a formal language to reality not having ambiguity. Even going from mathematical formalism to mathematical truth you can’t get all the truth. I imagine getting all the justice would be harder.
And I have heard lawyers explain that sometimes ambiguity, in contracts at least, is a good thing as it reduces the amount of a priori negotiation for low probability events. The the low probability event happens and the contract is ambiguous then you negotiate at that time and maybe sue.
And for laws, I think a bit of flex in the system probably would be a good thing. Give some scope for local judgment an autonomy to the people closest to the situation.
Why would you want every law that applies to children to explain what a child is? Why stop at child, perhaps each law should include a definition of every word it contains, right? That would certainly make every law much more readable for the masses.
The text of the law is meant to be understood by the people that it applies to, i.e. everyone living in the locality which passed said law. Expressing law in a formal language goes directly against that goal. Imagine if a EULA you get presented with, instead of being a wall of repetitive text, would be a wall of code with symbols you at best remember from some class you took in 8th grade.
Having EULAs and many types of contract be code would be a huge upgrade.
For one, it'd make them a lot shorter. You could use inheritance or composition to refactor out repetitive boilerplate, which is 90% of what EULAs are. The thing you see would only be the places where it deviates from a base EULA that you could study once.
For another, it would catch bugs automatically. I have caught bugs in contracts drafted by lawyers a bunch of times, just by reading them carefully. For example numbers that are stated in both words and digits but they don't match. References to clauses that no longer exist. Statements that are contradictory.
A properly written language could be compiled to English for people who for some reason can't read the "real" language. But a well written PL for law would be quite readable.
Programming languages and other formal languages add boilerplate, they never remove it. Compare pseudocode for an algorithm with the actual implementation: it will almost always be much shorter.
All of the rest of what you mention could be achieved with plain language contracts exactly as well. Nothing prevents the software industry from getting together and producing a base EULA that all others refer.
Except of course for the fact that it would be utterly impossible to convince companies to agree to such an endeavor, whether in code or plain language or any other way. Especially since the purpose of EULAs is not to be clear, but to confuse end users with verbiage.
This is the real advantage of codifying law into a programming language. You can have validation and assertion that is automated. And a strict structure, free from ambiguity.
As an additional advantage, multilingualism becomes more accessible, with the codified program/definition acting as the lingua franca of law. Thus, someone who only knows English could make sense of Japanese laws by reading it.