Jason Morris
  • About Jason
  • Projects
  • Rules as Code Diary

Rules as Code Diary

Research, Learn, Code, Share, Repeat.

June 22, 2021

ICAIL 2021: Part 2

Perhaps the most interesting part of the first day of ICAIL 2021 proper is a presentation by Dr. Alice Witt, entitled Converting Copyright Legislation into Machine-Executable Code: Interpretation, Coding Validation and Legal Alignment. The presentation is available on YouTube here. Let me first say that this is the first time that I have seen a paper on Rules as Code at ICAIL, and it is nice to see it getting the attention that it deserves in that forum.
June 22, 2021

ICAIL 2021: Part 1

ICAIL is the International Conference on Artificial Intelligence and Law. It is held bi-annually, and it is currently being “hosted” virtually in Sao Paulo, Brazil. You can “attend” it virtually by going to the Associação Lawgorithm youtube channel and following along with the live presentations today, tomorrow, and Thursday. On the Monday and Friday of the conference there are typically a number of parallel workshops. Yesterday I followed along with the Explainable and Responsible AI in Law workshop, which was very interesting.
May 28, 2021

“Rules as Code” Extended Abstract to appear in ICAIL ’21 Proceedings

The International Conference on Artificial Intelligence and Law is a renowned international academic conference on law and artificial intelligence. It is held every two years. In 2019, I had the pleasure of attending in order to present a demonstration of work that was part of my LLM in Computational Law at the University of Alberta. I’m happy to share that I will be “attending” again this year. ICAIL ’21 will be publishing an extended abstract of mine, which is one level above a demonstration.
May 24, 2021

Need Legal Tech? Hire an Architect.

Today at SMU CCLaw we had a seminar from Dr. Joaquín Arias Herrero of the Universidad Rey Juan Carlos in Spain. Dr. Arias is one of the researchers responsible for s(CASP), which is my new favourite programming language for Rules as Code. I was delighted to learn about the existence of s(CASP) late last year. I have been spending a lot of time working in it in the first half of 2021, and that delight has not diminished.
May 15, 2021

How Rules as Code Makes Laws Better

I want to give you an intuition for why Rules as Code in logical tools like s(CASP) makes laws better. Let’s imagine that you are the legal knowledge engineer assigned to the Rules as Code process for drafting the Rock Paper Scissors Act of 2021. The purpose of the Rock Paper Scissors Act is to set out the official rules of who is the winner of a game of Rock Paper Scissors.
May 11, 2021

Inaugural International Law Lab Showcase Tomorrow!

The International Law Lab Showcase is an online meetup of innovation and technology labs at law schools around the world. It is an opportunity for the members of these labs to meet one another, and for people interested in how these innovative institutions operate to come ask questions. If you are interested in attending a law school with an innovation and technology lab, or if you are a law school interested in starting one, this is where you should be.
May 11, 2021

Open Source Legal Expert Systems Video (3m)

May 5, 2021

Introducing L4-Docassemble

At SMU’s Centre for Computational Law we are working on an open source domain specific language for law, called L4. The idea is that you should be able to write legal rules, like laws or contracts, in L4, and other applications should be able to translate that encoding into other forms to do useful things. One of the useful things that we want people to be able to do with L4 is to build expert systems.
March 24, 2021

Legal Drafting to Avoid Computational Complexity

I was working on an s(CASP) encoding last week, and learned something that gave me a better intuition for how to encode things well. I needed to encode what counted as a business, and there were two things. I needed to encode what counted as a business entity, and there were 7 things, each of which required a business, which meant there were 14 possibilities total. Then I needed to encode what counted as an executive appointment, and there were three.
March 6, 2021

Modelling the World, the Law, and the Question

I’ve been spending a lot of time recently thinking about the problem of choosing how to model things when doing automated legal reasoning. What is a Model? Just so we’re on the same page, when I talk about a model, there is a real thing, of some sort, and there is a representation of that thing in a language which is useful for some reason. The representation is the model, and the language is the modelling language.
February 19, 2021

… and why it matters for Rules as Code

Yesterday I posted about what justified stable model query-driven constraint answer set programming is. Now let me tell you a little bit about why I think all of that matters. Defeasibility The higher-order logic features of s(CASP) make it very easy to implement forms of defeasibility the way it is implemented in legal writing, which is that the relationship is noted only in the default, or in the exception, but not in both.
February 18, 2021

