https://www.w3.org/TR/shacl12-sparql/#rule-variations
In particular, the algorithm is non-deterministic in the sense that unless the order of rules is specified explicitly, the results may differ across executions. This is, for example, the case when rules draw conclusions from the number of certain triples yet those triples may be produced by other rules. In this document, the responsibility of producing a predictable ordering and layering/grouping of rules is left to the rule author.
Editorial:
"the order of rules" is ambiguous - it should be about the general concept but it can read as if specific to sh:order. The example needs sh:layer in general, for counting. It might get away with sh:order for specific data although the new repeated execution per layer has a considerable impact on that.
More generally, when is it appropriate to use sh:order with SHACL 1.2 Inf Rules, given the repeated layer execution until fixed point? Some text about this to assist the user (and reveiwer) would be helpful.
In https://www.w3.org/TR/shacl12-sparql/#rule-order, the example comment says:
(Aside - sh:order is not necessary in the example)
sh:order 1 ; # Will be evaluated before 2
but that isn't the whole story because it will also be run after rule 2 --
do
Execute one iteration over all iterating rules in the layer
while the iteration has produced newly inferred triples
means there is always a last "execute iteration" that produces no triples from any of the layer rules.
If any rule in a layer produces at least one triple, then all rules in the layer run at least twice.
Also:
and the stata (ignoring sh:layer).
s/stat/layer/
https://www.w3.org/TR/shacl12-sparql/#rule-variations
Editorial:
"the order of rules" is ambiguous - it should be about the general concept but it can read as if specific to
sh:order. The example needssh:layerin general, for counting. It might get away withsh:orderfor specific data although the new repeated execution per layer has a considerable impact on that.More generally, when is it appropriate to use
sh:orderwith SHACL 1.2 Inf Rules, given the repeated layer execution until fixed point? Some text about this to assist the user (and reveiwer) would be helpful.In https://www.w3.org/TR/shacl12-sparql/#rule-order, the example comment says:
(Aside -
sh:orderis not necessary in the example)but that isn't the whole story because it will also be run after rule 2 --
means there is always a last "execute iteration" that produces no triples from any of the layer rules.
If any rule in a layer produces at least one triple, then all rules in the layer run at least twice.
Also:
s/stat/layer/