Larry Lessig is famous for, among many other things, his dictum that "Code is law," meaning that code in both legal and computer senses is a means of social control. Turns out, unsurprisingly, that people at his former home of Stanford University are working to see if they can actually make laws into computer code.

The wonderfully named Hammurabi Project from Stanford's Center for Computers and Law is converting a few patches of U.S. legislation into machine readable C# in an attempt to express the logic and relationships of those provisions in a way that might allow facts to be plugged in and a useful conclusion to be emitted.

I'm going to quote the Project Rationale in full, because I think it expresses well the sense of frustration anyone must feel coming to law from the outside (or, in many cases, even as an insider) and encountering its hypercomplexity:

Around the world, there are millions of pages of law – constitutions, statutes, regulations, case law, and interpretive decisions – with which societies are expected to comply. This mass of material is logically complicated, referentially byzantine, terminologically inaccessible, difficult to contextualize, and sometimes vague and ambiguous. Aside from the ethical issues caused by this complexity, it is grossly inefficient as an information system. The capital required for an actor to understand a legal right or obligation is a wasted resource that creates drag on individual, corporate, and social progress.

Though not often thought of this way, law is inherently computational. It is a set of algorithms that prescribe how various computations are to be carried out. What is my standard (tax) deduction? Am I eligible for family and medical leave? On what day did I become liable for unemployment taxes? Determinations such as these are like mathematical functions: given various inputs, they produce corresponding outputs.

The Hammurabi Project provides a vehicle for representing portions of the law in an executable format, so that the process of logical inference can be offloaded from human to machine. Once executable, it can be embedded into our computing infrastructure where it can drive other applications.

Information technology and computational power have become increasingly sophisticated, almost exponentially so; and it would be a fool who said that this thing will never fly. And it does represent one scenario for the "end game," as it were, of ever increasing legal complexity, the alternative being collapse of the system. So put this in the back of your minds while you're debating whether or not to abandon hourly billing or to build a client portal.

The coders are coming, the coders are coming.

[hat tip: @SapnaLawPC]

Simon Fodden is the founder of Slaw. He taught law at Osgoode Hall Law School for more than 30 years before he retired to focus on writing, publishing, and IT and law.
[click on the author's name for more information]

up

4 Comments on “Law Might Be Code”

  1. David Collier-Brown says:

    As a programmer and logician who chancesto have legal draftspersons as friends, the law looks to me like a "semi-infinite set of co-routines, all executing concurrently, using a small integer number of global variables".

    I think it's a cool project: I fear it might be computationally infeasible (;-))

    –dave

  2. Robert Richards says:

    Mr. Poulshock has written more on his approach to legal technology in in post entitled "Rule-based Legal Information Systems," at VoxPopuLII: http://tinyurl.com/3jnf7zt

  3. David Cheifetz says:

    Dave

    Areas of law are certainly "computationally feasible" – nice term (g). Law itself? It's currently as computationally infeasible" – nicer term – as religion, for the same reason. An explanation of that reason? That reason? I recommend David Gerrold's, When HARLIE Was One: Release 2.0

  4. John Gregory says:

    The kinds of examples given in the Stanford text are the easy ones: does someone meet a specified criterion, or set of criteria? It will be harder when one gets to standards of reasonability, in part because people often have an incentive to test the boundaries of reasonableness. Also, facts can be complicated. So deciding if someone has taken reasonable steps to avoid a reasonably foreseeable harm will be hard to program.

    To some extent as well, the law relies on human judgment, not only among judges, but among juries – counting on them to be humane not just rational. I don't think C# has the empathy function yet. That's not just a matter of computational infeasability, i.e. lack of processing power available in the relevant future. In other words, it's not just a practical difficulty, it's a theoretical difference.

    There are other reasons why law may be inexact, including the inability or unwillingness of lawmakers to be as precise as possible. Precision is only one possible value in lawmaking.

    We've certainly learned in my lifetime in the law that computers can be hugely useful to some formss of legal analysis, so the Stanford project is worth pursuing. We should not expect it to produce a Code that is comprehensive.

Make a comment:

Note that some comments may be moderated. If you have not had an approved comment here before, your comment will be held for approval. We are glad to publish comments that address issues raised in the post or other comments on it and that contribute to a fruitful discussion. We do not publish comments that seek to promote commercial products, that make personal attacks, or that seek personal legal advice.

Although we do not require it, we ask that in making a comment you use your full name. You must supply a valid email address, which will not appear with your comment.

 

SlawTips      

SlawTips Good Communications = Satisfied Clients
Thursday, February 23

As Richard Ferguson, a lawyer friend of ours says on his email message: “People may forget what you said…. People may forget what you did…. but people will never forget … »»

Practice

SlawTips Current Awareness
Wednesday, February 22

There are two possible approaches to personal current awareness: Develop excellent searching skills so that you can find what you need when you need it Pick a fairly narrow specialty … »»

Research

SlawTips Top 10 Financial Errors: #10 Rely on the Lottery for Your Partnership Retirement Plan
Thursday, February 16

“It is better to have a permanent income than to be fascinating” was said once by Oscar Wilde. The final tip in this series is the capstone issue in our … »»

Practice

noted on Slaw    

MLB Selected Case Summaries    

These summaries of selected recent cases are provided each week to Slaw by Maritime Law Book.
More information.

  • Limitation of Actions - Actions in contract - Actions for debt - General

    Moody died on December 3, 2005, leaving four adult children. Pursuant to Moody’s will two of her children, James and Tyrell, were appointed executors of the estate. It was alleged that, during her ...

  • Barristers and Solicitors - Discipline - Suspension - For professional misconduct

    McLean pled guilty five counts of conduct unbecoming a lawyer. The Discipline Committee suspended him from practice for four months and placed him on indefinite supervision. McLean appealed the length of the penalty.

    The Saskatchewan ...

  • Mines and Minerals - Operation of mines, quarries and wells - Licences and permits - Appeals or judicial review - Standing - Costs

    Grizzly Resources Ltd. (Grizzly). made an applications to the Energy Resources Conservation Board to drill two sour gas wells on the same site. ...

  • Narcotic Control - Offences - Trafficking - Elements of

    The accused was charged with trafficking in cocaine. The trial judge granted the accused’s motion to discharge the charge. The Crown appealed.

    The Saskatchewan Court of Appeal allowed the appeal and ordered a new trial.

    Link ...


TalkLaw/ParLoi    

This is a listing of a few upcoming events in Canada of interest to lawyers, law students, legal librarians, and others involved in the practice of law.

Clicking on any event in the list below will give you access to more information and to links allowing you to see the full entry and to add the event to your own calendar.

Click this link for a fuller version of the TalkLaw/ParLoi calendar of events and for instructions as to how to add events and calendars to your own calendar.

Switch to our mobile site