- From: Vladimir Alexiev via GitHub <sysbot+gh@w3.org>
- Date: Thu, 13 Feb 2025 10:16:29 +0000
- To: public-shacl@w3.org
VladimirAlexiev has just created a new issue for https://github.com/w3c/data-shapes:
== define sh:ReferenceShape, sh:SimpleShape to be able to limit validation effort ==
- https://github.com/w3c/data-shapes/issues/213 describes how in Ontotext GraphDB we use two shapes per "business class": Reference vs Full
- in https://github.com/w3c/data-shapes/issues/216#issuecomment-2656064728 @mielvds asks for "a profile for data modeling & not necessarily for validation"
I'd like to focus in this issue on this question:
> What are the SHACL features needed for modeling, and which are amenable to easier validation? The "20% features used in 80% of cases"?
I'll write my idea in turtle, but:
- There can be various ways to limit features to achieve constant time, so we should discuss the limitations.
- The currently listed limitations need to be updated when we add more features, in particular Node Expressions
- Parts of the descriptions should go into a new spec section
- I don't have any sort of mathematical proof that limitations (`skos:scopeNote`) ensure the desired outcome (`rdfs:comment`)
```ttl
sh:ReferenceShape a rdf:Class; rdfs:subClassOf sh:NodeShape;
rdfs:label "Reference shape";
rdfs:comment "A node shape that can be validated in constant time regardless of the size of the data graph";
skos:scopeNote """A reference shape should not use:
- sh:node
- sh:property over multi-valued properties
- sh:path with anything but a simple property or sh:inversePath
- SPARQL constraints""",
"""If a NodeShape is asserted to be a ReferenceShape then
the SHACL processor must check the limitations and raise an error if they are not satisfied""",
"""If a NodeShape matches the limitations then
it can be asserted internally by the SHACL processor as a ReferenceShape, which can help with checking shapes that use it""".
sh:SimpleShape a rdf:Class; rdfs:subClassOf sh:NodeShape;
rdfs:label "Simple shape";
rdfs:comment "A node shape that can be validated in linear time with respect to the size of the node's neighborhood in the data graph";
scos:scopeNote "A Simple shape can use sh:node only with sh:ReferenceShapes",
"""If a NodeShape is asserted to be a SimpleShape then
the SHACL processor must check the limitations and raise an error if they are not satisfied""".
```
Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/242 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 13 February 2025 10:16:31 UTC