|
SafeRulesOverview
Overview of OWL-Safe Rules
IntroductionThe general idea of Safe Rules for OWL is to add rules to OWL in a way that does not lead to undecidability and also provides a good chance of effective implementation. The main approach to achieving this has been via DL-Safe rules. There are several options that one could think of in adding rules to OWL:
It seems that a conservative stance is just to start with Horn rules. As the idea is to maintain implementability, it seems that just unary and binary predicates are the best way to start, except for n-ary datatype predicates (if these are added to OWL). As the rules are likely to be used in situations where the OWL portion may be extended, it seems difficult to reserve some predicates as non-OWL predicates. As OWL has datatypes, it seems obvious that this should be allowed. DL-safety is more conservative and thus may be better to start with. One consequence of not dividing predicates into OWL and non-OWL is that safety has to be obtained by restricting non-datatype variables to the individual names in the ontology. (This is the same as using a special non-DL predicate, O, that has been asserted only for indiviudal names.) Allowing in datatypes means that obtaining decidability becomes slightly more difficult. As far as syntax goes there are several options open. The rules could use the XML syntax utilized in SWRL. Alternatively, the rules could abide by the new XML syntax for RIF rules. Given that RIF is probably going to be a W3C recommendation it makes sense to go with the RIF syntax, except that the RIF syntax is extremely verbose. The RIF presentation syntax, on the other hand, is actually quite nice and compact, particularly if the Forall construct around the rule is removed. An Example of the Various SyntaxesExample rule in RIF presentation syntaxForall(?x (Teenager(?x) :- And(Person(?x) age(?x,"15"^^xsd:integer)))) Example rule in RIF XML syntax<rule>
<Forall
<declare><Var>x</Var></declare>
<formula>
<Implies>
<if>
<And>
<formula>
<Uniterm><op>Person</op><arg><Var>x</Var></arg></Uniterm>
</formula>
<formula>
<Uniterm><op>age</op><arg><Var>x</Var></arg>
<arg><Const type="xsd:integer">15</Const></arg>
</Uniterm>
</formula>
</And>
</if>
<then>
<formula>
<Uniterm><op>Teenager</op><arg><Var>x</Var></arg></Uniterm>
</formula>
</then>
</Implies>
</formula>
</Forall>
</rule>Example rule in SWRL abstract syntax Implies(Antecedent(Person(I-variable(x)) age(I-variable(x,"15"^^xsd:integer)))
Consequent(Teenager(I-variable(x))))Example rule in SWRL XML syntax <ruleml:imp>
<ruleml:_body>
<swrlx:ClassAtom>
<owlx:Class owlx:name="Person" />
<ruleml:var>x</ruleml:var>
</swrlx:ClassAtom>
<swrlx:datavaluedPropertyAtom swrlx:property="age">
<ruleml:var>x</ruleml:var>
<owlx:DataValue owlx:datatype="xsd:integer">15</owlx:DataValue>
</swrlx:datavaluedPropertyAtom>
</ruleml:_body>
<ruleml:_head>
<swrlx:ClassAtom>
<owlx:Class owlx:name="Teenager" />
<ruleml:var>x</ruleml:var>
</swrlx:ClassAtom>
</ruleml:_head>
</ruleml:imp>SemanticsThe semantics of safe rules for OWL is determined by the semantics of DL-Safe rules, so the rules are treated as disjunctions where object variables can be instantiated as individual names that appear in the ontology or the rules and datatype variables can be instantiated as data values that appear in the ontology or the rules. This is consistent with the semantics of RIF rules, provided that the special literal O(x) is added to rules for each individual variable in the rule and O'(x) is added to rules for each datatype variable in the rule. Neither O nor O' appear in the ontology. O(x) is true for individual names that appear in the ontology or the rules. O'(x) is true for data values that appear in the ontology or the rules. Proposed Solution SummaryThe proposal for Safe Rules for OWL is thus to have Horn rules with unary and binary predicates interpreted according to the DL-Safe rules semantics with individual variables restricted to individual names appearing in the ontology or rules and datatype variables restricted to values appearing in the ontology or rules. The exchange syntax will (reluctantly) be the RIF XML syntax. The presentation syntax will be the RIF presentation syntax with the option of leaving out enclosing universal constructs. ReferencesMain References
(DL-safe rules, longer journal version)
(DL-safe rules, original version)
(weak DL safety) Other references
|
Sign in to add a comment