Class RestrictedProductivityChecker
java.lang.Object
fr.inria.rules.integraal.grd.impl.dependency_checker.ProductivityChecker
fr.inria.rules.integraal.grd.impl.dependency_checker.RestrictedProductivityChecker
- All Implemented Interfaces:
DependencyChecker
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) u is productive
(ii) the new fact is not foldable on the facts used to produce it
- Author:
- Florent Tornil
-
Constructor Summary
ConstructorsConstructorDescriptionCreates the restricted productivity checker. -
Method Summary
Modifier and TypeMethodDescriptioninstance()Returns the singleton restricted productivity checker.booleanisValidPositiveDependency(FORule r1, FORule r2, QueryUnifier u) Checks whether the positive dependency induced by the supplied unifier is valid.Methods inherited from class ProductivityChecker
isValidNegativeDependency
-
Constructor Details
-
RestrictedProductivityChecker
public RestrictedProductivityChecker()Creates the restricted productivity checker.
-
-
Method Details
-
instance
Returns the singleton restricted 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- Overrides:
isValidPositiveDependencyin classProductivityChecker- Parameters:
r1- the source ruler2- the target ruleu- the unifier between r1 and r2- Returns:
- true iff the dependency is valid
-