Drooling over Rules as Code

Video of Legislative Drafting Conference Presentation

Learning Drools

Programming Rules, Business Central Drools

VSCode FTW

Logic Programming vs. Production Rule Systems

\neg ?_:Snuggalupagi :- ?_:Elephant[colour->pink].

Graph vs. Object Data

Defeasibility vs Priority

mortal(Socrates).
\neg mortal(Socrates).
modify( socrates ) {
setMortal(true),
setMortal(false)
}

Temporality and Events

Quick Example

// Section 1 (c)
// (c) Dissolution Event. If there is a Dissolution Event before
// the termination of this Safe, the Investor will automatically be
// entitled (subject to the liquidation priority set forth in
// Section 1(d) below) to receive a portion of Proceeds equal to the
// Cash-Out Amount, due and payable to the Investor immediately
// prior to the consummation of the Dissolution Event.
rule "Dissolution Event"
when
s : SAFE( terminated == false,
company != null,
c : company,
cash_out_amount != null,
co : cash_out_amount )
e : RWEvent( st : safe_type,
st.name == "DISSOLUTION_EVENT" ) from c.events
then
SAFE_Result safe_result = new SAFE_Result();
safe_result.setCash_amount_due(Double.valueOf(co));
modify( s ) {
setSafe_result(safe_result),
setTerminated(true),
setTerminating_event(e),
}
end

Quick Notes

  • Oct 29: Stanford CodeX lunch webinar on Blawx (free to join, if you’re interested)
  • Nov 4: Cyberjustice Laboratory (University of Montreal) webinar on Blawx
  • Nov 17: European Commission Rules as Code Blawx demo in conjunction with the OECD’s “Government After Shock” event.
  • Nov 17&18: Guest lecturing for Megan Ma’s course at Sciences Po.
  • Nov 24: Rules as Code session with Canada School of Public Service

--

--

A sporadic diary by Jason Morris of Lexpedite Legal Technology Ltd.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jason Morris

Rules as Code Director at Service Canada, CEO Lexpedite.ca. Previous: Lawyer; ABA Innovation Fellow; Sessional Instructor; Computational Law Researcher