- From: Holger Knublauch <holger@topquadrant.com>
- Date: Mon, 26 Sep 2016 16:21:32 +1000
- To: public-rdf-shapes@w3.org
On 24/09/2016 3:01, Peter F. Patel-Schneider wrote: > Following up one of the recent responses to my comments on Shapes Constraint > Language (SHACL) lead me to look at how undefined works in Shapes Constraint > Language (SHACL), W3C Editor's Draft 22 September 2016. > > > Undefined is used in two places in the SHACL document. > > > In Section 9.4, for functions: > > "For ASK queries, the function's return value is the result of the ASK query > execution, i.e. true or false. For SELECT queries, the function's return > value is the binding of the (single) result variable of the first row in the > result set. Since all other bindings will be ignored, such SELECT queries > SHOULD only return a single result variable and at most one row. > Also note that the result variable may be unbound, making the return value > of the function undefined. > > Recursive use of functions is undefined: If a SPARQL-based function > contains calls to other functions so that the same function with the same > combination of parameters would be visited twice then the result of the > function call is undefined. An implementation may either return no result > (unbound) or terminate the surrounding SPARQL query with an error." > > The first bit about ASK-based functions means that these functions cannot > have an undefined value. This goes counter to the detection of infinite > recursion that appears to be required for functions. As you have also highlighted in your previous message "on recursion in SHACL", the paragraph on the recursion of SPARQL functions is problematic and hopefully not necessary. So I have taken it out, which also resolves the issue about ASK queries. I have also switched to using the term "error" (which SPARQL 1.1 uses) instead of "undefined" for the function results. > > > In Appendix A, for sh:hasShape > > > "None of the parameters can be unbound. The result of the sh:hasShape > function is either true, false or undefined: > - [...] > - undefined if during the execution a failure has been reported. This result > indicates a failure. Implementations MAY for example use this to report > infinite recursion." > > sh:hasShape is a SPARQL function. SPARQL functions do not return undefined. I have eliminated the term "undefined" from the spec: https://github.com/w3c/data-shapes/commit/1350c3d5d382d73bce0c2193f24b0eeacbb45445 Holger
Received on Monday, 26 September 2016 06:22:07 UTC