on failure in SHACL

Following up one of the recent responses to my comments on Shapes Constraint
Language (SHACL) lead me to look at how failure works in Shapes Constraint
Language (SHACL), W3C Editor's Draft 22 September 2016.


Here is the introduction of failure:

"Validation may also result in a failure, which is reported by a SHACL Full
processor to indicate that a request could not be handled."

What do SHACL Core processors do?


The SPARQL definitions for several built-in constraint components make use
of and report ?failure.  SHACL Core processors do not need to perform
failure detection in the queries that they generate.


Here are the cases where a failure can be initiated:

"Some implementations MAY report a failure if a recursion has been detected
at validation time."

Validation time is not defined in the document.

"The SHACL Full processor must produce a failure if the resulting SPARQL
query string cannot be parsed into a valid SPARQL 1.1 query."

"Processors that do not support $shapesGraph MUST report a failure if they
encounter a query that references this variable."

Encounter is not defined in the document.

"If one of the rows of the result set produced by a SELECT query contains the
binding true for the variable failure, then the SHACL Full processor must
signal a failure."

Is this for any SELECT query?

"If an entailment regime is provided in the data graph which is not supported
by the SHACL Full processor, the validation must produce a failure."

What happens if two different entailment regimes are provided in a data
graph?  (As well, can entailment regimes come from the shapes graph?)


Fail occurs several places in the document, including:

"However, some components might always fail in a particular constraint
type. For example, sh:closed does not make sense in property constraints or
sh:hasValue in focus node constraints."

Is this a failure?  Or is it some other result?

"If a value node fails the ASK query, a validation result is produced based
on the rules outlined in the section on ASK-based validators."

SPARQL queries do not fail.

"Note that in the SPARQL query above, we assume that the SUM operation fails
if one of the values of ?s is not a number."

SPARQL operators do not fail.

All occurences of "fail" need to be checked for problems of this sort.

Peter F. Patel-Schneider
Nuance Communications

Received on Friday, 23 September 2016 15:07:51 UTC