Open ajnelson-nist opened 9 months ago
This behaviour in PySHACL is left over from before SHACL-AF spec was published. The first few versions of PySHACL (with built-in inferencing options) were released more than a year before SHACL-AF was released, so sh:entailment
and sh:Rules
didn't exist.
The current situation is a result of a mismatch between the PySHACL's built-in system for inferencing, and SHACL-AF's specified method for entailment.
The ideal solution would be to implement support for sh:entailment
, use that as the default method for enabling RDFS/OWL inferencing, and remove the cli option. That however would be a breaking change.
I do plan a similar breaking change in the near future that switches --advanced
on by default, so I suppose it makes sense to make this sh:entailment
change at the same time.
I see from today's features status that
sh:entailment
is not currently implemented in pySHACL.I've also seen the
--advanced
flag and some discussion on other issues (e.g. #60 ) around SHACL-AF.From Section 8.3 of the SHACL-AF document, there is language around what looks like "halting fast" if the triple
$ontology sh:entailment sh:Rules .
appears in the input shapes and the engine ~"doesn't support thesh:Rules
entailment regime."What should happen if I have this graph,
sh-example.ttl
...... and I use it in these two commands?
Put another way - should the second command fail because only
--advanced
would "enable"sh:Rules
?Relatedly, because I'm curious about what else implementing
sh:entailment
might mean: is there a relationship betweensh:entailment
IRIs and some ofpyshacl
's inference modes? It looks like there are IRIs from SPARQL that predate SHACL, but SHACL doesn't make impositions within the SHACL specification on what IRIs must be supported. (SPARQL entailment regimes are referenced, but don't seem to be required.) So, if pySHACL said it supported RDFS inferencing, and treated a shapes graph containing$ontology sh:entailment <http://www.w3.org/ns/entailment/RDFS> .
with the same runtime effect aspyshacl --inference rdfs
, would that be a pySHACL extension behavior over the SHACL specification?