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

Rules as Code Diary

Research, Learn, Code, Share, Repeat.

April 12, 2023

GPT4 and Rules as Code

With the release of GPT4, and in particular with the demo video showing ChatGPT4 being used to answer a question about tax laws, people have been asking my thoughts about whether Rules as Code is still necessary. Should we be getting human beings to deal with encodings of legislaton, or should we just let large language models do the legal reasoning? Are there parts of the Rules as Code process that should be dealt with by things like GPT4?
April 6, 2023

LitCon, DocaCon, ICLP, Event Reasoning

LITCon 2023 On Monday I had the opportunity to participate in LITCon 2023, a conference put on by the Legal Innovation and Technology Lab (LITLab) at Suffolk Law. LITLab is run by David Colarusso, who was the person who first introduced me to declarative logic programming for legal knowledge representation years ago. Perhaps my favourite part of the conference was the presentations done by LITLab students on the projects that they had built.
March 13, 2023

Long Time No Blog

Wow, it’s been nearly a year since I updated the blog? Wild. First thing to note, the address has changed. Now that I understand better how to use multiple email addresses with the same GitHub account, I’ve moved this blog to my personal GitHub account, so you will now find it at https://gauntlet173.github.io/. Assuming Microsoft doesn’t become some sort of evil overlord, it should be able to live here for a while.
June 23, 2022

Relevance in Blawx with s(CASP)

This post describes a method that I have implemented in v1.3.15-alpha of Blawx for using abductive reasoning features of the s(CASP) programming langauge to power relevance decisions in expert systems. I’ll try to give you a brief introduction to what problem we’re trying to solve, how it has been solved before, how I have solved it in Blawx, and how those solutions differ. The Problem An expert system is a sort of application that takes a knowledge representation, in most cases a declarative logic description of a set of rules, and a question that it has been asked to answer, and then attempts to answer the question.
June 16, 2022

Rules as Code, ?, Profit

Long time no blog! There have been lots of big, exciting changes to Blawx over the last while. I’m now working on getting the documentation caught up. When that’s done, I promise I’ll come back and do a big post about Blawx. Today, I just want to talk about an idea I’ve been developing over the last few days. What’s Phase 2? When we talk about Rules as Code, we tend to talk in abstract terms.
May 9, 2022

Blawx Development Update and Other News

It’s been a while since I did a blog about the changes to Blawx, so let’s get you caught up! Spans For reasons that will be clear shortly, we needed a way to delineate and name parts of a paragraph of text. So I made some changes to CLEAN so that you can use the following format to be able to treat spans of legal text as though they were a sub-part of the law.
March 14, 2022

Recap of Rules As Code 2.0 Plenary

Rather than me repeating it here, you can check out my live tweet of the final session. My Thoughts I’m not sure if I’m surprised, or not, but there was almost no consensus on anything, except that we should experiment concretely, not debate abstractly, the tools should be explainable, and the products of the work should be publicly accessible and usable, not behind proprietary technologies or pay walls. Honestly, at LEAST getting consensus on the need for explainability is a step in the right direction.
March 11, 2022

New Blawx, Rules as Code 2.0 Plenary, SMU Conference Vids Available

TL;DR There is a new version of Blawx, live online, that allows you to edit legislation in a markdown-like language called Clean. I will be participating in a conference on Monday on Rules as Code 2.0, looking at how we generate the skilled workforce that rules as code requires. Registration is free and highly recommended. Videos from the SMU Computational Legal Studies conference are available online. Blawx Update I’m working with the Canada School of Public Service on developing Blawx as a platform for learning projects in the Rules as Code space.
March 7, 2022

Introducing CLEAN - Markdown for Akoma Ntoso

The Problem I made a number of changes to Blawx that makes it possible to organize your code according to the pieces of the legislation. This is the first of a number of improvements that are all designed to let you use Blawx to do a structurally-isomorphic encoding of the legislation. The problem was that the initial version did not provide any good way to edit the Akoma Ntoso source code for the legislation.
February 24, 2022

Code vs. No-Code

There was a conversation on Twitter this week that helped to clarify my thinking about something, and I wanted to share. There is a sort of tension between “code” and “no-code” (sometimes “low-code”) solutions. People who consider themselves software developers see people trying to use no-code solutions to do things that the no-code solutions are not good at, and they get frustrated that the capabilities of those tools has been overestimated.
February 24, 2022

Progress on Blawx, SMU Conference, Beeck Centre Rules as Code Paper

