Re: Web Rule Language - WRL vs SWRL

 Hi all,

Sorry for bothering you, but I am interested in your discussion on SWRL,
and I have read all your emails carefully. Being a student, I know that my
knowledge is limited, and my points below might be somehow
boring/wrong/ridiculous. But, anyway, thank you for reading my email :)

(1) the example of
<#pat><#knows><#jo>.
<#pat><type><#Person>.
<#jo><type><#Person>.

I suppose that: as to ask for all Persons that know exactly one Person,

"pat" is in one SPARQL query as follows (due to the CLOSED database):

PREFIX foo:    <http://foo/>
SELECT ?x
WHERE { ?x rdf:type foo:Person .
	?x foo:knows ?y .
	?y rdf:type foo:Person .
	?x foo:knows ?z .
	?z rdf:type foo:Person .
	FILTER ?y = ?z .}

BUT, "pat" is not in the other SPARQL query as follows (due to the OPEN
semantics for OWL constructors):

PREFIX foo:    <http://foo/>
SELECT ?x
WHERE { ?x rdf:type foo:Person .
	?x rdf:type _:b .
	_:b rdf:type owl:Restriction .
	_:b owl:onProperty foo:knows . 
	_:b owl:cardinality "1"^^xsd:integer .}


That is, the result depends on the query, and as far as I know, the above
query (asking for all Persons that know exactly one Person) is not easy to
express in any rule-based languages: either it turns out to be a counting
function (which is undoubtly based on the closed existing
database/rulebase) as shown in the first case, or it employs the blank
nodes for OWL restrictions (whose semantics should be implemented by an
external engine) as shown in the second case.

(2) the complex SWRL rules beyond Datalog are making sense, for OWL
constructors used as the predicate symbols appearing in atoms. Perhaps,
the following one might be considered (which is borrowed from [1] with
some modification):

an OWL subClassOf axiom: Person \sqsubseteq \exists hasParent.Person     
                                (*)
a SWRL implication axiom: Grandchild(x) <- \exists hasParent.(\exists
hasParent.Person) (x)         (**)

surely, Grandchild has a simpler expression as: Grandchild(x) <-
hasParent(x,y) & hasParent(y,z)   (***)

Noting, given the unique fact of Person(Peter), Grandchild(Peter) can be
drawn out from SWRL reasoning, i.e., (*)+(**), but not the case of (***),
since there is no matching of "hasParent".

To be admitted, (**) is my revision of the DL version in [1], which
originally states: \exists hasParent.(\exists hasParent.Person)
\sqsubseteq Grandchild

btw: (*) cannot be expressed in DLP, lacking of assertions for the
existence in rules.

(3) finally, in my opinion, SWRL is also a framework for higher-order
logics, as interpreting SWRL rules in RDF-compatible semantics.

For example, Narcissism(x) <-- likeType(x, t) & t(x), we call it
Narcissism if it likes others whose type is the same as itself (and its
RDF syntax is provided below). Here, we have a variable of "t" being an
OWL class due to "t(x)", and being an OWL individual due to "likeType(x, t)".

Similar as OWL Full [2], SWRL Full also states:
CEXTI(SI(owl:Thing)) = CEXTI(SI(rdfs:Resource)),
CEXTI(SI(owl:ObjectProperty)) = CEXTI(SI(rdf:Property)),
CEXTI(SI(owl:Class)) = CEXTI(SI(rdfs:Class)).
And swrl:Variable is typed of owl:Class, whose instances are "t" and "x"
in the above example. Being RDF resources, "t" will be related to a
concrete unary predicate symbol whose ID shows up an OWL class, while "x"
will be related to a concrete constant symbol whose ID shows up an OWL
individual. Therefore, in a RDF-compatible view, SWRL works in the
higher-order logical framework.

  <swrl:Variable rdf:ID="t"/>
  <swrl:Variable rdf:ID="x"/>
  <swrl:Imp rdf:ID="example4swrlFull">
    <swrl:head>
      <swrl:AtomList>
        <rdf:first>
          <swrl:ClassAtom>
            <swrl:argument1 rdf:resource="#x"/>
            <swrl:classPredicate rdf:ID="Narcissism"/>
          </swrl:ClassAtom>
        </rdf:first>
        <rdf:rest
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
      </swrl:AtomList>
    </swrl:head>
    <swrl:body>
      <swrl:AtomList>
        <rdf:first>
          <swrl:IndividualPropertyAtom>
            <swrl:propertyPredicate rdf:ID="likeType"/>
            <swrl:argument1 rdf:resource="#x"/>
            <swrl:argument2 rdf:resource="#t"/>
          </swrl:IndividualPropertyAtom>
        </rdf:first>
        <rdf:rest>
          <swrl:AtomList>
            <rdf:first>
              <swrl:ClassAtom>
                <swrl:classPredicate rdf:resource="#t"/>
                <swrl:argument1 rdf:resource="#x"/>
              </swrl:ClassAtom>
            </rdf:first>
            <rdf:rest
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
          </swrl:AtomList>
        </rdf:rest>
      </swrl:AtomList>
    </swrl:body>
  </swrl:Imp>

[1] Boris Motik, Ulrike Sattler, and Rudi Studer. Query answering for
OWL-DL with rules. In Proc. of the 2004 International Semantic Web
Conference (ISWC 2004), pages 549¨C563, 2004.

[2] http://www.w3.org/TR/owl-semantics/rdfs.html#5.3

Best,
Sincerely,
Jing Mei

Received on Sunday, 3 July 2005 07:27:40 UTC