ISSUE-97: Shall SHACL include a mechanism to define constraints using derived values

sh:derivedValues

Shall SHACL include a mechanism to define constraints using derived values

State:
CLOSED
Product:
SHACL Spec
Raised by:
Holger Knublauch
Opened on:
2015-09-29
Description:
Simon and I have worked on a proposal to support the common scenario of "derived properties". The values of these are computed from other values in the surrounding graph. Examples include

- the area of a rectangle must be the product of width and height
- an uncle of a person is a male sibling of a parent
- the value of ex:addressCountry must be derived from following a path ex2:address/ex2:country

The proposal is described on a branch of the spec:

https://github.com/w3c/data-shapes/compare/derived-properties

For those who know SPIN, this is comparable to magic properties, but the spec describes them entirely for validation purposes, not inferencing. However, other tools may use the definition of derivedValues for other purposes. For example, we have use cases where Shapes should describe a "view" on some other data structure, flattening triples from a complex structure into a simpler structure. Many of TopQuadrant's consulting and customer projects also heavily use derived values. We believe having a standard syntax to express such derived values will open the door to many new use cases, with relatively small implementation costs. In fact it took me just a couple of hours to add support for them to my API.

NB: this feature is marked as an Advanced Feature because it relies on SPARQL. However, it could be moved into the Core if we include a simple Path vocabulary that maps to SPARQL 1.1 Property Path expressions. Such a path vocab could be put into the Appendix. The architecture is sufficiently generic to support something like sh:path, or other languages such as shjs:script.
Related Actions Items:
No related actions
Related emails:
  1. Re: shapes-ISSUE-97 (sh:derivedValues): Proposal to define constraints using derived values [SHACL Spec] (from holger@topquadrant.com on 2015-10-06)
  2. Re: shapes-ISSUE-97 (sh:derivedValues): Proposal to define constraints using derived values [SHACL Spec] (from pfpschneider@gmail.com on 2015-10-02)
  3. shapes-ISSUE-97 (sh:derivedValues): Proposal to define constraints using derived values [SHACL Spec] (from sysbot+tracker@w3.org on 2015-09-29)

Related notes:

RESOLUTION: Close ISSUE-97, adding sh:derivedValues as suggested
See http://www.w3.org/2015/11/19-shapes-minutes.html#resolution03

Arnaud Le Hors, 20 Nov 2015, 16:59:38

Display change log ATOM feed


Chair, Eric Prud'hommeaux <eric@w3.org>, 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: index.php,v 1.325 2014-09-10 21:42:02 ted Exp $