ISSUE-131: The definition of sh:hasShape has errors and holes

sh:hasShape ill defined

The definition of sh:hasShape has errors and holes

State:
CLOSED
Product:
SHACL Spec
Raised by:
Peter Patel-Schneider
Opened on:
2016-03-07
Description:
The SHACL spec currently defines hasShape as follows:

**************
The SPARQL definitions in this section also assume the existence of a
built-in SPARQL function sh:hasShape, which takes the following arguments:

Argument Value Type Summary
$focusNode rdfs:Resource The focus node to validate.
$shape sh:Shape The shape to validate the focus node against.
$shapesGraph rdfs:Resource The current shapes graph.
$recursionIsError xsd:boolean If set to true then any recursive occurrence
of the same resource against the same shape
signals a failure, with the function
returning undefined. If not true then any
recursive occurrence must return true.

The result of the sh:hasShape function is either true, false or
undefined. The function returns true if the validation of the ?focusNode
against the given ?shape produces no validation results with severity
sh:Violation. Note that any validation results produced inside of the
sh:hasShape function are temporary, i.e. they are not added to the results
graph of the surrounding execution environment. However, some
implementations may add those nested validation results as annotations to
the surrounding validation results, via sh:detail.
**************

There are several problems with this definition.

First, it uses type in a way different from the rest of the document. This
is not just a case where SHACL typing changed---literals never had types in
SHACL. (This is a good argument to use a qualifier wherever SHACL typing is
meant.)

Second, dependency loops are currently invalid in SHACL. The precise
meaning of what is a dependency loop is is a bit uncertain, but it is
certainly the case that recursively running the same shape on the same
resource counts as a dependency loop. sh:hasShape needs to be defined in
such a way to signal that an invalid situation has occured.

Third, some constraints need to have bindings passed through the
sh:hasShape, or they cannot correctly compute validation results. However,
SPARQL is silent on the variable environment available inside functions so
any information has to be passed via arguments.

Fourth, arguments to SPARQL functions are RDF terms and thus are not graphs.
Related Actions Items:
No related actions
Related emails:
  1. Re: optional features (was Re: ISSUE-131: Proposal to close) (from holger@topquadrant.com on 2016-10-14)
  2. Re: optional features (was Re: ISSUE-131: Proposal to close) (from lehors@us.ibm.com on 2016-10-13)
  3. Re: ISSUE-131: Proposal to close (from kcoyle@kcoyle.net on 2016-10-13)
  4. Re: ISSUE-131: Proposal to close (from holger@topquadrant.com on 2016-10-13)
  5. Re: ISSUE-131: Proposal to close (from kontokostas@informatik.uni-leipzig.de on 2016-10-13)
  6. Re: ISSUE-131: Proposal to close (from holger@topquadrant.com on 2016-10-13)
  7. Re: ISSUE-131: Proposal to close (from kontokostas@informatik.uni-leipzig.de on 2016-10-13)
  8. Re: ISSUE-131: Proposal to close (from holger@topquadrant.com on 2016-10-13)
  9. Re: ISSUE-131: Proposal to close (from kontokostas@informatik.uni-leipzig.de on 2016-10-13)
  10. Re: ISSUE-131: Proposal to close (from holger@topquadrant.com on 2016-10-13)
  11. Re: ISSUE-131: Proposal to close (from kontokostas@informatik.uni-leipzig.de on 2016-10-13)
  12. ISSUE-131: Proposal to close (from holger@topquadrant.com on 2016-10-13)
  13. Re: RDF Data Shapes WG agenda for 4 October 2016 (from holger@topquadrant.com on 2016-10-04)
  14. ISSUE-131: We could drop the shapesGraph argument from sh:hasShape (from holger@topquadrant.com on 2016-09-26)
  15. Re: Please review the SHACL draft (was Re: Editing progress) (from holger@topquadrant.com on 2016-08-31)
  16. need of sh:hasShape (was: Re: ISSUE-68 and ISSUE-131: sh:hasShape and pre-binding) (from kontokostas@informatik.uni-leipzig.de on 2016-06-12)
  17. Re: ISSUE-68 and ISSUE-131: sh:hasShape and pre-binding (from kontokostas@informatik.uni-leipzig.de on 2016-06-12)
  18. Re: ISSUE-68 and ISSUE-131: sh:hasShape and pre-binding (from pfpschneider@gmail.com on 2016-06-11)
  19. ISSUE-68 and ISSUE-131: sh:hasShape and pre-binding (from pfpschneider@gmail.com on 2016-06-10)
  20. Re: ISSUE-131: Cleaned up definition of sh:hasShape (from lehors@us.ibm.com on 2016-04-12)
  21. Re: fundamental problems with SHACL (from holger@topquadrant.com on 2016-04-11)
  22. Re: ISSUE-131: Cleaned up definition of sh:hasShape (from holger@topquadrant.com on 2016-04-11)
  23. Re: ISSUE-131: Cleaned up definition of sh:hasShape (from pfpschneider@gmail.com on 2016-04-08)
  24. Re: fundamental problems with SHACL (from pfpschneider@gmail.com on 2016-04-08)
  25. Re: fundamental problems with SHACL (from holger@topquadrant.com on 2016-04-08)
  26. ISSUE-131: Cleaned up definition of sh:hasShape (from holger@topquadrant.com on 2016-04-08)
  27. shapes-ISSUE-131 (sh:hasShape ill defined): The definition of sh:hasShape has errors and holes [SHACL Spec] (from sysbot+tracker@w3.org on 2016-03-07)

Related notes:

RESOLUTION: Close ISSUE-131, removing sh:hasShape
See https://www.w3.org/2016/10/19-shapes-minutes.html#resolution04

Arnaud Le Hors, 20 Oct 2016, 09:32:15

Display change log ATOM feed


Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 131.html,v 1.1 2018/11/26 09:03:28 carine Exp $