Constraint Answer Set Programming as a Tool to Improve Legislative Drafting
"Rules as Code" in this paper is used to refer to a proposed methodology of legislative and regulatory drafting.1 That legislation can be represented in declarative code for automation has long been recognized [6], as has the opportunity for improving the quality of legal drafting with the techniques of formal representation [1].
Rules as Code further proposes that both drafting and automation would be improved by initially co-drafting statute law in both natural and computer languages simultaneously [4].
Knowledge acquisition bottlenecks and roadblocks associated with statutory interpretation are largely avoided. The co-drafted encoding need only reflect what the legislation says, and not what the legislators meant. Legislative intent is instead encoded as tests by people with authoritative knowledge of the intent, the drafters. In this way, failed tests can be used in the drafting process to signal issues with the natural language draft. When the drafting process is complete an authoritative encoding consistent with the legislative intent already exist. This encoding can be used by regulators and regulated entities to automate services and compliance tasks.