What is Justified Stable Model Constraint Query-Driven Answer Set Programming?

I spent some time today trying to understand where s(CASP) fits into the world of programming languages more generally, and here’s what I think is going on. Remember, I’m not an expert. This is my amateur understanding after playing with it for a few days. What is the “Usual” type of programming language? The usual paradigm for programming languages is called imperative programming, in which you basically tell the computer what to do, and in what order.
February 16, 2021

s(CASP) as a Rules as Code Tool

OK, I think I’m going to call it. Flora-2 is no longer my favourite tool for doing Rules as Code. My new favourite is s(CASP). I’m working on a paper for the International Conference on Artificial Intelligence and Law at work, and I’m doing an experiment, the results of which are blowing me away. I took a piece of legislation recommended by a potential industry partner, and encoded it in s(CASP).
February 9, 2021

How Argumentation Theory Can Be Used in Automating Reasoning about Conflicts of Law

Flora-2 is a logic programming language that implements defeasible reasoning using a method called “defaults and argumentation theories.” Here’s how it works. Choose An Argumentation Theory The first thing you have to do is choose the argumentation theory that you want, but Flora-2 has a very intuitive default. :- use_argumentation_theory. Tag Your Rules Flora-2 gives you the option of specifying that some rules override others either by identifying the rules, or by identifying the conclusions.
February 2, 2021

Are Smart Contracts Legal?

I was pointed by a colleague to a paper on SSRN by two law professors proposing a method for making smart contracts “legal.” What they mean, I take it, is that they want to make sure that smart contracts are enforceable in court the way “normal” contracts are. And the method they propose is a combination of natural language and code. This is similar to the way clause.io uses blocks of natural language text combined with parallel blocks of code to allow you to generate smart contracts.
January 17, 2021

Blawx Dev Notes

I took the opportunity over the last couple of days to spend some time working on long-planned upgrades to Blawx. It has been partly successful, and partly an exercise in frustration. The frustration comes from the fact that I’m working with limited processing power here in my hotel room in Singapore, having only brought a Surface Go tablet with me for writing code. To get any further, I think I’m going to have to bite the bullet and pay for a development server.
January 15, 2021

World Logic Day 2021 (Bob knows my name!)

January 14, 2021 was “World Logic Day”, and in celebration of it the Department of Computing Science at the University of Texas Dallas invited Robert Kowalski to give a speech on Logical English. If you don’t know who Dr. Robert Kowalski is, he more or less invented logic programming in the 1970s. In the logic programming community, he is a “big deal.” He is also the first person I’m aware of to have used logic programming languages as a knowledge representation tool for legislation.
January 10, 2021

New Year, New Look, New Flora-2

I thought that given it is a new year, it was time to refresh the way the Diary looks. So the Diary has become a publication on Medium, which you can follow without needing to follow me personally, and to which I can add other members of the SMU Centre for Computational Law team. I would love it if you would share the link to the diary with your friends networks interested in Rules as Code, Smart Contracts, Legal Tech, and Computational Law.
December 31, 2020

Explainable Event Calculus in Carneades

If you’ve been following along for the last few weeks, you know that I’ve been playing with different methods of representing event calculus, and aiming at being able to explain the outcomes. This week I’d like to show you an experiment I did with a tool called Carneades. Carneades is named for the ancient Greek philosopher who was famous for having travelled to Rome and given two lectures in two days.
December 23, 2020

Encoding Covid-19 rules using Basic Event Calculus in s(CASP)

Alright, fellow legal nerds, let’s get deep in the weeds, here. What is Event Calculus? A “calculus” is a way of reasoning about something. Event Calculus is a way of reasoning about events, and their consequences. I use consequences here to mean “what happens after those events have occured, and because those events have occurred.” So it is a calculus of causes, and a calculus of time. What is Discrete Event Calculus?
December 15, 2020

Explainable Legal AI in s(CASP)

So yesterday, I learned about something called s(CASP) that I needed to try. Today I tried it. And it’s awesome. Here’s how it went. Background I actually came across s(CASP) by accident while looking for something else. The name, I take it, means stable model constraint answer set programming. Which is the sort of name only a computer scientist could love. It was created by a team at the Joaquin Arias, Zhuo Chen, Manuel Carro, and Gopal Gupta at the IMDEA Software Institute at Universidad Politecnica de Madrid.
December 7, 2020

