private class AbstractPropositionalExpansionMacro.PropExpansionStrategy extends java.lang.Object implements Strategy
| Modifier and Type | Field and Description |
|---|---|
private java.util.Set<java.lang.String> |
admittedRuleNames |
private boolean |
allowOSS |
private Strategy |
delegate |
private Name |
NAME |
| Constructor and Description |
|---|
PropExpansionStrategy(Strategy delegate,
java.util.Set<java.lang.String> admittedRuleNames,
boolean allowOSS) |
| Modifier and Type | Method and Description |
|---|---|
RuleAppCost |
computeCost(RuleApp ruleApp,
PosInOccurrence pio,
Goal goal)
Evaluate the cost of a
RuleApp. |
void |
instantiateApp(RuleApp app,
PosInOccurrence pio,
Goal goal,
RuleAppCostCollector collector)
Instantiate an incomplete
RuleApp. |
boolean |
isApprovedApp(RuleApp app,
PosInOccurrence pio,
Goal goal)
Re-Evaluate a
RuleApp. |
boolean |
isStopAtFirstNonCloseableGoal()
|
Name |
name()
returns the name of this element
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdateStrategySettingsprivate final Name NAME
private final java.util.Set<java.lang.String> admittedRuleNames
private final Strategy delegate
private final boolean allowOSS
public PropExpansionStrategy(Strategy delegate, java.util.Set<java.lang.String> admittedRuleNames, boolean allowOSS)
public RuleAppCost computeCost(RuleApp ruleApp, PosInOccurrence pio, Goal goal)
FeatureRuleApp.computeCost in interface FeatureruleApp - the RuleApppio - 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).public boolean isApprovedApp(RuleApp app, PosInOccurrence pio, Goal goal)
StrategyRuleApp. This method is
called immediately before a rule is really appliedisApprovedApp in interface Strategypublic void instantiateApp(RuleApp app, PosInOccurrence pio, Goal goal, RuleAppCostCollector collector)
StrategyRuleApp. This method is
called when the AutomatedRuleApplicationManager
comes across a rule application in which some schema variables
are not yet instantiated, or which is in some other way
incomplete. The strategy then has the opportunity to
return/provide a list of (more) complete rule applications by
feeding them into the provided
RuleAppCostCollector.instantiateApp in interface Strategypublic boolean isStopAtFirstNonCloseableGoal()
StrategyisStopAtFirstNonCloseableGoal in interface Strategytrue stop, false continue on other Goals.