Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Can you compile laws?
3 points by danschumann on June 29, 2015 | hide | past | favorite | 9 comments
Laws are logical somewhat similar to how computer code is logical.

Should we(HN community) make a compiler that can both analyze logical errors and compact laws?

I think Washington is a bit code-bloated, and it would probably be better if it was more nimble.

Thoughts?



Laws are not similar to code. Laws are abstract and their implementation requires non-deterministic judgement and interpretation, which is why we have judges. They are the terrain of the game through which the modern trial-by-(lawyerly)-combat is performed. That game more closely resembles Mao than it does Go.


The life of the law has not been logic; it has been experience... The law embodies the story of a nation's development through many centuries, and it cannot be dealt with as if it contained only the axioms and corollaries of a book of mathematics. -- Oliver Wendell Holmes

https://en.wikipedia.org/wiki/Oliver_Wendell_Holmes,_Jr.


While laws can be seen as more complex than some simple - straightforward, deterministic - logic of a program, modern programming evolve fast to include more complex models.

Advancements of machine learning, applications of Bayesian networks can produce programs with outputs similar to applications of laws. Laws themselves - by their nature - have to have an abstract element in them and a degree of generality, which makes them similar to computer code. It is those other features of laws which represent difficulties - from a programmer standpoint - which are left to be modeled with enough accuracy to be useful.


Aristotle wrote that laws are for the general case and judges for the specific. In other words, they are guidelines but you want a human to interpret them and apply them to a concrete situation. Hence "hard cases make bad law." And just the other day someone here was asking about the value of reading the Classics. :-)


You can play with Prolog or rule-based programming.

https://en.wikipedia.org/wiki/Rule-based_system

For some laws, it should be possible to detect flaws or inconsistencies.


Flaws and inconsistencies are usually introduced with negation. A very neat theory for negation in first-order rule-based systems called "Well-Founded Semantics" (https://en.wikipedia.org/wiki/Well-founded_semantics) has the "side-effect" of assigning the "undefined" logical value to propositions that can't be proven true or false in a well-founded manner (think Russel and his barber). People have experimented with Prolog, the Well-Founded Semantics and rules used to infer information about mental disorders (http://www.psychiatry.org/practice/dsm) in exactly the context mentioned here. Maybe unsurprisingly, some of those rules were found to be...unfounded (pun intended) :)


there is some research in this field from members of my faculty check this links to get started:

https://scholar.google.com.ar/scholar?safe=off&es_sm=122&bav...

http://ed.fbk.eu/people/sisai/home/publications_files/pdf/cl...


https://www.judicata.com/ is less compiling code and more pattern recognition and mapping, like a genome.


Making the assumption that laws are like code with strictly defined execution paths makes you lose out on jury nullification, among other benefits.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: