Representing Legislative Rules as Code: Reducing the Problems of ‘Scaling Up’

19 Pages Posted: 14 Dec 2021

See all articles by Andrew Mowbray

Andrew Mowbray

University of Technology Sydney, Faculty of Law

Philip Chung

University of New South Wales (UNSW Sydney), Faculty of Law and Justice

Graham Greenleaf

University of New South Wales, Faculty of Law

Multiple version iconThere are 2 versions of this paper

Date Written: December 9, 2021

Abstract

Rules as Code (RaC) is a field of research into making human-made rules usable by machines, to perform useful results. The rules to which RaC can be applied include statutes, regulations and many other types of law-related rules, as well as organisational rules such as codes of practice, codes of conduct and business procedures.

This paper outlines an approach to modelling legal rules, particularly legislative rules, that focuses on representing legislation as a hierarchical set of propositions, recording both mechanical structure and real world meaning. It suggests a methodology for expressing these rules in a way that is machine consumable.

The paper describes the progress that has been made by AustLII’s DataLex project in leveraging this form of representation in several ways including automated conversion of existing legislative rules, which can also be described as ‘scaling up’ the production of ‘Rules as Code’. Based on this experience, the paper also demonstrates how the drafting of legislation could be changed to make it directly readable and understandable by humans and also usable by machines.

We explain a number of the conceptual and technical elements of this approach:
• We focus on what rules literally say (not what they do), and to represent that in code.
• yscript is a language used for representing and manipulating propositions, using a quasi-natural-language ‘English-like’ syntax. Syntactically correct yscript rules are able to be run by the yscript interpreter to engage a user in a consultation.
• A pre-processor program (ylegis) takes a section of legislation (or multiple sections) and converts it automatically into a ‘first draft’ of yscript code for those legislative provisions, which can immediately be run by the yscript interpreter.
• The formal mode of ylegis allows legislation to be written in a representation very close to statutory language, and thus able to be both legislation and code.
• There remain significant issues to be addressed in converting legislation where there is syntactical ambiguity, the subject of ongoing work.
• Semantic ambiguity, or the ‘open texture of legal language’, is not something that representation by itself can easily reduce. It is addressed through actively assisting users to locate the legal source materials on which interpretation must be based.

We conclude by suggesting that there is evidence these processes are potentially scaleable and able to deal with the conversion or production of significant sets of legislation. Further work is needed to investigate the extent to which the conversion and creation of ‘Rules as Code’ can be done at scale and applied to different types of legislation and other classes of legal rules.

Keywords: AI, artificial intelligence, law as code, rules as code, AustLII, RegTech

Suggested Citation

Mowbray, Andrew and Chung, Philip and Greenleaf, Graham, Representing Legislative Rules as Code: Reducing the Problems of ‘Scaling Up’ (December 9, 2021). Available at SSRN: https://ssrn.com/abstract=3981161 or http://dx.doi.org/10.2139/ssrn.3981161

Andrew Mowbray

University of Technology Sydney, Faculty of Law ( email )

Sydney
Australia

Philip Chung

University of New South Wales (UNSW Sydney), Faculty of Law and Justice ( email )

Kensington, New South Wales 2052
Australia

Graham Greenleaf (Contact Author)

University of New South Wales, Faculty of Law ( email )

Sydney, New South Wales 2052
Australia
+61 2 9385 2233 (Phone)
+61 2 9385 1175 (Fax)

HOME PAGE: http://www2.austlii.edu.au/~graham

Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Downloads
65
Abstract Views
365
rank
460,613
PlumX Metrics