by turtleyacht · 3y ago · 0 comments
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 inputs too.)
So you could have tests based on timelines, like
Given a regulation is passed in 3 months
And parties are prevented from exercising B
But "17 tons" of waste are dumped anyway
And ...
When ...
Then ...
Having a model checker integrated would be a boon. Maybe we could have DevOps-like pipelines in formally-verified legislature (or at least the encoding of language to code).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.
I'm sure the mentality of a PHP developer running a successful but insane legacy site is a better model for this than a perfect OCAML project :)
End to end tests for legal frameworks?
Or take it a step further, write a test suite and automatically generate a range of possible laws that satisfy the tests.