Introducing L4-Docassemble

SMU CClaw brings logic-based legal encodings, defaults and exceptions, reusable rules and data structures, explanations, rapid prototyping, and deeper legal reasoning to open source legal expert systems.

Open Source Legal Expert System Tools: What are they missing?

Logical Representations of Laws and Contracts

Prototype User Interfaces

Explanations for Answers

Legal Expert System Tools: What are they missing?

Defeasibility

Modular Rules and Data Structures

Multiple Justifications

Hypothetical Reasoning

What is L4-Docassemble?

  • Logical Representation of Rules *
  • Rapid Prototyping *
  • Natural Language Explanations *
  • Defeasibility +
  • Modular Data Structures and Rules +
  • Multiple Justifications +

How do you Use L4-Docassemble?

  1. Install it.
  2. Upload your s(CASP) and LExSIS files to the static folder in the docassemble playground.
  3. Run the interview generation tool, which creates an interview and installs it onto your docassemble server for you.
  4. Modify the interview however you like.

What Does Using L4-Docassemble Look Like?

% RULE 34(5)
% (5) Despite paragraph (1)(b), but subject to paragraph (1)(a) and (c) to (f),
% a locum solicitor may accept an executive appointment in a business entity which
% does not provide any legal services or law-related services, if all of the
% conditions set out in the Second Schedule are satisfied.
according_to(r34_5,may(LP,accept,EA)) :-
legal_practitioner(LP),
locum_solicitor(LP),
executive_appointment_in_a_business_entity(EA,BE),
not provides_legal_or_law_related_services(BE),
conditions_of_second_schedule_satisfied.
opposes(r34_1,must_not(LP,accept,EA),r34_5,may(LP,accept,EA)).
opposes(r34_5,may(LP,accept,EA),r34_1_b,must_not(LP,accept,EA)).
overrides(r34_1,must_not(LP,accept,EA),r34_5,may(LP,accept,EA)).
overrides(r34_5,may(LP,accept,EA),r34_1_b,must_not(LP,accept,EA)).
provides_legal_or_law_related_services(BE) :-
provides(BE,Serv),
legal_service(Serv).
provides_legal_or_law_related_services(BE) :-
provides(BE,Serv),
law_related_service(Serv).
rules: r34.pl
query: legally_holds(Rule,must_not(Lawyer,accept,Position))
data:
...
- name: legal_practice
type: String
any: Are there any legal practices?
another: Is there another legal practice?
ask: What is the name of the legal practice?
tell: the legal practice {X}
minimum: 0
encodings:
- law_practice(X)
attributes:
- name: joint_law_venture
ask: Is {Y} a joint law venture?
type: Boolean
encodings:
- joint_law_venture(Y)
- name: formal_law_alliance
type: Boolean
ask: Is {Y} a formal law alliance?
encodings:
- formal_law_alliance(Y)
- name: foreign_law_practice
type: Boolean
ask: Is {Y} a foreign law practice?
encodings:
- foreign_law_practice(Y)
- name: jurisdiction
type: Enum
ask: What is the jurisdiction of {Y}?
options:
singapore: Singapore
other: Somewhere Else
encodings:
- jurisdiction(Y,X)
- name: legal_practitioner
type: Object
source: person
minimum: 0
any: Are there any legal practitioners in {Y}?
another: Is there another legal practitioner in {Y}?
ask: Who is a legal practitioner in {Y}?
tell: the legal practitioner {X} in {Y}
encodings:
- legal_practitioner(X)
- in(X,Y)
attributes:
- name: locum_solicitor
ask: Is {Y} a locum solicitor?
type: Boolean
encodings:
- locum_solicitor(Y)
- name: primary_occupation
type: Enum
ask: What is the primary occupation of {Y}?
encodings:
- primary_occupation_of(Y,X)
options:
practicing_as_a_lawyer: Practicing as a lawyer
something_else: Something Else
A question screen in an L4-Docassemble interview.
An example of an answer from an L4-Docassemble interview

Legal Expert Systems in One Line of Code

  1. Change the query entry in your LExSIS file.
  2. Rerun the interview generator.
  3. There is no step 3.

Using L4-Docassemble, building a new legal expert system to answer a different question about the same rules requires a single line of code.

Thanks

  1. There are open source reasoning tools like Blawx and closed source tools like Regulation as a Platform that feature logical representations and defeasibility, but that do not have features for the development of user interfaces. Such tools are excluded from the analysis.
  2. I’ll write more about LExSIS in a later blog post.

--

--

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