Class ProductivityChecker
java.lang.Object
fr.inria.rules.integraal.grd.impl.dependency_checker.ProductivityChecker
- All Implemented Interfaces:
DependencyChecker
- Direct Known Subclasses:
RestrictedProductivityChecker
Checks that the dependency will produce something
Let r1, r2 two rules (B+, B-, H), potentially with (safe) negation
We say that r1 may trigger r2 iff there exists a unifier u between B+(r2) and H(r1) such that
(i) μ(B+(r1)) ∩ μ(B-(r1)) = ∅
(ii) μ(B+(r1)) ∩ μ(B-(r2)) = ∅
(iii) μ(B+(r2)) ∩ μ(B-(r2)) = ∅
(iv) μ(B+(r2)) ∩ [μ(B-(r1))\μ(H(r1))] = ∅
(v) μ(H(r2)) ∉ [μ(B+(r1)) u μ(H(r1)) u μ(B+(r2))]
(vi) μ(B-(r2)) ∩ μ(H(r1)) = ∅
(vii) μ(B+(r2)) ∉ μ(B+(r1))
Let r1, r2 two rules (B+, B-, H) with (safe) negation
We say that r1 may prevent the triggering of r2 iff there exists a unifier u between Bi-(r2) and H(r1) such that
(i) [μ(B+(r1)) U μ(B+(r2))] ∩ [μ(B-(r1)) U μ(B-(r2))] = ∅
- Author:
- Florent Tornil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProductivityCheckerinstance()Returns the singleton productivity checker.booleanisValidNegativeDependency(FORule r1, FORule r2, QueryUnifier u) Checks whether the negative dependency induced by the supplied unifier is valid.booleanisValidPositiveDependency(FORule r1, FORule r2, QueryUnifier u) Checks whether the positive dependency induced by the supplied unifier is valid.
-
Constructor Details
-
ProductivityChecker
public ProductivityChecker()Creates the productivity dependency checker.
-
-
Method Details
-
instance
Returns the singleton productivity checker.- Returns:
- the default instance of this checker
-
isValidPositiveDependency
Description copied from interface:DependencyCheckerChecks whether the positive dependency induced by the supplied unifier is valid.- Specified by:
isValidPositiveDependencyin interfaceDependencyChecker- Parameters:
r1- the source ruler2- the target ruleu- the unifier between r1 and r2- Returns:
- true iff the dependency is valid
-
isValidNegativeDependency
Description copied from interface:DependencyCheckerChecks whether the negative dependency induced by the supplied unifier is valid.- Specified by:
isValidNegativeDependencyin interfaceDependencyChecker- Parameters:
r1- the source ruler2- the target ruleu- the unifier between r1 and r2- Returns:
- true iff the dependency is valid
-