W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2006

Re: SPARQL semantics: open issues for basic query patterns

From: <jos.deroo@agfa.com>
Date: Sat, 7 Jan 2006 17:42:34 +0100
To: tessaris@inf.unibz.it
Cc: Dan Connolly <connolly@w3.org>, Enrico Franconi <franconi@inf.unibz.it>, Pat Hayes <phayes@ihmc.us>, RDF Data Access Working Group <public-rdf-dawg@w3.org>, public-rdf-dawg-request@w3.org
Message-ID: <OF6DE6192A.BC8B89F7-ONC12570EF.00587842-C12570EF.005BC19D@agfa.com>

Sergio Tessaris wrote:
> By checking the entailment in the naive way, the bnode names are 
> scoped to a single solution pattern, and not across an answer set.
>
> Consider the following dataset:
>   _:a :r _:a
>   _:a :p _:b
>   _:b :url <http://example.org>
>
> and the query:
>   SELECT * { ?x ?p ?y }
>
> Under the G |= S(P) semantics, the server is allowed to return an 
> answer set like:
>
> ?x    ?p   ?y
> ----------------
> _:b12 :r   _:b13
? _:b26 :p   _:b27
> _:b40 :url <http://example.org>

Fine, I can see and test that

_:a :r _:a.
_:a :p _:b.
_:b :url <http://example.org>.

simply entails

_:b12 :r _:b13.
_:b26 :p _:b27.
_:b40 :url <http://example.org>.


> but even the unsettling
>
> ?x    ?p   ?y
> ----------------
> _:b12 :r   _:b13
> _:b26 :p   _:b13
> _:b12 :url <http://example.org>

but how could it ever entail

_:b12 :r _:b13.
_:b26 :p _:b13.
_:b12 :url <http://example.org>.


My proposed test case would be

Data

_:a :r _:a.
_:a :p _:b.
_:b :url <http://example.org>.

Query

SELECT * { ?x ?p ?y }

Answer

?x    ?p   ?y
-------------------------------
_:a_0 :r   _:a_0 
_:a_0 :p   _:b_0 
_:b_0 :url <http://example.org> 

and also that

?x    ?p   ?y
-------------------------------
_:a_0 :r   _:a_0 
_:a_0 :r   _:a_1
_:a_0 :p   _:b_0 
_:b_0 :url <http://example.org> 

is a good answer
but

?x    ?p   ?y
-------------------------------
_:a_0 :r   _:a_1 
_:a_0 :p   _:b_0 
_:b_0 :url <http://example.org> 

isn't a good answer.

So that are actually 3 test cases.

-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/
Received on Saturday, 7 January 2006 16:42:50 GMT

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