|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deri.iris.optimisations.rulefilter.RuleFilter
public class RuleFilter
Methods to shrink rules to the absolute minimum of needed rules.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.deri.iris.api.IProgramOptimisation |
|---|
IProgramOptimisation.Result |
| Constructor Summary | |
|---|---|
RuleFilter()
|
|
| Method Summary | |
|---|---|
static Set<IPredicate> |
getDepends(Collection<IRule> r,
IQuery q)
Determines which predicates must be evaluated to evaluate a given query. |
static Set<IRule> |
getRulesForPredicates(Collection<IRule> r,
Collection<IPredicate> p)
Filters a set of rules so that it only contains rules defining a predicate out of a set of predicates. |
IProgramOptimisation.Result |
optimise(Collection<IRule> rules,
IQuery query)
Applies the optimisation algorithm to a set of rules. |
static Set<IRule> |
shrinkRules(Collection<IRule> r,
IQuery q)
Shrinks a set of rules to the absolute minimum of needed rules to evaluate a given query. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RuleFilter()
| Method Detail |
|---|
public IProgramOptimisation.Result optimise(Collection<IRule> rules,
IQuery query)
IProgramOptimisationResult which
contains the transformed rules and the adjusted query.
optimise in interface IProgramOptimisationrules - the rules to transformquery - the query for which to transform the rules
null, if the
transformation failed.
public static Set<IRule> shrinkRules(Collection<IRule> r,
IQuery q)
r - the rules to shrinkq - the query for which to shrink the rules
NullPointerException - if the set of rules is null
NullPointerException - if the query is null
public static Set<IRule> getRulesForPredicates(Collection<IRule> r,
Collection<IPredicate> p)
r - the rules to filterp - the predicate for which to filter the rules
NullPointerException - if the rules are null
NullPointerException - if the predicates are null
public static Set<IPredicate> getDepends(Collection<IRule> r,
IQuery q)
r - the rules on which to determine on which predicate the query
dependsq - the query for which to check the predicates
NullPointerException - if the set of rules is null
NullPointerException - if the query is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||