Untying Complicated “Not”s, a Wrap on Coding the Law 2020, and Singapore…

I’m working on some materials to help bring our junior researchers up to speed on Flora-2, and I noticed something interesting when trying to explain how Flora-2 does negation differently than other logic programming languages. Three Nots In Flora-2 there are three different ways of saying “not”, and they all mean different things. Classical Negation Classical negation comes from formal logic, and is expressed using the operator \neg. If you say \neg raining, what you are saying is that the truth-value of the statement raining is known to be false.
December 1, 2020

Jason’s Timepoint Algebra

If you’ve been following along over the last few weeks, you will know that I’ve been working on writing some code to do reasoning about time. I’ve been working on Allen Interval Algebra, but in order to use Allen Interval Algebra you need to model your problem as a set of intervals. That is to say, you need to model the things that happen as happening over a period of time, as opposed to at a specific time.
November 19, 2020

Progress on Allen Interval Algebra

This has been a very busy week, with 3 guest lectures at Sciences Po, and a Rules as Code presentation for the OECD’s Governing After Shock web conference, plus a prep meeting for the Canada School of Public Service Open Government conference next week, which I understand is expecting more than 3000 attendees. If you’d like to register, follow the link. But I have a little progress to report on the Allen Interval Algebra library I was telling you about last week.
November 13, 2020

Getting Smarter about Time

Let’s say I’m building a web app that tells you whether or not you are allowed to drive based on whether or not you have a license. Easy. You check a box that says you have a license, and I say “yes” or “no” based on whether or not you have the license. But you don’t always want to know about right now. Maybe you got a ticket last week, and you want to know if you were legal to drive then.
November 5, 2020

More Explanations, Encoding SAFE again, and Twitch

If you read my last blog post about generating explanations for Flora-2 statements, you may recall that the explanation was full of a lot of symbols that were difficult to read. That problem has been greatly improved, so the explanation for “is Pugsley a sibling of Wednesday” looks like this: Goal: Wednesday has a sibling, Pugsley is satisfied. We know this because there is a rule: two people are siblings if all of the parents of the first person are also parents of the second person Subgoal: (Wednesday is a Person and (Pugsley is a Person and (it is not true that ((an object A has a child, Wednesday and an object A is a Person) and (it is not true that an object A has a child, Pugsley))))) is not satisfied.
October 27, 2020

Progress on Explanations

So this week I have been working on automatically generating explanations for answers generated from Ergo Lite queries. I decided on a working title for the explanation module of “xf2”, for “eXplainable Flora-2.” My working repo is here, if you’re interested in looking at the code. So far, what we’ve got is explanations generated in a tree structure, using rule descriptions provided by the user, for variable-free queries that were answered using rules, conjunction (and), disjunction (or), negation (not), and user-specified facts.
October 23, 2020

Adding Explanations to Blawx

Blawx is my web-based tool for Rules as Code. It is a graphical development environment that allows you to easily learn to encode legal knowledge, describe fact scenarios, and ask questions and get answers. One of the features that is missing from Blawx is explanations for those answers. Explanations are a very important part of Rules as Code for two reasons. First, they provide the user with context and reasons for the results that your tool provides, which goes to the accountability and transparency of your tool, and increases its trustworthiness.
October 20, 2020

Progress on DADataType

This week we made some progress bringing features of top-of-the-class logic programming tools to open source. If you are using a tool like Oracle Intelligent Advisor, or Neota Logic, for example, you can follow these steps: Describe the domain. For example, you might explain to the tool that a game has two players and a winner, players throw a sign, the signs are Rock, Paper, and Scissors. Encode the rules.
October 8, 2020

SAFE in Drools

This week I had the opportunity to spend more time playing with Drools, and I now have something that actually works. It’s not perfect, but it does generate correct answers. Let me give you a tour. What’s SAFE? “SAFE” is Y-Combinator’s Simple Agreement for Future Equity. It is a contract that is designed to allow an investor to buy part of your startup company, right away, without you needing to go through the hassle of issuing non-voting shares, waiting for other investors to be ready to pay, etc.
  • ««
  • «
  • 1
  • 2
  • 3
  • 4
  • »
  • »»
© Jason Morris 2023