<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Safe Rules for OWL 1.1</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Peter F. Patel-Schneider</institution>
          ,
          <addr-line>editor</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>The DL Safe SWRL Rules task force was tasked at OWLED 2007 to generate a proposal for how to add decidable and implementable rules to OWL in a manner consistent with the Semantic Web. This is the initial report from the task force. The 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 in the literature has been via DL-Safe rules [4]. As well, the result should abide by relevant Semantic Web standards. There are several options that one could think of in adding rules to OWL: 1. Should the rules be Horn rules or disjunctive rules? It seems that a conservative stance is just to start with Horn rules. 2. Should the rules have n-ary predicates, as opposed to just unary predicates (classes) and binary predicates (properties)? 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). 3. Should the rules have a distinction between OWL and non-OWL predicates? 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. 4. Should the rules have variables that range over datatypes? As OWL has datatypes, it seems obvious that this should be allowed. 5. Which version of safety should be allowed - the orginal one (DL-safety [4]) or the newer one (weak safety [5])? 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 cannot be syntactically obtained, by requiring variables to occur in non-DL atoms. Instead, 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 individual names.) ⋆ This paper summarizes the interim results of the DL Safe SWRL Rules task force.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Allowing datatypes means that obtaining decidability becomes slightly more
difficult. The problem is that if the rules are treated as if every data value is
allowed as a variable binding, then decidability may be lost. The special predicate
treatment works here, but is less intuitive.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Syntax</title>
      <p>
        As far as syntax goes there are several options open. The rules could use the
XML syntax utilized in SWRL [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Alternatively, the rules could abide by the
new XML syntax for RIF rules [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. 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.
      </p>
      <p>
        One problem with using RIF is whether to go with an RDF-compatible
version of RIF rules [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] or a first-order version of RIF rules. In the RDF-compatible
version rule atoms line up with RDF triples (e.g., john[rdf:type Person]). In
a first-order version, rule atoms look more like what one would expect in a
Description Logic (e.g., Person(john). It appears that RIF will allow the first-order
style, which is much more OWL friendly.
2.1 Examples of the Various Syntaxes
Example rule in RIF presentation syntax (modulo isses with IRI syntax):
Forall(?x (Teenager(?x)
:
      </p>
      <p>And(Person(?x) age(?x,"15"^^xsd:integer))))
Example rule in RIF XML syntax:
&lt;rule&gt;
&lt;Forall
&lt;declare&gt;&lt;Var&gt;x&lt;/Var&gt;&lt;/declare&gt;
&lt;formula&gt;
&lt;Implies&gt;
&lt;if&gt;
&lt;And&gt;
&lt;formula&gt;
&lt;Uniterm&gt;&lt;op&gt;Person&lt;/op&gt;</p>
      <p>&lt;arg&gt;&lt;Var&gt;x&lt;/Var&gt;&lt;/arg&gt;&lt;/Uniterm&gt;
&lt;/formula&gt;
&lt;formula&gt;
&lt;Uniterm&gt;&lt;op&gt;age&lt;/op&gt;&lt;arg&gt;&lt;Var&gt;x&lt;/Var&gt;&lt;/arg&gt;</p>
      <p>&lt;arg&gt;&lt;Const type="xsd:integer"&gt;15&lt;/Const&gt;&lt;/arg&gt;
&lt;/Uniterm&gt;
&lt;/formula&gt;
&lt;/And&gt;
&lt;/if&gt;
&lt;then&gt;
&lt;formula&gt;
&lt;Uniterm&gt;&lt;op&gt;Teenager&lt;/op&gt;</p>
      <p>&lt;arg&gt;&lt;Var&gt;x&lt;/Var&gt;&lt;/arg&gt;&lt;/Uniterm&gt;
&lt;/formula&gt;
&lt;/then&gt;
&lt;/Implies&gt;
&lt;/formula&gt;
&lt;/Forall&gt;
&lt;/rule&gt;
Example rule in SWRL abstract syntax:</p>
      <p>Implies(Antecedent(Person(I-variable(x))</p>
      <p>age(I-variable(x,"15"^^xsd:integer)))</p>
      <p>Consequent(Teenager(I-variable(x))))
Example rule in SWRL XML syntax:</p>
    </sec>
    <sec id="sec-3">
      <title>3 Semantics</title>
      <p>The semantics of safe rules for OWL is determined by the semantics of
DLSafe 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.</p>
      <p>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.
4</p>
    </sec>
    <sec id="sec-4">
      <title>A Possible Solution</title>
      <p>It thus appears that a possible solution for Safe Rules for OWL is 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.</p>
      <p>To conform with Semantic Web standards the exchange syntax could be the
RIF XML syntax. The presentation syntax could be the RIF presentation syntax
with the option of leaving out enclosing universal constructs.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <article-title>Rif basic logic dialect</article-title>
          .
          <source>W3C Working Draft, 30 October</source>
          <year>2007</year>
          . http://www.w3.org/TR/rif-bld,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Ian</given-names>
            <surname>Horrocks</surname>
          </string-name>
          ,
          <string-name>
            <surname>Peter F. Patel-Schneider</surname>
            , Harold Boley, Said Tabet, Benjamin Grosof, and
            <given-names>Mike</given-names>
          </string-name>
          <string-name>
            <surname>Dean</surname>
          </string-name>
          .
          <article-title>SWRL: A semantic web rule language</article-title>
          .
          <source>W3C Member Submission</source>
          , 21 May
          <year>2004</year>
          . http://www.w3.org/Submission/SWRL/,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <article-title>Rif rdf and owl compatability</article-title>
          .
          <source>W3C Working Draft, 30 October</source>
          <year>2007</year>
          , http://www.w3.org/TR/rif-rdf-owl/,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Boris</given-names>
            <surname>Motik</surname>
          </string-name>
          , Ulrike Sattler, and
          <string-name>
            <given-names>Rudi</given-names>
            <surname>Studer</surname>
          </string-name>
          .
          <article-title>Query answering for OWL-DL with rules</article-title>
          .
          <source>Journal of Web Semantics</source>
          ,
          <volume>3</volume>
          (
          <issue>1</issue>
          ):
          <fpage>41</fpage>
          -
          <lpage>60</lpage>
          ,
          <year>2005</year>
          . http://web.comlab.ox.ac.uk/oucl/work/boris.motik/publications/mss05queryjournal.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Riccardo</given-names>
            <surname>Rosati</surname>
          </string-name>
          .
          <article-title>DL+log: Tight integration of description logics and disjunctive datalog</article-title>
          .
          <source>In Proceedings of the Tenth International Conference on Principles of Knowledge Representation and Reasoning (KR</source>
          <year>2006</year>
          ), pages
          <fpage>68</fpage>
          -
          <lpage>78</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>