- From: Sergio Tessaris <tessaris@inf.unibz.it>
- Date: Sun, 8 Jan 2006 16:50:44 +0100
- To: jos.deroo@agfa.com
- 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
On 7 Jan 2006, at 17:42, jos.deroo@agfa.com wrote: > > 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>. Jos, I think that you're reading the answerset in the wrong way. It happens that it looks like an RDF graph, but in fact it's a set composed by three *distinct* pattern solutions: S1=[?x/_:b12 ?p/:r ?y/ _:b13], S2=[?x/_:b26 ?p/:p ?y/_:b13] and S3=[?x/_:b12 ?p/:url ?y/ <http://example.org>]. Let's call G the dataset, and the pattern P is { ?x ?p ?y }. Now, it's fairly easy to see that G simply entails S1(P) = { _:b12 :r _:b13. }, and this is true for S2 and S3 as well. So all three of them are pattern solutions matching the dataset, and they have the right to be in the same answer set (according to Pat definition). When I said that bnodes are scoped over pattern solutions, and not over answer sets I meant that the same bnode name appearing in two distinct pattern solutions not necessarily correspond to the same bnode in the dataset. --sergio > > 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 Sunday, 8 January 2006 15:50:55 UTC