Progress on Blawx Just a quick note to let you know what I’ve been doing with Blawx over the last few weeks. Blawx was originally a single web page that could contain a single workspace of code, much like an IDE that could only have one file open at a time. Version 1 changed that by creating “workspaces” that are saved server-side, and giving you the ability to create multiple workspaces and edit each one separately.
February 16, 2022

Using OpenFisca to Power Expert Systems in the Canadian Public Service: Lessons Learned

Using OpenFisca to Power Expert Systems in the Canadian Public Service: Lessons Learned This is a draft of a paper being prepared for the Singapore Management University Centre for Computational Law’s Computational Legal Studies Conference 2022. Abstract The paper demonstrates an approach to encoding legislation in OpenFisca, and an approach to using the OpenFisca API, which in combination can be used to obtain many of the features required for legal expert system development.
February 8, 2022

Legal Documents in Blawx, Take 2

Background A couple of blog posts ago I talked about how I was working on a way of getting information about statutes into Blawx, so that they could be used for generating explanations, cross-references, and links to source material. Playing around with it that way gave me what I needed to know in terms of the data structure that I needed to fill, but it also taught me that the block-based interface was painful for drafting rules.
February 2, 2022

Announcing Blawx v1.0.0-alpha

Announcing Blawx v1.0.0-alpha I’m very happy to announce the release of Blawx v1.0.0-alpha. What is Blawx? Blawx is an open source, web-based, user-friendly tool for Rules as Code. It allows you to take what you know about laws, regulations, or contracts, and describe them to the computer in a simple but powerful block-based visual language. In September of 2020 it was awarded second place in the startup category of the American Legal Technology Awards.
January 23, 2022

Encoding Legal Documents in Blawx

I’ve been spending some time recently working on adding a way to describe legal documents to the development version of Blawx.com. Objectives Big picture, I want to have a data structure inside Blawx that is going to allow people to cite the authority for rules using a specific reference, as pictured here: Importing The structure should allow the user to add to and modify information imported from a structured source, such as a LegalDocML file.
January 17, 2022

Debugging Tax Forms with Lean: Chris Bailey at ProLaLa 2022

Chris Bailey’s ProLaLa 2022 Presentation As I mentioned in the last blog post, Chris Bailey’s presentation at ProLaLa 2022 sort of requires its own blog post in response. I didn’t take any screenshots of Chris’ presentation, because he just shared his VS Code window. The sourcecode is available online. It might help to read this first, though. Chris is a law student at the University of Illinois, and spoke about creating a library of encoded legal components that would be useable for formal verification-like tasks or software development tasks, both.
January 17, 2022

Notes from Prolala 2022

I had the opportunity to participate in Programming Languages and the Law (ProLaLa 2022), a workshop held as part of the Principles of Programming Languages 2022 conference (POPL 2022). All of the day’s events are available to watch on YouTube. It’s sort of hard to imagine an academic conference with a topic closer to my interests, and it did not disappoint. Here’s an extremely succinct version of what went down.
January 9, 2022

Avoiding the Clause Order Hassle in s(CASP)

The Clause Order Hassle Learning to use s(CASP) to encode legislation over the course of the last year or so has been at times frustrating. The reason for that is that I would often find myself with code that did not work as expected, and I could not understand why. Then, I would make changes, usually by changing the order of the lines of code, or by changing the number of predicates I was using, and the code would start to work.
December 30, 2021

Constraining Dates in s(CASP)

I’ve been playing around with an s(CASP) library for doing date math over the last little while, and finally found some time today to test it with s(CASP)’s ability to do constraints over reals. I was interested to see if there was a way that we could convert the dates into timestamps and then have s(CASP) treat them as a constraint. The Problem Here’s my imaginary scenario. I am allowed to do something on any day that is in both the first and last 200 days of 2021.
December 29, 2021

New Year, New Blog (Again)

Here we go again! In what risks becoming an annual tradition, around here, I’ve decided to move the Rules as Code Diary away from Medium into a self-hosted blog built with hugo. This is mainly motivated by the fact that a lot of what I’m writing these days is actually code, and Medium is pretty limited in terms of what it can do to display code typed into the editor. Hugo, on the other hand, will show you more or less whatever I can type into a markdown document, with syntax highlighting.
December 20, 2021

Rules as Code Diary 2020–2021 in Review

