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. …


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.

One example problem in temporal logic is the sentence “John was not in the room when I touched the switch to turn on the light.” …


The Human Thing I Want The Computer To Do

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. …


Image for post
Image for post
Jason streaming Flora-2 Coding on 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. …

Image for post
Image for post
Output of XF2 explaining how it knows Pugsley is Wednesday’s sibling.

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.

That’s a sort of low-level list of things that Ergo Lite can do, but it’s a good start to prove the concept. …


Image for post
Image for post
ErgoLite code in a text editor

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. …


Image for post
Image for post
A question screen from a Docassemble interview

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:

  1. 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.
  2. Encode the rules.
    For example, you might explain to the tool that Rock beats Scissors, Scissors beats Paper, and Paper beats Rock. …

Image for post
Image for post
Output of drl_safe in a terminal window

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.

The rules that I’m encoding here are the version of the SAFE that has both discount rates and valuation caps. …


Video of Legislative Drafting Conference Presentation

I did an introduction to Rules as Code and demonstration of Blawx for the Canadian Institute for the Administration of Justice’s 2020 Legislative Drafters Conference. As promised, the video is now available on YouTube. If you hae 20 minutes, check it out at https://youtu.be/bzBouePm5Js, or watch it here:

Learning Drools

I’ve been spending a lot of time over the last couple of weeks trying to get my fingers dirty with Drools, which is an open source BRMS tool for Java.

Here’s how I imagine it was named: Someone wanted to use rules in Java, so they built something called Java Rules, abbreviated it to JRules, realized that would be pronounced “Drools” anyway, and went with the more intuitive spelling. I might be wrong, but I like that story, so I’m not even checking. …


Electronic Files and the Naive Analogy

When I started running a virtual law firm, I went to a lot of trouble to make sure that all of the pieces of information about one of my clients’ matters were all in the same place. Emails were converted to PDF, and stored in some single source of truth location, like an electronic version of a case file.

That was a giant waste of time. Now, emails live where they live, documents live somewhere else, invoices in a third place, and they are all linked by a reliable matter naming tool. If I need to find anything, I know where it is. …

About

Jason Morris

Lawyer, Round Table Law; 2018/2019 ABA Innovation Fellow; Sessional Instructor, University of Alberta; Computational Law (Symbolic AI) Researcher, CCLaw @ SMU

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store