-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Stratification is used to gives conditions on the order rules are evaluated so that the output is predicable. Negation depends on order of execution.
https://en.wikipedia.org/wiki/Datalog#Negation
The spec should define stratification and provide an algorithm to calculate the layer numbering.
This can be done for rule but if applied to rule elements we may be able to define evaluation for slighter more generally.
For example. NOT can defined to require conditions dependencies on triple patterns with variables that are used in the NOT pattern, and not for unrelated variables.
Recursion of unrelated triple patterns could then be allowed. This is equivalent to rewrite, replacing the rule with several rules. On the other hand, it might not be a good idea to over-complicate the conditions for something that can be written, albeit in a different form.