It’s traditional at the end of the year to look back and see where you started, and how far you have come. I’m going to extend the look back to 2020, because I started Computational Law Diary half way through 2020. A Little Personal Background I started my full-time career in computational law about the same time that I started the Computational Law Diary in July of 2020. I spent one year with the Singapore Management University Centre for Computational Law, as the Principal Research Engineer in Symbolic Artificial Intelligence.
December 16, 2021

Explainable OpenFisca

Following up on the plan I wrote about a few days ago… By exposing all of the intermediate conclusions, and by adding separate variables that represent whether the primary variables are “known,” I’ve managed to create an encoding in OpenFisca that is capable of doing some cool stuff over the Web API. You can see the source code in this GitHub repository, and the demos/explanations.py file demonstrates the use of the OpenFisca Web API with my rules as code encoding in Python.
December 8, 2021

Using OpenFisca as an Expert System Engine

At Service Canada we are working on a new tool to help Canadians to plan for retirement. And we are experimenting with implementing that system using a Rules as Code approach. Specifically, we are looking at implementing the rules in OpenFisca. OpenFisca is a leading Rules as Code solution, but it is primarily aimed at microsimulation. Microsimulation is where you create a data model that represents small elements of a population, like people and households, and then encode the effects of different tax and benefit regimes.
December 7, 2021

“Rules as Code” Doesn’t Need Factions

Last December, Denis Merigoux and Liane Huttner presented a paper at the Algorithmic Law Symposium hosted at HEC Paris, on “Catala: Moving Towards the Future of Legal Expert Systems”. I’ve been meaning to take a look for some time, and finally managed it today. [Edit: Denis Merigoux notes in the replies that the version of the paper I viewed was a pre-print before the authors had received the reviewer’s comments, which were only recently received, and some of which are echoed here.
December 1, 2021

Isolating the Legal Logic

Just had a great conversation with a colleague that helped me understand a challenges involved in implementing Rules as Code that hadn’t occured to me before. The objective in Rules as Code is to write an encoding of the legislation that is as re-usable as possible. That means avoiding the temptation to put things into the encoding of the rules that only make sense to include in the context of a particular application.
November 30, 2021

OpenFisca in Google Colab

I blogged recently about the opportunity to use s(CASP) inside SWISH, the web-based development environment for SWI-Prolog. Today it is another web-based development environment for Rules as Code, OpenFisca inside Google Colab. What is OpenFisca? OpenFisca is probably the world’s most popular open source tool for Rules as Code. It is used extensively in France, and is spreading around the world. What is Google Colab(oratory)? Google Colab is a web-based implementation of Jupyter notebooks-a “literate programming” tool for the Python programming language-and Google’s cloud services.
November 19, 2021

talk.RulesAsCode.com-A Community Forum

Rules as Code is a movement in public administration that suggests that the digitization of legislation, regulation, and other rules should happen as early in their life cycle as possible, so as to improve policy design, improve legislative drafting, and massively simplify service automation and building software systems compliant with those rules. It is an international movement, and it is an interdisciplinary movement. It impacts on people inside government, legislatures, regulatory bodies, regulated entities, academia, as well as technologists, lawyers, and more.
November 18, 2021

Scoping for Defeasibility in Flora-2

In yesterday’s post, I talked a little about how it would be nice if there was a way to use legislative scope to refer to sections of law, particularly to implement, in a structurally-isomorphic way, defeasibility statements like “subject to this act and the regulations.” Today I’m going to share a small experiment I did in Flora-2 to see if I can demonstrate a working approach. I’d be interested in your thoughts.
November 17, 2021

What One Section of Law Tells us about what Rules as Code Needs

I’m currently working within Service Canada’s Benefits Delivery Modernization Program, and I’m working with a team that is looking to automate calculations under the Old Age Security Act. I have been looking at various approaches for encoding the relevant sections of the Act, and over the last couple of days I’ve been struck by what a good example section 3(1) of the OAS Act is of the kinds of features that we need in Rules as Code technologies.
November 1, 2021

s(CASP) + SWI-Prolog = 🔥

It was back in December of 2020 that I first learned about a tool called s(CASP). Since then I have written about using s(CASP) to encode Covid-19 rules using basic event calculus, I wrote about how it is my new favourite tool for Rules as Code, I’ve written about what it is, and why that matters for Rules as Code, about how you can use it to make laws better, and I introduced a new tool for user-facing legal expert systems powered by s(CASP) encodings of rules, and published an extended abstract in the ICAIL ’21 proceedings based on an encoding done in s(CASP).
  • ««
  • «
  • 1
  • 2
  • 3
  • 4
  • »
  • »»
© Jason Morris 2023