W3C home > Mailing lists > Public > public-rif-wg@w3.org > January 2006

Re: [SWC] RIF & OWL compatibility

From: Enrico Franconi <franconi@inf.unibz.it>
Date: Sat, 14 Jan 2006 17:55:35 +0100
Message-Id: <904DD937-E58A-4E56-B74C-4E623EB3BFD2@inf.unibz.it>
Cc: "Gerd Wagner" <wagnerg@tu-cottbus.de>, "'Jos de Bruijn'" <jos.debruijn@deri.org>, public-rif-wg@w3.org
To: Michael Kifer <kifer@cs.sunysb.edu>

On 12 Jan 2006, at 17:06, Michael Kifer wrote:
> From talking to a number of people with real-world RDF experience,
> I get the impression that b-nodes are used to refer to individuals  
> when it
> is too inconvenient to give them explicit names. This is just  
> Scolemization.
> Does anybody have *real-world* RDF experience with cases where truly
> existential semantics of b-nodes is used?

You don't need to go very far.
It is needed in order to capture pure basic SPARQL with RDF entailment.

For example, given the data
     age(:john, "25"^^xsd:decimal)
corresponding to the RDF triple
     :john :age "25"^^xsd:decimal .
then the following is RDF entailed
corresponding to the RDF triple
     _:b rdf:type rdf:XMLLiteral .
where _:b is a bnode, with a true existential semantics for _:b.
Note that the triple
     "25"^^xsd:decimal rdf:type rdf:XMLLiteral .
is not legal RDF, since literals can not appear in subject position.  
In fact, the RDF triple
     _:b rdf:type rdf:XMLLiteral .
is really the strictest (and only) entailment that can be done from  
the starting data.
So, the SPARQL query (allow us some liberty in the syntax for the  
sake of clarity)
     Q() :- rdf:XMLLiteral(_:b)
should return TRUE.

Now, let's play this game in RIF, that should *at least* capture the  
basics of SPARQL.
In this example we have chosen to represent triples within RIF with a  
predicate "triple/3".
Given the data
     triple(:john, :age, "25"^^xsd:decimal)
the above query can be rewritten as
     :- triple(B, rdf:type, rdf:XMLLiteral)
In order to correctly answer the above basic query in RIF, you need  
an additional (unsafe) rule of the type:
     triple(B, rdf:type, rdf:XMLLiteral) :- triple(X, Y, Z), isLiteral 
where the variable B in the head is a true existential.
Note that the safe rule
     triple(Z, rdf:type, rdf:XMLLiteral) :- triple(X, Y, Z), isLiteral 
would be wrong, since it would entail the fact
     triple("25"^^xsd:decimal, rdf:type, rdf:XMLLiteral)
which is not a legal RDF triple.

The moral is: if RIF has to at least capture (and extend with  
recursion, negation, etc) basic SPARQL with RDF entailment, then true  
existential in the heads of rules are required.

Received on Saturday, 14 January 2006 16:55:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:47:36 UTC