(1) First, we need a domain-specific Legal Programming Language—which must support both imperative and logical programming. The rules (laws or contracts or anything else) will be written as algorithms with this language.
The ideal Legal Programming Language would be Domain specific script language supporting simultaneously a Logical, Functional and Object-Oriented paradigms.
(2) Algorithms are commands, but they need to work with legal concepts like “company”, “property”, “to own”, “to transfer” and so on. So, the second element, Ontologies or later even Knowledge Graphs would be responsible for formal description and structured storage of concepts — and other legal knowledge that computer programs need to use.
(3) Special programming language and ontologies would set up an empty model, a model with just abstract commands and concepts. But to operate, the model need data. So, the third element of the framework would be data for automated law — information about the world around us, actions of people and organizations.
To make sure the information is understandable by various systems, there must be a standard of how it would be recorded and stored in a structured form, how it would be used and shared.
Among other things, general standards for structured data would be needed in relation to the Internet of Things — to make sensors and smart devices, such as self-driving cars, industrial robots and smart houses, be compatible with the algorithmic law and future machine-to-machine smart contracts.
(4) The fourth building block would be machine learning technologies (what is commonly called “artificial intelligence”). Since so far there’s no real artificial intelligence as such, we would see its role a little different.
We don’t need machine learning to interpret rules. Because usually it would mean that it would just try to replicate previous decisions, whatever their actual quality is.
What machine learning could help us with, is providing structured information from unstructured sources, just like computer vision does.
At a later stage, machine learning will help to do preliminary work of turning rules into code: it would highlight the parts of rules are poorly compatible with automation and prepare a preliminary draft program code for the parts that are automatable.
(5) The fifth element is a new legal drafting technique that will allow writing rules in a natural language (such as English) in such a way that they are both (1) compatible with automation and (2) are understandable to an average reader.
Among other things, that would require to fight ambiguity in texts, make really structured statements, standardize the language and even sentences structure. It is actually possible that when the laws start being understandable by machines, normal people would also have less trouble understanding the rules.
(6) And the final block of our framework is the role of a human interacting with an automated law system. And there are plenty of roles there. One role would clearly be the control over the system: preliminary control where consequences can be severe and post-control in other cases.
Another key role of humans would be — being experts in a broad sense, to act where machines cannot.
Part of human qualities (such as empathy or intellectual ability to draw conclusions in ambiguous situations) are critical for law enforcement in certain categories of rules. But to make sure we get the most out of those qualities, clear rules should be in place for when a human steps in, what requirements for the user are, what the questions for experts should look like, what the response formats are and so on.
An example of one of those Experts could be a judge. Today a judge would analyse the factual part, the applicable regulation and make their own decision. Sounds reasonable. But judges are just humans and can be biased. There was a great study that has proven that a judge is more likely to give a parole, if they are looking at the case right after they are back from their lunch. Not too reassuring, is it? So, we think what judge should really do, is not making decisions but rather evaluating facts, filling the gaps of automation and feedingfacs to algorithms.
In general, rules created with the framework would be able to be automatically interpreted and executed by the future automated law systems. And where this is not possible, a person would step in to resolve complex situations, after which the system will be able to continue working automatically again.
Speaking about what can be automated — I’d say it’s just 10–20% of norms. Probably not criminal law, but rather technical and administrative regulations, tax law, securities, and parts of commercial law. Basically, where there is more objective data, facts can be checked automatically (or semi-automatically), and at least some of obligations can be performed without humans’ participation.
 Extraneous factors in judicial decisions, Shai Danziger, Jonathan Levav, and Liora Avnaim-Pesso https://www.pnas.org/content/108/17/6889