[data-shapes] Provide an algorithm to calculate a stratification (#767)

afs has just created a new issue for https://github.com/w3c/data-shapes:

== Provide an algorithm to calculate a stratification ==
SHACL Rules ought to provide an algorithm for stratification.

While we could just state the requirements for consistent evaluation, it would be helpful to give an algorithm that achieves this.

Ideally, this algorithm would be "minimal" in the sense that it produces a least number of strata to make evaluation works. Other stratification might be used by an implementation for other evaluation implementation purposes but they must enforce the stratification requirement in order have the same output to be the same for all implementations.

This is a global stratification - it only depends on the rule set not the data. 

My sense is that a _minimal_ stratification is one that separates the negation elements, and any other stratification will further refine the set of rules at each layer of the minimal stratification. A proof of this would be nice to have 🍰 .

Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/767 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 8 February 2026 15:36:11 UTC