Re: SPARQL semantics: open issues for basic query patterns

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 UTC