Rules As Code: Drawing Out the Logic of Legislation for Drafters and Computers

Modern Legislative Drafting - A Research Companion, Constantin Stefanou (ed.) (Routledge) (Forthcoming)

16 Pages Posted: 11 Dec 2022

See all articles by Matthew Waddington

Matthew Waddington

Legislative Drafting Office, States of Jersey

Date Written: May 4, 2022


This chapter outlines developments in the digitisation of legislative drafts, looking at “computational law” and the spectre of artificial intelligence (“AI”), but focussing mainly on “Rules as Code” (or “RaC”). The concept of RaC presented here is not one that claims to be able to digitise all of the law, or even all aspects of a piece of legislation. Nor is it one that claims computers should interpret the substantive terms used in legislation, or fill in implied concepts, as opposed to interpreting terms like “if”, “and”, “or”, “not”, “means”, “includes”, “must” and “may” that drafters are already trying to use in a disciplined way.

The chapter examines what can be drawn from the increasingly systematic approach among legislative drafters in Commonwealth countries to handling different key components of legislation. The shift from “shall” to “must” (and “is”) has more clearly exposed differences between constitutive provisions (such as definitions, or rules about whether a notice or application is valid), provisions taking effect by operation of law (such as establishing a statutory body corporate), and normative provisions (such as imposing an obligation, or creating an offence). Basic deontic logic symbols can be used to illustrate the way drafters limit normative terms (other than in offences) to basic building blocks of “must”, “must not” and “may”. Drafters use those building blocks to create what others label as “rights” and “powers” in ways that mean modern legislative drafting in the Commonwealth may be able to avoid many of the problems and complications that have beset those who have tried to formalise or digitise law. In particular it may avoid some of the difficulties that occur when, before attempting the digital capture of the elements of legislation, an attempt is made to apply deontic logic to law in general, or to wrestle with systematising legal expressions such as rights and privileges in the fashion attempted by Hohfeld, or to formalise fundamental legal concepts like Sartor’s, or to pin down a large range of concepts as in LegalRuleML. Those broader issues may need to be tackled in the longer term, but in the short term a simplified approach could produce results and help drafters grasp the insights that can be obtained from this approach.

Keywords: legislative drafting, Rules as Code, computational law

Suggested Citation

Waddington, Matthew, Rules As Code: Drawing Out the Logic of Legislation for Drafters and Computers (May 4, 2022). Modern Legislative Drafting - A Research Companion, Constantin Stefanou (ed.) (Routledge) (Forthcoming), Available at SSRN: or

Matthew Waddington (Contact Author)

Legislative Drafting Office, States of Jersey ( email )

Morier House
Halkett Place
St Helier, JE1 1DD

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

Paper statistics

Abstract Views
PlumX Metrics