W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2004

Re: tests and inference? (and UNSAID)

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Mon, 20 Dec 2004 21:57:01 +0000
Message-ID: <41C74AAD.7080806@hp.com>
To: Dan Connolly <connolly@w3.org>
Cc: Steve Harris <S.W.Harris@ecs.soton.ac.uk>, RDF Data Access Working Group <public-rdf-dawg@w3.org>



Dan Connolly wrote:
> On Thu, 2004-12-16 at 15:17 +0000, Steve Harris wrote:
> 
>>On Thu, Dec 16, 2004 at 10:09:19 -0500, Kendall Clark wrote:
>>
>>>My point about the Sparql spec is that it doesn't help a person who
>>>wants to figure out why all of her tests are failing because her
>>>triple store defaultedly does RDFS inference (say) on all graphs. In
>>>fact, if there's nothing in the test suite about this issue, and a
>>>person goes and looks at the Sparql spec, the language about
>>>orthogonality of inference and query misleads *further*.
>>
>>Thats true, but none of the test results we have approved so far alter if
>>you have RDFS inference on. I hoped that was deliberate.
> 
> 
> Well, no, I don't think so. In particular, it seems we had better
> discuss the following two tests:
> 
> 1. input graph:
> 
> :C1 rdfs:subClassOf :C2.
> :x rdf:type :C1.
> 
> query:
> 
> SELECT ?C WHERE (:x rdf:type ?C).
> 
> answer per current* editors draft:
> 
> ?C binds to :C1
> (no other results)
> 
> 
> 2. same input graph
> 
> query:
> 
> SELECT ?x WHERE UNSAID (?x rdf:type :C2).
> 
> answer per current* editors' draft:
> 
> ?X binds to :x.

UNSAID does not bind variables so in this query x is unbound.
Executing, I get one row with x unset.

ASK UNSAID (?x rdf:type :C2) returns "yes"

> 
> 
> * http://www.w3.org/2001/sw/DataAccess/rq23/ $Revision: 1.158 $
> assuming I'm not making syntax errors, which I haven't checked
> carefully.

The odd '.' seems to have crept in :-)

> 
> 
>>My engine has no way to turn off inference (though it wouldn't be hard to
>>add globaly), but I'd like it if that was possible on a per-statement way
>>via the query language.
> 
> 
> I'm not sure what you mean; it makes more sense, to me, to specify what
> you're querying against in the FROM clause. If we wanted explicit
> support for "turning RDFS inferencing off" in SPARQL, I'd expect it
> to look something like:
> 
> 	SELECT ?C FROM rdfs(mydata.rdf) WHERE ( :x rdf:type ?C).
> vs.
> 	SELECT ?C FROM <mydata.rdf> WHERE ( :x rdf:type ?C).

Like /2004JulSep/0363.html, I am presuming that graphs and their closures 
are different graphs to query.  i.e. mydata.rdf and rdfs(mydata.rdf) are 
different graphs.

It occurred to me, inspired by Simon's datatyping graphs, that one way to 
have both inference and non-inference over the same graph in the same query 
is to attach the same ABox twice, once with a TBox:

SELECT *
FROM <mydata-rdfs> # The RDF closure of mydata.rdf
GRAPH <mydata.rdf> # The RDF

Then a pattern like:

     ( :x rdf:type ?C)

is answered by the RDFS closure  but

     SOURCE <mydata.rdf> (?direct rdfs:subClassOf :C)

only gives the asserted subclass relationships.

This could help with Steve's case where it isn't a matter of turning 
inference off (either per query or per triple pattern) because in that case 
there would not be the two different graphs.  There is no <mydata.rdf> to query.

	Andy

> 
> As I discussed earlier...
> RE: Test cases: source of a triple
> http://lists.w3.org/Archives/Public/public-rdf-dawg/2004JulSep/0363.html
> 
> ... in N3, it's a matter of using these terms in the right places:
> 
>   <mydata.rdf>.log:semantics
> 
> i.e. the graph contained in mydata.rdf vs
> 
>  (<rdfs-rules>.log:semantics
> <mydata.rdf>.log:semantics).log:conjunction.log:conclusion
> 
> i.e. the graph you get by conjoining mydata with rdfs-rules and
> computing the deductive closure.
> 
> 
> 
> 
> 
> 
>>- Steve
Received on Monday, 20 December 2004 21:57:36 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:21 GMT