- From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
- Date: Thu, 14 Jul 2016 11:20:22 -0700
- To: Andy Seaborne <andy@apache.org>, public-sparql-exists@w3.org
I think that the scope-related issue is number 5. Other scope-related issues are hidden by issue 2. peter On 07/14/2016 11:08 AM, Andy Seaborne wrote: > On 14/07/16 17:33, Peter F. Patel-Schneider wrote: >> Let's try to keep issues clean. >> >> Issue-3 is about how blank nodes work when they are substituted. When to >> substitute is a different matter. >> >> peter > > +1 > > I picked the example to be issue-3 only > > Daniel : for the numbering: > > https://w3c.github.io/sparql-exists/docs/sparql-exists.html > Issue-2 : variable only locations. > Issue-4 : scope related > > Andy > >> >> >> On 07/14/2016 08:25 AM, Daniel Hernández wrote: >>> Hi all, >>> >>> With the same data that Andy proposed, another query is: >>> >>> Query 2: >>> --------------------- >>> PREFIX : <http://example/> >>> >>> SELECT * { >>> ?s :p ?o >>> FILTER EXISTS { SELECT ?p { ?s ?p 1 } } >>> } >>> >>> In this case ?s is not in-scope on the inner graph pattern. However, Virtuoso >>> and rdf4j >>> assume that ?s in the outer and inner graph patterns are correlated. That is, >>> the result is >>> >>> Outcome 1: >>> ----------------- >>> | s | p | o | >>> ================= >>> | _:s1 | :p | 1 | >>> ----------------- >>> >>> I think that substituting a variable that occurs in a basic graph pattern has >>> some problems >>> that are originated by the two roles that it has. First, it has the role of >>> naming a value from >>> the data. Second, it has the role of using a value from the current solution >>> mapping. >>> >>> In the report (http://arxiv.org/abs/1606.01441) we normalize a query before >>> applying >>> substitution: >>> >>> Query 3: >>> --------------------- >>> PREFIX : <http://example/> >>> >>> SELECT * { >>> ?s :p ?o >>> FILTER EXISTS { SELECT ?p { ?z ?p 1 FILTER (!(bound(?z) && bound(?s)) >>> || ?z >>> = ?s) } } >>> } >>> >>> After the normalization, the inner graph pattern is equivalent with the >>> previous one, but >>> the variable ?s does not occur in a basic graph pattern, so it only has the >>> role of using values. >>> In this case substitution is safe respect to the issue of blank nodes. >>> >>> Daniel >>> >>> >>> >> > >
Received on Thursday, 14 July 2016 18:20:55 UTC