- From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
- Date: Thu, 16 Jun 2016 13:24:11 -0700
- To: RDF Data Shapes Working Group <public-data-shapes-wg@w3.org>
https://scirate.com/arxiv/1606.01441 Correlation and Substitution in SPARQL Daniel Hernández, Claudio Gutierrez, Renzo Angles In the current SPARQL specification the notion of correlation and substitution are not well defined. This problem triggers several ambiguities in the semantics. In fact, implementations as Fuseki and Virtuoso assume different semantics. In this technical report, we provide a semantics of correlation and substitution following the classic philosophy of substitution and correlation in logic, programming languages and SQL. We think this proposal not only fix the current ambiguities and problems, but helps to set a safe formal base to further extensions of the language. This work is part of an ongoing work of Daniel Hernandez. These anomalies in the W3C Specification of SPARQL 1.1 were detected early and reported no later than 2014, when two erratas were registered (cf. https://www.w3.org/2013/sparql-errata#errata-query-8 and https://www.w3.org/2013/sparql-errata#errata-query-10). I don't know if I like this solution. I think that a solution in terms of initial multisets of solution mappings would be better and also doesn't have the problem with MINUS described below. This also can be used for pre-binding. There are other problems with substitution in SPARQL. For example, SELECT ?x WHERE { ?x :a :b . FILTER EXISTS { ?x :a :b . MINUS { ?x :a :b . } } } returns all triples in the graph with predicate :a and object :b even though the MINUS appears to require their elimination. This is because the meaning of MINUS is discontinuous between situations where no variables are shared and some variables are shared. Although it looks as if there is one shared variable in the MINUS this variable is substituted by particular nodes as part of the meaning of EXISTS. So any use of substitution in SHACL has to be done very carefully. I think that if the SHACL spec has anything like substitute then the wording for it has to be created by a SPARQL expert who has been involved in the examining the problems with substitute in SPARQL. peter
Received on Thursday, 16 June 2016 20:24:43 UTC