Reputation: 9771
I wonder about Graql Rule formalism. Can the rules create new instances?
As an extension to that is Graql monotonic? Can it guarantee that rules firing will always end and not contradict with facts in the KB?
Upvotes: 1
Views: 91
Reputation: 76
Can the rules create new instances?
The short answer is no. We require the rules to be range restricted - their application cannot create any disconnected nodes. In practice this means we require all rule head variables to be bound with respect to their respective rule body.
Please note that deduction with range restricted rules is decidable.
The long answer is that reasoning can operate with virtual concepts if needed so during query time, under the hood, actual new concepts can be created. These however are short-lived and tied to a specific transaction.
As an extension to that is Graql monotonic?
Up until the latest release (which as of now is 1.4.3) Graql is monotonic. The next release will introduce pattern negation which in conjunction with rules makes the reasoning non-monotonic. However, if you restrict your rules to be positive only, the reasoning monotonicity property is recovered.
Regarding contradictions, we are planning to inform the user of possible contradictions during data validation.
Upvotes: 2