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.

SlawTips      

SlawTips Cash Flow Reports – Part 2
Thursday, May 24

This is the second in a series of ten tips dealing with cash flow reports and cash flow management. Gregory Nunn once said: “Never underestimate the value of cold cash.”… »»

Practice

SlawTips United Nations Documents
Wednesday, May 23

Today’s Tip: Monitor UN documents with RSS Since I last looked, the United Nations Documents site has a new look and feel. For what the site is trying to deliver, … »»

Research

SlawTips Updated Version of Great Social Media Guide for Lawyers Released
Wednesday, May 23

Last spring, Meritas’ Leadership Institute released a Social Media Guide for Lawyers. This helpful resource provided lawyers with an overview of the three main social media tools — LinkedIn, Faceb. […] »»

Technology

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.

  • Aliens - Exclusion and expulsion - Power to detain and deport - Minister’s certificate - Review - Evidence

    In 2002, Harkat was detained pursuant to a ministerial security certificate issued under the Immigration and Refugee Protection Act (IRPA) as a person inadmissible to Canada on grounds ...

  • Contracts - Formation of contract - Signing - Electronic signature

    The plaintiff expressed an interest in purchasing the defendant’s (vendor’s) condo. The parties agreed to carry on their discussions through e-mail. Following an exchange of e-mails, the plaintiff claimed that the defendant was contractually bound to ...

  • Barristers and Solicitors - Relationship with client - Confidential communications - General

    The petitioner was a Receiver appointed in March 2009 by a California court over the assets of GJB Enterprises Inc. (a “Ponzi scheme”) and its principals, the Berkes (the GJB parties). The court ordered ...

  • Practice - Costs - Funding before judgment - When interim or advance costs available

    The plaintiffs were “direct to home” satellite based subscription program providers. Rex and other defendants offered “grey market” services to Canadian residents to facilitate the unauthorized reception in Canada of the plaintiffs’ ...

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.