- From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
- Date: Sat, 1 Oct 2016 09:18:40 -0700
- To: Holger Knublauch <holger@topquadrant.com>, public-rdf-shapes@w3.org
This does eliminate the problem with undefined. Has the change to the behaviour of SHACL been approved by the working group? Peter F. Patel-Schneider Nuance Communications On 09/25/2016 11:21 PM, Holger Knublauch wrote: > 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 Saturday, 1 October 2016 16:19:11 UTC