LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido...

62
LegalRuleML ICAIL 2013 - Tutorial

Transcript of LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido...

Page 1: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML

ICAIL 2013 - Tutorial

Page 2: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML TC

Monica Palmirani, CIRSFID, UniBO

Guido Governatori, NICTA, Australia

Harold Boley, NRCTara Athan, Athan Services

Adrian Paschke, Uni. Berlin

Adam WynerUni. Liverpool

Chair

Chair Secretary

Secretary

Page 3: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Where to find material of the tutorial

Examples SVN: https://tools.oasis-open.org/version-control/browse/wsvn/legalruleml/trunk/examples/draft/?rev=47&sc=1#_trunk_examples_draft_

Documentation of the LegalRuleML TC: https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=legalruleml

Page 4: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Outline

Introduction to LegalRuleML Goals, Principles, Objectives, Bridging from RuleML to LegalRuleML LegalRuleML Metamodel

Use Case #1: "Complaint" defeasiblity Use Case #2: "Infringement of Copyright“

Temporal management Use Case #3: “Section 29 Consumer Code of

Australia“ deontic

Page 5: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Introduction

LegalRuleML TC

Page 6: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Why: Needs

Legal texts are the source of norms, guidelines and rules that often feed into different concrete Web applications.

Legislative documents typically provide general norms and specific procedural rules for eGovernment and eCommerce environments

Contracts specify the conditions of services and business rules

Judgements provide information about arguments and interpretation of norms that establish concrete case-law

Guidelines (Soft Law) provide business and process rules in different sector eGovernment, eJustice, eLegislation, eLaw eHealth Banks, assurances, credit card organizations Cloud Computing eCommerce

Page 7: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Goal

