public class ForEachCP extends java.lang.Object implements Feature
ChoicePoint
that iterates over the
terms returned by a TermGenerator
. The terms are stored in a
TermBuffer
one after the other and can subsequently be used
to instantiate a rule applicationModifier and Type | Method and Description |
---|---|
RuleAppCost |
computeCost(RuleApp app,
PosInOccurrence pos,
Goal goal)
Evaluate the cost of a
RuleApp . |
static Feature |
create(TermBuffer var,
TermGenerator generator,
Feature body,
BackTrackingManager manager) |
public static Feature create(TermBuffer var, TermGenerator generator, Feature body, BackTrackingManager manager)
var
- TermBuffer
in which the terms are going to
be storedgenerator
- the terms that are to be iterated overbody
- a feature that is supposed to be evaluated repeatedly for the
possible values of var
public RuleAppCost computeCost(RuleApp app, PosInOccurrence pos, Goal goal)
Feature
RuleApp
.computeCost
in interface Feature
app
- the RuleApppos
- position where app
is to be appliedgoal
- the goal on which app
is to be appliedRuleAppCost
object. TopRuleAppCost.INSTANCE
indicates that the rule shall not be applied at all (it is discarded by
the strategy).Copyright © 2003-2019 The KeY-Project.