public class SVInstantiationCP extends java.lang.Object implements Feature
ChoicePoint
for instantiating a schema
variable of a taclet with the term that is returned by a
ProjectionToTerm
. This feature is useful in particular
combined with ForEachCP
. Although the feature formally is a
choice point, it will always have exactly one branchModifier and Type | Class and Description |
---|---|
private class |
SVInstantiationCP.CP |
Modifier and Type | Field and Description |
---|---|
private BackTrackingManager |
manager |
private Name |
svToInstantiate |
private ProjectionToTerm |
value |
Modifier | Constructor and Description |
---|---|
private |
SVInstantiationCP(Name svToInstantiate,
ProjectionToTerm value,
BackTrackingManager manager) |
Modifier and Type | Method and Description |
---|---|
RuleAppCost |
computeCost(RuleApp app,
PosInOccurrence pos,
Goal goal)
Evaluate the cost of a
RuleApp . |
static Feature |
create(Name svToInstantiate,
ProjectionToTerm value,
BackTrackingManager manager) |
static Feature |
createTriggeredVarCP(ProjectionToTerm value,
BackTrackingManager manager) |
private SchemaVariable |
findSVWithName(TacletApp app) |
private final BackTrackingManager manager
private final Name svToInstantiate
private final ProjectionToTerm value
private SVInstantiationCP(Name svToInstantiate, ProjectionToTerm value, BackTrackingManager manager)
public static Feature create(Name svToInstantiate, ProjectionToTerm value, BackTrackingManager manager)
public static Feature createTriggeredVarCP(ProjectionToTerm value, BackTrackingManager manager)
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).private SchemaVariable findSVWithName(TacletApp app)