[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Refining the formulae for the LegalRuleML GitHub
Dear LegalRuleMLs, I am working on the examples that we selected for the LegalRuleML GitHub. I have questions on the first formulae that we commented last time. I cut & pasted them in the file attached. I think it is better to first address these questions, then I will polish the file accordingly and then I will proceed. This is what I would like to discuss with you on Thursday evening. Thanks! Livio ======================================================================================================================================================== QUESTION #1: The Akoma Ntoso of the Smoking act is available on
https://www.legislation.gov.uk (UK Publication Office) on a persistent link: https://www.legislation.gov.uk/asp/2016/3/enacted/data.xht?view=snippet&wrap=true https://www.legislation.gov.uk/asp/2016/3/enacted/data.akn Thus, I guess we may connect its sections with the statements in the LegalRuleML file. From what I read online, I think the proper way to do it is: <lrml:LegalSources> <lrml:LegalSource key="SmokingProhibitionScotlandAct2016" sameAs="https://www.legislation.gov.uk/asp/2016/3/enacted/data.akn"/> <lrml:LegalSource key="SmokingProhibitionScotlandAct2016section1_1" sameAs="https://www.legislation.gov.uk/asp/2016/3/enacted/data.akn#section-1-1"/> <lrml:LegalSource key="SmokingProhibitionScotlandAct2016section1_2" sameAs="https://www.legislation.gov.uk/asp/2016/3/enacted/data.akn#section-1-2"/> <lrml:LegalSource key="SmokingProhibitionScotlandAct2016section2" sameAs="https://www.legislation.gov.uk/asp/2016/3/enacted/data.akn#section-2"/> </lrml:LegalSources> <lrml:Associations> <lrml:Association> <lrml:appliesSource keyref="#SmokingProhibitionScotlandAct2016section1_1" /> <lrml:toTarget keyref="#section1_1_Statements" /> </lrml:Association> <lrml:Association> <lrml:appliesSource keyref="#SmokingProhibitionScotlandAct2016section1_2" /> <lrml:toTarget keyref="#section1_2_Statements" /> </lrml:Association> <lrml:Association> <lrml:appliesSource keyref="#SmokingProhibitionScotlandAct2016section2" /> <lrml:toTarget keyref="#section2_Statements" /> </lrml:Association> </lrml:Associations> Correct? Note that "section-1-1" is an eId in the Akoma Ntoso file "data.akn". ======================================================================================================================================================== QUESTION #2: Last time we said that we do not need quantifiers, as variables are (implicitly) universally quantified over the KB. Thus, if I want to use the same variable in two different rules, I have to use
"key" and "keyRef". My question is: why should we use "key" and "keyRef" only when variables occur in different rules? I think we have to do so also when they occur within the SAME rule (as I actually did in the DAPRECO
knowledge base). Variables are universally quantified over the KB, so they must indeed have the same name. Thus, the following Atom(s) occurring in section1_1_PrescriptiveStatement1: <ruleml:Atom> <ruleml:Rel>Vehicle</ruleml:Rel> <ruleml:Var>vehicle</ruleml:Var> </ruleml:Atom> <ruleml:Atom> <ruleml:Rel>IsPrivate</ruleml:Rel> <ruleml:Var>vehicle</ruleml:Var> </ruleml:Atom> should be changed into: <ruleml:Atom> <ruleml:Rel>Vehicle</ruleml:Rel> <ruleml:Var key=":myID">vehicle</ruleml:Var> </ruleml:Atom> <ruleml:Atom> <ruleml:Rel>IsPrivate</ruleml:Rel> <ruleml:Var keyRef="#myID"/> </ruleml:Atom> In other words, we always use "key" the first time we introduce a variable and then "keyRef" for all other occurrences, both within the same rule or within other rules. We use a different "key"
only when we indeed want to talk about a different vehicle (e.g., because we want to compare two vehicles). Is my interpretation correct? ======================================================================================================================================================== QUESTION #3: For modelling "The schedule provides for fixed penalties for offences under section 1." we decided to add the following <ruleml:Atom>: <ruleml:Atom> <ruleml:Rel>PenaltyFor</ruleml:Rel> <ruleml:Var>penalty</ruleml:Var> <ruleml:Var>offence</ruleml:Var> </ruleml:Atom> And then a constitutive rule for each pair (offence, penalty) found in the schedule. But, indeed, in the schedule there is only one of such constitutive rules (see first link I posted above): "The fixed penalty for an offence under section 1 is £100." I do not exactly know how to model this (single) constitutive rule. Note that section 1 says "It is an offence for an adult to smoke in a private motor vehicle" and we modeled this by stating that,
under these conditions, it is forbidden to smoke: <lrml:Prohibition> <ruleml:Atom> <ruleml:Rel>Smoke</ruleml:Rel> <ruleml:Var>adult</ruleml:Var> </ruleml:Atom> </lrml:Prohibition> But how is this related with the variable "<ruleml:Var>offence</ruleml:Var>" above?? In order to talk about "an offence under section 1" we should
reify the smoking action into that specific offence. In other words, we should introduce a constitutive rule stating "The fact that an adult smokes in his private vehicle is an offence under section 1". Or, alternatively, a constitutive rule stating
that if an adult smoke in the private vehicle, he commits an offence under section 1. <ruleml:if> <ruleml:Atom> <ruleml:Rel>Smoke</ruleml:Rel> <ruleml:Var>adult</ruleml:Var> </ruleml:Atom> <ruleml:Atom> <ruleml:Rel>IsIn</ruleml:Rel> <ruleml:Var>adult</ruleml:Var> <ruleml:Var>vehicle</ruleml:Var> </ruleml:Atom> <ruleml:Atom> <ruleml:Rel>Vehicle</ruleml:Rel> <ruleml:Var>vehicle</ruleml:Var> </ruleml:Atom> <ruleml:Atom> <ruleml:Rel>IsPrivate</ruleml:Rel> <ruleml:Var>vehicle</ruleml:Var> </ruleml:Atom> </ruleml:if> <ruleml:then> <ruleml:Atom> <ruleml:Rel>Commit</ruleml:Rel> <ruleml:Var>adult</ruleml:Var> <ruleml:Var>offence</ruleml:Var> </ruleml:Atom> <ruleml:Atom> <ruleml:Rel>OffenceUnderSection1</ruleml:Rel> <ruleml:Var>offence</ruleml:Var> </ruleml:Atom> </ruleml:then> And now we can codify that £100 is a penalty for an offence that satisfy the predicate <ruleml:Rel>OffenceUnderSection1</ruleml:Rel>. Is my interpretation correct? Do you like my solution? Thanks Livio |
Attachment:
SAMPLE.xml
Description: SAMPLE.xml
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]