Re: updated draft

On 02/04/17 23:26, james anderson wrote:
> good morning;
>
>> On 2017-04-03, at 00:01, Peter F. Patel-Schneider <pfpschneider@gmail.com> wrote:
>>
>>
>>
>> On 04/02/2017 12:18 PM, james anderson wrote:
>>> good evening;
>>>
>>>> On 2017-04-02, at 21:04, Peter F. Patel-Schneider <pfpschneider@gmail.com> wrote:
>>>> […]
>>>>
>>>> There is no reading of https://www.w3.org/TR/sparql11-query/ that can result
>>>> in anything else, even though the end result is counter-intuitive.
>>>
>>>>
>>>>
>>>> There is then the question of what should happen.  However, that is a
>>>> different question from the question of what the definition of SPARQL in
>>>> https://www.w3.org/TR/sparql11-query/ says does happen.
>>>
>>>
>>> as i wrote, you misconstrue.
>>>
>>> best regards, from berlin,
>>> ---
>>> james anderson | james@dydra.com | http://dydra.com
>>
>> How do I misconstrue?  Do you believe that
>> https://www.w3.org/TR/sparql11-query/ dictates a particular treatment of blank
>> nodes in EXISTS or not?
>
> the text of the recommendation does not require that the operations necessary to implement exists be performed in the lexical domain and, were it to have, in a manner which conflates blank nodes and nondistinguished variables.


>> substitute(BGP(?x :q :b),{(x,_:c)} = BGP(_:c :q :b)
>
>
> yes the recommendation definitions are not specific as to whether this happens in the lexical domain or in a model domain.
> one is free to pick.

Please can we all quote the specification (lines, section numbers) to 
ground an argument in the fixed frame of reference.

-----------------------------------------------

I agree with Peter's a reading - I don't see a way to evaluate
BGP(_:c :q :b) without using the BGP matching definition and has a 
remapping of any blank node in the pattern.

-----------------------------------------------


Data:
_:c :p :d .
:e :q :b .


https://www.w3.org/TR/sparql11-query/#defn_substitute

    substitute(BGP(?x :q :b),{(x,_:c)} = BGP(_:c :q :b)

so we are now evaluating BGP(_:c :q :b)

"substitution" breaks the linkage of name variable to blank node in the 
graph.

(
It is also why Apache Jena gets EXISTS wrong - it preprocessed BGPs at 
the point when evaluation started but substitution happens during 
evaluation.
)

By this point in the evaluation, we have BGP(_:c :q :b).
No "?x", just a triple pattern with a blank node in it.

Just like
BGP([] :q :b).

The label (internal system identifier) is not taken into account.


This is Section 18.3
https://www.w3.org/TR/sparql11-query/#BasicGraphPattern

Section 18.3.1:
"Blank nodes are replaced using an RDF instance mapping, σ, from blank 
nodes to RDF terms; variables are replaced by a solution mapping from 
query variables to RDF terms."

NB the "variables are replaced" text does not apply. substitution 
replaces ?x by _:c.

"RDF instance mapping" is defined in "RDF Semantics" (strictly for 
SPARQL, the 2004 version as this predates RDF 1.1 which went to REC 
after SPARQl 1.0 and 1.1.)

0.3 Graph Definitions
https://www.w3.org/TR/2004/REC-rdf-mt-20040210/#graphdefs

The RDF instance mapping, σ is arbitrary because the choice is never 
exposed out of the BGP mapping.  Any mapping from blank node to some RDF 
Term is allowed if the triple after instance mapping occurs in the data.

This is the problem step for EXISTS because it breaks the linkage to the 
_:c in the graph.  It is now just a blank node to for RDF instance mapping.

_:c => :e

is permitted because it makes ":e :q :b" match.

james - please reference and quote any text that you think gives 
licences to a different reading.

 > in the lexical domain or in a model domain.
Those phrases do not appear in the SPARQL spec.


It does have:

Section 18.7 Extending SPARQL Basic Graph Matching
https://www.w3.org/TR/sparql11-query/#sparqlBGPExtend

SPARQL is defined for simple entailment.

One could argue for evaluation of EXISTS be evaluated with some sort of 
"zero-entailment" (terminolgy I just invented) where the RDF instance 
mapping is the identity function but I would expect that to have other 
problems.

 > does not require that the operations necessary to implement exists
 > be performed in the lexical domain

It does require (unfortunately) that BGP matching with simple entailment 
is used.  (The domain of RDF instance mapping is "blank nodes" and is 
not sensitive to the data graph shape.)

     Andy


5.1.2 Extending Basic Graph Pattern Matching
https://www.w3.org/TR/sparql11-query/#bgpExtend

"SPARQL evaluates basic graph patterns using subgraph matching, which is 
defined for simple entailment."

18.7 Extending SPARQL Basic Graph Matching

"The overall SPARQL design can be used for queries which assume a more 
elaborate form of entailment than simple entailment, by re-writing the 
matching conditions for basic graph patterns."



>
> best regards, from berlin,
> ---
> james anderson | james@dydra.com | http://dydra.com
>
>
>
>
>
>

Received on Monday, 3 April 2017 13:27:12 UTC