Chase Termination #
We introduce basic definitions and theorems around chase termination.
A ChaseDerivationSkeleton terminates if the underlying PossiblyInfiniteList is finite.
Equations
- cds.terminates = cds.branch.finite
Instances For
A ChaseDerivationSkeleton terminates if and only if its suffixes terminate.
A ChaseDerivation terminates if the underlying ChaseDerivationSkeleton is finite.
Equations
- cd.terminates = cd.terminates
Instances For
A TreeDerivation terminates if all of its branches terminate.
Equations
- td.terminates = ∀ (branch : ChaseDerivation N obs rules), branch ∈ td.branches → branch.terminates
Instances For
A KnowledgeBase terminates if all of its ChaseTrees terminate.
Equations
- kb.terminates obs N = ∀ (ct : ChaseTree N obs kb), ct.terminates
Instances For
A RuleSet terminates if all knowledge bases featuring this rule set terminate.
Equations
- rs.terminates obs N = ∀ (db : Database sig), { db := db, rules := rs }.terminates obs N
Instances For
Last Chase Element #
For terminating derivations, we define machinery to get the last chase node from the derivation.
For terminating derivations, we define the last chase node via turning the derivation into a finite list and then retreiving the last element.
Equations
- cd.last term = (cd.branch.toList_of_finite term).getLast ⋯
Instances For
The last node is a member of the derivation.
All suffixes have the same last node.
Every node is a predecessor of the last one.
For terminating derivations, the result is equal to the facts of the last node.
No trigger is active on the last node.
We now show some general results mainly relating termination and finiteness of the chase result.
A ChaseDerivation terminates if and only if there is a maximal node according to the ≼ relation.
A ChaseBranch terminates if and only if its result is Set.finite.
A terminating TreeDerivation only has finitely many branches. We show this using König's Lemma.
A TreeDerivation with finitely many branches only has finitely many fact sets in its result.
A ChaseTree terminates if and only if each fact set in its result is finite.