The goal of the LegalRuleML is to extend RuleML (http://ruleml.org) with features specific to the formalisation of norms, guidelines, and legal reasoning.

Didactical standard oriented for legal person in order to support the legal knowledge engineers

Managing in flexible and extensible way important concepts of the legal domain in order to assign semantics to domain-specific LegalRuleML elements and attributes

Compact the syntax into a “shortcut” annotation for legal domain which is more effective, descriptive, human-readable for users with legal background

Page 8: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

OASIS: background Not-for-profit consortium founded in 1993 Open to all: companies, government agencies, academic

and research institutions, individuals International community

5,000+ participants including: 600+ organizations in 100+ countries

33% in Europe 13% in Asia Technical agenda set by members Board and Committee chairs elected by member About of 65 TC now active in several domains including

cloud computing, security and privacy, government and legal, smart grid, SOA and more

Page 9: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

OASIS and LegalXML

LegalXML.org Community – 1998. Legal, court, business, academic, and

technology professionals. Collaboration on non-proprietary standards for

the legal community.

OASIS LegalXML Member Section – March 2002. LegalRuleML started in Jan 2012 LegalDocML started in March 2012

Page 10: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Why OASIS?

Stable and robust governance of the standard International standard body certification All TC Members have equal participation rights All work (docs, emails, wiki, etc.) are publicly

accessible Non-members contribute via comment lists Lightweight process focused on getting work done IPR Policy consistently receives high marks OASIS Standards can be submitted to de jure

bodies (ISO, ITU, etc) for further ratification

Page 11: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML Principles (1/2)Multiple Semantic Annotations: A legal rule may have multiple

semantic annotations where each annotation can represent a different legal interpretation. Each such annotation can appear in a separate annotation block as internal or external metadata. There is a range of parameters that can be set to provide the interpretation, e.g. provenance, applicable jurisdiction, logical interpretation of the rule, and others. Context of the rule should be recorded in an atomic and encapsulated block in order to realize the isomorphism principle.

Tracking the LegalRuleML Creators: As part of the provenance information, a LegalRuleML document or any of its fragments can be associated with its creators.

Linking Rules and Provisions (isomorphism): LegalRuleML includes a mechanism, based on IRI, that allows N:M relationships among the rules and the textual provisions:

avoiding redundancy in the IRI definition and errors in the associations

LegalRuleML is independent respect any Legal Document XML standard, IRI naming convantion

Page 12: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML Principles (2/2)Temporal Management: Provisions, references, rules, applications

of rules and physical entities change in time, and their histories interact in complicated ways. LegalRuleML must represent these temporal issues in unambiguous fashion. In particular a rule has a range of parameters which can vary over time such as its status (e.g. strict, defeasible, defeater), its validity (e.g. repealed, annulled, suspended) and its jurisdiction (e.g. only in EU, only in US). In addition, a rule has a spectrum of temporal aspects such as internal constituency of the action, the time of assertion of the rule, the efficacy, enforcement, and so on.

Formal Ontology Reference: LegalRuleML is independent from any legal ontology and logic framework. It includes a mechanism, based on IRIs, for pointing to reusable classes of a specified external ontology.

LegalRuleML is based on RuleML: LegalRuleML reuses and extends concepts and syntax of RuleML wherever possible, and also adds novel annotations. RuleML includes also Reaction RuleML.

Mapping: Investigate the mapping of LegalRuleML metadata to RDF triples for favouring Linked Data reuse.

Page 13: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML Objective Extend RuleML Standard for managing in integrated way four

main axes: Legal Sources Legal Rules including deontic and defeasible Legal Temporal dimensions Legal Rule Context (e.g. jurisdiction, sovereignty,

qualifications, authors, etc.)

This permits: To express the temporal parameters of the rules and their

attributes/properties in atomic way (encapsulation) To fill the gap between legal text and normative rule

interpretation capture the changes over time of the rules when the legal

binding text changes To open the door for an effective legal reasoning approach

combining defeasibility/behaviours and temporal dimensions

Page 14: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRules@

t2

LegalText@V3

Scenario

Legal OntologyConcepts

@V1

LegalRules@original

LegalText@V1

iso

mo

rph

ism

LegalRules@

t1

LegalText@V2

Legal OntologyConcepts

@V2

Legal OntologyConcepts

@V3

detect the rules and the ontology classes affected by the changes

refer to the proper version of the text and of the ontology classes

take in consideration the evolution of the rules over time with also theirs metadata fixed in a given time tx

Sources, Rules (including deontic and defeasible properties) and context metatadata are “valid” in a given temporal interval.

Metadata-t0 Metadata-t1 Metadata-t2

Page 15: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Working DraftFIRST STEP

Committee Specification

Draft Full Majority Vote

Full Majority Vote

Public Review Open for 30 days

Committee Specification

Special Majority Vote.

SECOND STEP

Statements of Use Three use cases

Candidate standard

Public Review Open for 60 days

THIRD STEP

Balloting 15% of the OASIS

OASIS Stand.

FORTH STEP

OASIS TC Workflow

Page 16: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Bridging from RuleML to LegalRuleML

LegalRuleML TC

Page 17: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

17

LegalRuleML

RuleML Family of Sublanguages

Page 18: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Extending RuleML to LegalRuleML

18

Deliberation RuleML "A citizen gets a benefit of 20 percent on the renovation of their house if the citizen does not represent a company and the renovation will improve insulation by at least 10 percent ."  Reaction RuleML "A citizen gets a benefit of 20 percent to be paid in the first month of the renovation of their house, starting on July 1st, 2005 and ending on June 30st, 2015, if the citizen does not represent a company and the renovation will improve insulation by at least 10 percent ." LegalRuleML "Eco Union Private Home Renovation Law: According to this law, which is applicable in all member states of the Eco Union, an Eco Union citizen gets a benefit of 20 percent to be paid in the first month of the renovation of their house, starting on July 1st, 2005 and ending on June 30st, 2015 if the citizen does not represent a company and the renovation will improve insulation by at least 10 percent ."

Page 19: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Resuse and Integration

the new classes for the properties the RuleML classes for DC classes for the xsd data type

Page 20: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML Metamodel

LegalRuleML TC

Page 21: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Legal Rule A legal rule could be:

a Constitutive rule“An “anonymous work” is a work on the copies or phonorecords of which no natural person is identified as author.”

a Prescritpive rule In a case where the

making of the copies or phonorecords would have constituted an infringement of copyright if this title had been applicable, their importation is prohibited.

We distinguish between: a Logic Formula a Defesible rule

© DeonticRuleClass

Page 22: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

metadata

metadata

Isomorphism between text and rules

Digital Millennium Copyright Act

<lrml:Rule key="rule1a-v2"><lrml:if> ...</lrml:if>

….<lrml:then>... </lrml:then>

</lrml:Rule>...

<lrml:Rule key="rule1a-v2"><lrml:if> ...</lrml:if>

….<lrml:then>... </lrml:then>

</lrml:Rule>...

<lrml:Rule key="rule3a-v2"><lrml:if> ...</lrml:if>

…. <lrml:then>... </lrml:then>

</lrml:Rule>...

<lrml:Rule key="rule3a-v2"><lrml:if> ...</lrml:if>

…. <lrml:then>... </lrml:then>

</lrml:Rule>...

Taken inspiration from legal text and modelled using interpretation theory metadata

Produced Rule

<lrml:Rule key="rule2a-v2"><lrml:if> ...</lrml:if>

…. <lrml:then>... </lrml:then>

</lrml:Rule>...

<lrml:Rule key="rule2a-v2"><lrml:if> ...</lrml:if>

…. <lrml:then>... </lrml:then>

</lrml:Rule>...

Page 23: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Normal and Compact version

Meta-model is built on the RDF principles Node and Edges defines the relationships

among <subject, predicate, object>

<lrml:ConstitutiveStatement key="cs1"> <ruleml:Rule key=":ruletemplate1"

closure="universal">

<lrml:hasStatement> <lrml:ConstitutiveStatement key="cs1">

<lrml:hasTemplate> <ruleml:Rule key=":ruletemplate1"

closure="universal">

NORMAL

COMPACT

Page 24: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Metamodel: Legal Statements and References

• Sources are legal statements (often natural language)

• Legal source with IRIs may be referenced directly

• Non-IRI-based identifier systems are associated with a same-document IRI reference using the Reference construct

Page 25: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

References to the Legal Sources<lrml:References refType="http://example.legalruleml.org/lrml#LegalStatement">

<lrml:Reference refersTo="ref1" refID="/au/2012-05-30/C628:2012/eng@/main#sec2.2" refIDSystemName="AkomaNtoso2.0-2011-10"/>

<lrml:Reference refersTo="ref2" refID="ECLI:country:court:year:number" refIDSystemName="European Case Law Identifier" refIDSystemSource="OJ:C:2011:127:0001:0007:EN:PDF"/></lrml:References><lrml:LegalSources>

<lrml:LegalSource key="ref3" sameAs="http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=browse_usc&amp;docid=Cite:+18USC47"/>

<lrml:LegalSource key="ref4" sameAs="http://www.law.cornell.edu/wiki/lexcraft/section_identifiers_lii"/></lrml:LegalSources>

<lrml:Associations key="sourceBlock1"><lrml:Association>

<lrml:appliesSource keyref="#ref1"/><lrml:toTarget keyref="#rule_1a"/>

</lrml:Association><lrml:Association>

<lrml:appliesSource keyref="#ref3"/><lrml:toTarget keyref="http://example.com/ex2.1.1-references-b#rule_1b"/>

</lrml:Association></lrml:Associations>

Page 26: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Metamodel: Rule Context and (Legal) Sources

• LegalRuleML documents provide a context (Context) for the legal rules expressed by textual provisions

• Context includes associations between sources and parts of the rules (AssociationCollection)

Page 27: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Concept of ContextContext block describes metadata on rules or on other

important parts of the knowledge base (e.g.

<lrml:Context key="ruleInfo2"><lrml:appliesAssociations>

<lrml:Associations key="sourceBlock2"><lrml:Association>

<lrml:appliesSource keyref="#ref2"/><lrml:toTarget keyref="#rule_1a"/>

</lrml:Association><lrml:Association>

<lrml:appliesSource keyref="#ref2"/><lrml:toTarget keyref="http://docs.oasis-

open.org/legalruleml/examples/approved/ex2.1.1-references-b#rule_1b"/></lrml:Association>

</lrml:Associations></lrml:appliesAssociations><lrml:toStatement keyref="#rule_1a"/><lrml:toStatement keyref="/ex2.1.1-references-b#rule_1b"/>

</lrml:Context>

Page 28: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Context blocks <lrml:appliesSource keyref="#sec2.1-list1-itm31-par3-v2"/>

<lrml:appliesTemporalCharacteristics keyref="#tblock3"/>

<lrml:appliesStrength iri="&defeasible-ontology;#defeasible2"/>

<lrml:appliesModality iri="&deontic-ontology;#ob2"/>

<lrml:appliesJurisdiction keyref="&jurisdictions;us"/>

<lrml:appliesAuthority keyref="#congress"/>

<lrml:appliesRole>

Page 29: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Associations• Associations

– two types of roles– N, M role fillers– N*M dyadic links

• Roles– Source– Target– Temporal Characteristics

<lrml:Association><lrml:appliesSource keyref="#sec2.1-

list1-itm31-par2-snt2-v2"/><lrml:toTarget keyref="#rule3-rel1-v2"/>

</lrml:Association><lrml:Association>

<lrml:appliesSource keyref="#sec2.1-list1-itm31-par2-snt3-v2"/>

<lrml:toTarget keyref="#rule4-rel1-v2"/><lrml:toTarget keyref="#rule4-rel2-v2"/>

</lrml:Association>

Page 30: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Metamodel: MetadataRole, Authority, Jurisdiction

• Metadata concepts and properties are grounded in Dublin Core, FRBR as subclasses and sub-properties

• Various roles, such as author or editor, are identified by the type of the Role concept

FRBR: Functional Requirements for Bibliographic Records

Page 31: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Agent, Authority

<lrml:Agents><!-- type="&lrmlv;Co-Author" --><lrml:Agent key="aut1"

sameAs="&unibo;/person.owl#m.palmirani"/><lrml:Agent key="aut2"

sameAs="&unibo;/person.owl#t.ognibene"/><lrml:Agent key="mad" sameAs="&unibo;/organization.owl#mad"/>

</lrml:Agents>

<lrml:Authorities><lrml:Authority key="congress"

sameAs="&unibo;/organization.owl#congress"><lrml:type iri="&lrmlv;Legislature"/>

</lrml:Authority>

Page 32: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Document Structure:Collections, Contexts, Rulebases

<lrml:LegalRuleML> <lrml:References> <Reference> ...

</lrml:References> ... <lrml:Context key="ruleInfo1-v2">

<lrml:Association><lrml:appliesSource keyref="#sec2.1-list1-itm31-par1-

v2"/><lrml:toTarget keyref="#rulebase1-v2"/>

</lrml:Association> </lrml:Context>

<lrml:hasStatements key="rulebase-v2"><lrml:ConstitutiveStatement key="rule1a-v2">

<ruleml:if> ...</ruleml:if><ruleml:then>... </ruleml:then>

</lrml:ConstitutiveStatement> </lrml:hasStatements>...</lrml:LegalRuleML>

Textual References

Rule Context parameters like agents, times,

sources

Association between Text and

RulesN:M relationship

Rules

Page 33: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Metamodel:temporal

Legal rules change over time.

Each rule has a TimeInstantCollection (instant or interval)

and TemporalCaratheristicCollection (inforce/efficacy, start/end)

Example: ex2.1.4-temporal.lrml

Page 34: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Deontic operators

Obligation, Right, Permission, Proibhition

<lrml:Prohibition key="prohib2"><lrml:Obligation key="ob1"><lrml:Permission>

<lrml:Right>

Penalty, Reparation, Behaviors

Page 35: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Penalty<lrml:Penalty key="pen2">

<lrml:SuborderList key="behav1"><lrml:Obligation key="oblig101"><ruleml:slot>

<lrml:Subject iri="&deontic-ontology;#obligsub1"/>

<ruleml:Ind>Y</ruleml:Ind></ruleml:slot><ruleml:Atom key="atom109">

<ruleml:Rel iri="#rel3"/><ruleml:Ind>X</ruleml:Ind>

</ruleml:Atom></lrml:Obligation><lrml:Obligation key="oblig102">……</lrml:Obligation><lrml:Obligation key="oblig103">……</lrml:Obligation></lrml:SuborderList>

</lrml:Penalty>

Obligation101

Obligation102

Obligation103

(¬A =>B) (¬B=>C)

Set of obligations/rights in case of infringement of

another obligation/prohibition

Page 36: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Reparation

<lrml:Reparation key="rep3"><lrml:appliesAssociation>

<lrml:Association key="assoc3"><lrml:appliesPenalty

keyref="#pen1"/><lrml:appliesPenalty

keyref="#pen2"/><lrml:toTarget

keyref="#ps1"/></lrml:Association>

</lrml:appliesAssociation></lrml:Reparation>

Penalty PrescriptiveStatement

Reparation

Page 37: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Facts

<lrml:hasStatement><lrml:FactualStatement key="fact1">

<lrml:hasTemplate><ruleml:Atom key=":atom11">

<ruleml:Rel iri="#rel5"/><ruleml:Ind

iri="#JohnDoe"/></ruleml:Atom>

</lrml:hasTemplate></lrml:FactualStatement>

</lrml:hasStatement>

Page 38: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML Use Case #1

Defeasibility and Rule Sources

Guido Governatori, Monica Palmirani, Tara Athan

Page 39: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Complaint example from Telecommunications Consumer Protections Code C628:2012, Australia

2.1Complaint

means an expression of dissatisfaction made to a Supplier in relation to its Telecommunications Products or the complaints handling process itself, where a response or Resolution is explicitly or implicitly expected by the Consumer. An initial call to a provider to request a service or information or to request support is not necessarily a Complaint. An initial call to report a fault or service difficulty is not a Complaint. However, if a Customer advises that they want this initial call treated as a Complaint, the Supplier will also treat this initial call as a Complaint. If a Supplier is uncertain, a Supplier must ask a Customer if they wish to make a Complaint and must rely on the Customer‟s response.

Date of Assent: 30 May 2012

Date of Registration: 11 July 2012

Date of Efficacy: 1 September 2012

sec2.1-v2

sec2.1-list1-itm31-v2

par1-v2

par2-v2

par3-v2

rule1a

rule2

rule3

rule1b

rule1b<rule2rule1b<rule3 rule3<rule4

rule4

Page 40: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Metamodel: defeasible

Defeasible logic is a non-monotonic logic that helps to manage norms conflicting, exceptions, inconsistency between norms over time

RuleText is connected to the RuleContext where the relation appliesStrenght indicates the type of rule (strict, defeasible, defeater)

Overrides defines a binary relationship that indicates the priority among two rules (r2>r1)

Page 41: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Rule Contexts with Temporal Metadata<lrml:Context key="ruleInfo4-v2">

<lrml:appliesStrength iri="&lrmlv;#defeasible"/>

<lrml:appliesAssociations>

<lrml:Associations key="sourceBlock4-v2">

<lrml:Association>

<lrml:appliesSource keyref="#sec2.1-list1-itm31-par3-v2"/>

<lrml:toTarget keyref="#rulebase5-v2"/>

</lrml:Association>

<lrml:Association>

<lrml:appliesTemporalCharacteristics keyref="#tblock3"/>

<lrml:toTarget keyref="#rulebase3-v2"/>

<lrml:toTarget keyref="#rule5-v2"/>

</lrml:Association>

</lrml:Associations>

</lrml:appliesAssociations>

<lrml:toStatement keyref="#rule5-v2"/>

Temporal info

Source info

Defeasible qualification

Rule5-v2

Page 42: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Complaint example from TCP Code C628:2012, Australia

<lrml:hasStatements key="rulebase1-v2"> <lrml:ConstitutiveStatement key="rule1a-v2">

<ruleml:if> <ruleml:Atom key="rule1-atom1-v2">

<ruleml:Rel iri="#complaint-v2"/>

<ruleml:Var>X</ruleml:Var> </ruleml:Atom>

</ruleml:if> <ruleml:then>

<ruleml:Atom key="rule1-atom2-v2"> <ruleml:Rel iri="#rule1-rel2-

v2">is an expression of dissatisfaction made to a Supplier in relation to its Telecommunications Products or the complaints handling process itself, where a response or Resolution is explicitly or implicitly expected by the Consumer</ruleml:Rel>

<ruleml:Var>X</ruleml:Var> </ruleml:Atom>

</ruleml:then> </lrml:ConstitutiveStatement>

Page 43: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Complaint example from TCP Code C628:2012, Australia

<lrml:PrescritiveStatement key="rule5-v2"><lrml:if>

<ruleml:Atom key="rule5-atom1-v2"><ruleml:Rel iri="rule5-rel1-v2">is uncertain if/wishes to make a

Complaint</ruleml:Rel><ruleml:Var type="#supplier-v2">S</ruleml:Var><ruleml:Var type="#customer-v2">C</ruleml:Var>

</ruleml:Atom></lrml:if><lrml:then>

<lrml:Obligation key="rule5-ob1-v2"> <lrml:And key="rule5-and1-v2">

<ruleml:Atom key="rule5-atom2-v2"> <ruleml:Rel iri="rule5-rel2-v2">asks/if they wish to make a

Complaint</ruleml:Rel> <ruleml:Var>S</ruleml:Var> <ruleml:Var>C</ruleml:Var></ruleml:Atom>

<ruleml:Atom key="rule5-atom3-v2"> <ruleml:Rel iri="#rule5-rel3-v2">relies on the response of</ruleml:Rel> <ruleml:Var>S</ruleml:Var> <ruleml:Var>C</ruleml:Var></ruleml:Atom>

</lrml:And></lrml:Obligation>

</lrml:then></lrml:PrescriptiveStatement>

Page 44: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Defeasibility<lrml:hasQualification>

<lrml:Overrides over="#rule2-v2" under="#rule1b-v2“/></lrml:hasQualification><lrml:hasQualification>

<lrml:Overrides over="#rule3-v2" under="#rule1b-v2"/></lrml:hasQualification><lrml:hasQualification>

<lrml:Overrides over="#rule4-v2" under="#rule3-v2"/></lrml:hasQualification><lrml:hasQualification>

<lrml:Overrides over="#rule5-v2" under="#rule3-v2"/></lrml:hasQualification>

Page 45: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML Use Case #2

Temporal Model Monica Palmirani

Tara Athan

Page 46: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Copyright law: temporal versions Requirements: associate rules to their sources over time and to

assign temporal dimensions to the rules US “Digital Millenium Act” and modifications Specific goal: in tx calculate the proper statutory damage in case

of violation of the copyright taking in consideration all the exceptions and the modifications respect an fact.

17 USC Sec. 504Remedies for infringement: Damages and profits

Interval of efficacy of the norm

Statutory Damages

[Jan. 1, 1978, March 1, 1989 [ $250 <= statutoryDamages <= $10,000

[March 1, 1989, Dec. 9, 1999 [ $500 <= statutoryDamages <= $20,000

[Dec. 9, 1999, ∞ $750 <= statutoryDamages <= $30,000

Page 47: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

(c) Statutory Damages. -The copyright owner may elect an award of statutory damages for infringements in a sum of not less than $250 or more than $10,000 as the court considers just.

Efficacy period [Jan. 1, 1978, March 1, 1989 [

(c) Statutory Damages. -The copyright owner may elect an award of statutory damages for infringements in a sum of not less than $500 or more than $20,000 as the court considers just.

Efficacy period [March 1, 1989, Dec. 9, 1999 [

(c) Statutory Damages. -The copyright owner may elect an award of statutory damages for infringements in a sum of not less than $750 or more than $30,000 as the court considers just.

Efficacy period

[Dec. 9, 1999, ∞ [

USC_17_504@1976-10-19#title17-chp5-sec504-clsc-lst1-pnt2-subpar2

USC_17_504@1989-03-01#title17-chp5-sec504-clsc-lst1-pnt2-subpar2

USC_17_504@1999-12-09#title17-chp5-sec504-clsc-lst1-pnt2-subpar2

Page 48: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Resources with URI

<lrml:LegalSources><lrml:memberType iri="&lkif;#Code"/><lrml:LegalSource key="sec504-clsa-pnt1"

sameAs="&UScode;#title17-chp5-sec504-clsa-lst1-pnt1"/><lrml:LegalSource key="sec504-clsa-pnt2"

sameAs="&UScode;#title17-chp5-sec504-clsa-lst1-pnt2"/><lrml:LegalSource key="sec504-clsb" sameAs="&UScode;#title17-

chp5-sec504-clsb"/><lrml:LegalSource key="sec504-clsc-pnt1"

sameAs="&UScode;#title17-chp5-sec504-clsc-lst1-pnt1"/><lrml:LegalSource key="sec504-clsc-pnt2-sb1"

sameAs="&UScode;#title17-chp5-sec504-clsc-lst1-pnt2-subpar1"/><lrml:LegalSource key="sec504-clsc-pnt2-sb2"

sameAs="&UScode;#title17-chp5-sec504-clsc-lst1-pnt2-subpar2"/><lrml:LegalSource key="sec504-clsc-pnt2-sb3"

sameAs="&UScode;#title17-chp5-sec504-clsc-lst1-pnt2-subpar3"/></lrml:LegalSources><lrml:LegalSources>

<lrml:memberType iri="&lkif;#Precedent"/><lrml:LegalSource key="mad2005" sameAs="&judgment1;"/><lrml:LegalSource key="mad2012" sameAs="&judgment2;"/>

</lrml:LegalSources>

Page 49: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Time information

<lrml:TimeInstants>

<ruleml:Time key="t1">

<ruleml:Data xsi:type="xs:date">1978-01-01</ruleml:Data>

</ruleml:Time>

<ruleml:Time key="t2">

<ruleml:Data xsi:type="xs:date">1989-03-01</ruleml:Data>

</ruleml:Time>

</lrml:TimeInstants><lrml:TemporalCharacteristics key="tblock1">

<lrml:TemporalCharacteristic key="e1-b"><lrml:forRuleStatus iri="&lrmlv;#Efficacious"/><lrml:hasStatusDevelopment

iri="&lrmlv;#Starts"/><lrml:atTimeInstant keyref="#t1"/>

</lrml:TemporalCharacteristic>

LIST OF NEUTRAL TIME INSTANTS

Type of event connected with an

ontology

Interval or Instant

Page 50: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Context with Association<lrml:Context key="ruleInfo1" hasCreationDate="#t8">

<lrml:appliesTemporalCharacteristics keyref="#tblock1"/><lrml:appliesStrength iri="&lrmlv;defeasible"/><lrml:appliesRole>

<lrml:Role iri="&lrmlv;#Author"><lrml:filledBy keyref="#aut1"/>

</lrml:Role></lrml:appliesRole><lrml:appliesAuthority keyref="#congress"/><lrml:appliesJurisdiction keyref="&jurisdictions;us"/><lrml:appliesAssociations>

<lrml:Associations key="sourceBlock1"><lrml:Association>

<lrml:appliesSource keyref="#sec504-clsc-pnt1"/>

<lrml:toTarget keyref="#rule1-penalty1"/></lrml:Association>

</lrml:Associations></lrml:appliesAssociations><lrml:toStatement keyref="#rule1"/>

Temporal info

Defeasible qualification

Author of the modelling

Jurisdiction

Sources

Destination

Page 51: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML: A proof-of-concept

Monica Palmirani

University of Bologna, CIRSFID

Page 52: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

XMLRep.

KB

XPathXquery

4

LegalRules@

t2

LegalText

in XML@t2

Scenario

Ontology Engine Legal

Resoner

Facts tj

ProofNew

knowledge

5

KBtj

NORMS&

Adm.Acts

Jurisprudence

Case-Law

1

Legal OntologyConcepts

LegalRules@original

LegalText

in XML@original

AKOMA NTOSO ofLEGALDOCML

iso

mo

rph

ism

2

LegalRules@

t1

LegalText

in XML@t1

Mod art. 23

Detect the impacts of the modifications on the rules

3

RDFa or RDF Linked Data

enrichment of the XML or HTML5 annotation

6

Page 53: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Architecture

Web editor for text and rules (http://www.tinymce.com/)

Web Rule Viewer Native XML-database

eXist Drools first prototype

Application Layer

Front-end

CMS

HTTPApachePublic Access

Disk

CMS Page

CMS Page

CMS Data

SOAP/WSDL Layer

Application Logic

Data Layer- eXist

SOAP/WSDL Layer

Transaction Manager

Exist Database

Validator Module

XML&RDF Akoma Ntoso

Presentation Applications

CMS Administration

RDBMS

URIResolver

Web Editor

Web ClientApplicationRuleViewer

REST Web Services

User

User

NLP module

Rule Engine

API

SOAP/WSDL Layer

Ontology Resoner

Ontology Graph Management

Integration Knowledge Module

Parser module

OWL ontology

Integrator Module

ExtractorOntologyLearning

Communication module

Query Module

LegalRuleML

Drools

Page 54: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Conclusion and Future plans

LegalRuleML wants to be close to the legal domain competences and produce a code readable by human and by machine

RDF approach helps to foster the Linked Data collection

Proof-of-concept are developed Future work: complex event modelling

inside of the norms, meta-rules, case-law, extensibility of the schema, good documentation and pilot cases.

Page 55: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML Use Case #4

Rules for International

Carriage by Air Giuseppe Contissa

Page 56: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

ConstitutiveRule

Article 17Death and Injury of Passengers - Damage to Baggage

1. The carrier is liable for damage sustained in case of death or bodily injury of a passenger upon condition only that the accident which caused the death or injury took place on board the aircraft or in the course of any of the operations of embarking or disembarking.

ConstitutiveRule: liable

Page 57: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Defeasible

2. The carrier is liable for damage sustained in case of destruction or loss of, or of damage to, checked baggage upon condition only that the event which caused the destruction, loss or damage took place on board the aircraft or during any period within which the checked baggage was in the charge of the carrier. However, the carrier is not liable if and to the extent that the damage resulted from the inherent defect, quality or vice of the baggage. In the case of unchecked baggage, including personal items, the carrier is liable if the damage resulted from its fault or that of its servants or agents.

Constitutive Rule: definition of liability of the carrier+ exception

Page 58: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Obligation: to pay

Article 21 Compensation in Case of Death or Injury of Passengers

1. For damages arising under paragraph 1 of Article 17 not exceeding 100,000 Special Drawing Rights for each passenger, the carrier shall not be able to exclude or limit its liability.

Page 59: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

LegalRuleML Use Case #3

National Consumer Credit Protection Act

2009: Section 29 Guido Governatori

Page 60: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Deontic

National Consumer Credit Protection Act 2009:Section 29

(Prohibition on engaging in credit activities without a licence)

(1) A person must not engage in a credit activity if the person does not hold a licence authorising the person to engage in the credit activity.

Civil penalty: 2,000 penalty units. omissis Criminal penalty: 200 penalty units, or 2 years

imprisonment, or both

Page 61: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

rule1: It is forbidden to engage credit activity

rule2: A person can engage in a credit activity if the person hold a licence

rule2 override rule1 penalties reparations

Page 62: LegalRuleML ICAIL 2013 - Tutorial. LegalRuleML TC Monica Palmirani, CIRSFID, UniBO Guido Governatori, NICTA, Australia Harold Boley, NRC Tara Athan, Athan.

Thank you for your attention!and joint to LegalRuleML [email protected]