Link Search Menu Expand Document


Legislation: executionLegislation: representation
Main research: January 2022


  1. What does it claim to do?
  2. Substantiation of claims & potential issues
  3. How might the end-user assess effectiveness?
  4. What form does it take?
  5. Is it currently in use?
  6. The creators
  7. Jurisdiction
  8. License

What does it claim to do?

Blawx is a web-based tool that combines visual rule representation with a legal reasoning engine. It is intended to enable non-technical end-users to write automated rules, by simplifying their input and presentation. Blawx combines this interface with a legal reasoning engine that can answer questions using the provided ruleset.

Claimed essential features

  • Provides an easy-to-use visual interface for encoding legal rules.
  • Enables testing of the results of encoded rules.

“Blawx is a friendly web-based tool for encoding and testing and using rules using declarative logic.” (Github repository; archived)

“Add Legal AI to Any Tool that can Access the Web” (Blawx homepage; archived)

“Make Rules, Laws, and Contracts Testable” (Blawx homepage; archived)

Claimed rationale and benefits

  • To produce better rules by writing executable and natural language versions simultaneously.
  • To enable compliance by design of software that embeds legal and regulatory rules.

“Rules as Code is the idea that if you write rules in a programming language at the same time you write them in a natural language, you end up with better rules, and you make it easier for people to automate implementations of those rules. The best programming languages for encoding rules are declarative logic programming languages, but most of them are too hard to learn and use.” (Github repository; archived)

“The encodings of the rules created in the Rules as Code process can be used as the source code for applications that implement those rules. The encodings can also be used as a system against which other software can be tested for compliance with the rules, including after the rules change. The benefits to the improved drafting also carry forward to the automation stage, as better-drafted rules are easier to automate.” (Lexpedite: How does Rules as Code improve service automation?; archived)

Claimed design choices

  • The front-end is based on Google’s Blockly visual programming framework.
  • Uses the answer set programming language s(CASP), based on Prolog.
  • The focus is on writing individual rules, rather than describing processes.

“The front-end [of Blawx] is a web app based on Google’s Blockly framework for visual programming environments.” (Github repository; archived)

Google Blockly is an open source visual editor library for general-purpose programming that makes writing code easier for non-experts. It abstracts away some complexities of programming, for example by removing the need for perfect syntax, by grouping similar elements by colour, and by representing elements’ relationships in a visual structure.

In Blockly, “parts of the programming language are represented as pieces of a puzzle. If the user attempts to place a piece of code where it does not belong, the piece won’t ‘fit’.” (“Blawx: Rules as Code Demonstration” paper; archived)

“Blawx is an open source, web-based, user-friendly interface to the s(CASP) programming language built on Google’s Blockly library, intended for use in encoding legislation and contracts.” (Blawx Documentation – About Blawx; archived)

“Write Rules, Not Processes” (Blawx homepage; archived), i.e. focus on codifying individual rules rather than the logical flow between them.


Substantiation of claims & potential issues

  • Depending on the quality of the translation of legal provisions into Blawx representations, the output might not be legally sound (but note that the author of Blawx explicitly states that it is a proof-of-concept and should not be used for real-world purposes).
  • Those coding Blawx interpretations of the law may not have the legal authority to conclusively determine the meaning of the rules (since they will usually not be working in a judicial capacity). This could be problematic if they are relied upon as authoritative statements of the law and are assumed to have legal effect.
  • Maintaining Blawx representations of legal provisions may impose significant overhead due to changing judicial interpretations of (i) the original legal provisions, and (ii) fundamental rights that impact their application.
  • There may be a risk that Blawx is used to formalise areas of law that are necessarily too complex or ambiguous for the kind of deductive reasoning the system is capable of.

“Blawx is an open source, web-based, user-friendly interface to the s(CASP) programming language built on Google’s Blockly library, intended for use in encoding legislation and contracts.” (Blawx documentation – About Blawx; archived)


  • Blawx allows processing of legislation and contracts.
  • One can add the text of law into the system and manually create its representation.



An image of the front-end visual editor, taken from



How might the end-user assess effectiveness?

The code is freely downloadable and can be installed on a local machine. A demo can be tried at

Assessment of (i) the editor interface’s efficacy, (ii) its conversion of the visual representation into code compatible with the s(CASP) reasoning engine, and (iii) the resulting output of the reasoner will depend on what the end-user expects. This will partly be about comparing how the original textual rules would be interpreted on the one hand with the results provided by the system on the other.

Some examples are given in the Blawx documentation at


What form does it take?


Proof-of-concept, Component, Application


The Github repository refers to Blawx as a proof of concept: “Is this software production ready? No. Blawx is a proof of concept. It is appropriate for use in Rules as Code experiments, but not in production environments. At least not yet.” (Github repository; archived). At numerous other points the project’s pages refer to it as being ‘alpha software’, i.e. not yet ready for real-world use.

The system can in principle be combined with other systems via its API and module for Docassemble (a system for connecting web-based interviews to Blawx) (Github repository blawx/docassemble-blawx; archived).


Is it in current use?

Blawx is mooted as a proof of concept and as alpha software not yet ready for production use.


The creators

Created by

Legal tech company, Independent developers


Blawx’s main developer is Jason Morris, who runs a legal tech company called Lexpedite Legal Technologies Ltd (



Background of developers

Canada. The firm behind the project is based in Alberta, and its principal developer is Canadian.

Target jurisdiction

In principle compatible with any (legal) rules that can be expressed using declarative logic.

Target legal domains




Blawx is open source, made available under the permissive MIT license. Its code is published on Github (Github repository; archived).


Updated Top