public abstract class AbstractBuiltInRuleApp extends java.lang.Object implements IBuiltInRuleApp
Modifier and Type | Field and Description |
---|---|
protected BuiltInRule |
builtInRule |
protected ImmutableList<PosInOccurrence> |
ifInsts |
protected PosInOccurrence |
pio |
Modifier | Constructor and Description |
---|---|
protected |
AbstractBuiltInRuleApp(BuiltInRule rule,
PosInOccurrence pio) |
protected |
AbstractBuiltInRuleApp(BuiltInRule rule,
PosInOccurrence pio,
ImmutableList<PosInOccurrence> ifInsts) |
Modifier and Type | Method and Description |
---|---|
boolean |
complete()
returns true if all variables are instantiated
|
ImmutableList<Goal> |
execute(Goal goal,
Services services)
applies the specified rule at the specified position
if all schema variables have been instantiated
|
AbstractBuiltInRuleApp |
forceInstantiate(Goal goal) |
java.util.List<LocationVariable> |
getHeapContext() |
ImmutableList<PosInOccurrence> |
ifInsts() |
boolean |
isSufficientlyComplete()
returns true if tryToInstantiate may be able to complete the app
|
PosInOccurrence |
posInOccurrence()
returns the PositionInOccurrence (representing a SequentFormula and
a position in the corresponding formula) of this rule application
|
abstract AbstractBuiltInRuleApp |
replacePos(PosInOccurrence newPos) |
BuiltInRule |
rule()
returns the rule of this rule application
|
abstract IBuiltInRuleApp |
setIfInsts(ImmutableList<PosInOccurrence> ifInsts) |
void |
setMutable(ImmutableList<PosInOccurrence> ifInsts)
HACK: but strategies do not work otherwise in the moment; I need to have a closer look on what is going on there
This restores the behaviour as it was before my previous commit for the moment
|
java.lang.String |
toString() |
abstract AbstractBuiltInRuleApp |
tryToInstantiate(Goal goal)
Tries to complete the rule application from the available information.
|
protected final BuiltInRule builtInRule
protected final PosInOccurrence pio
protected ImmutableList<PosInOccurrence> ifInsts
protected AbstractBuiltInRuleApp(BuiltInRule rule, PosInOccurrence pio, ImmutableList<PosInOccurrence> ifInsts)
protected AbstractBuiltInRuleApp(BuiltInRule rule, PosInOccurrence pio)
public void setMutable(ImmutableList<PosInOccurrence> ifInsts)
public BuiltInRule rule()
rule
in interface IBuiltInRuleApp
rule
in interface RuleApp
public PosInOccurrence posInOccurrence()
posInOccurrence
in interface RuleApp
public ImmutableList<Goal> execute(Goal goal, Services services)
public abstract AbstractBuiltInRuleApp replacePos(PosInOccurrence newPos)
replacePos
in interface IBuiltInRuleApp
public abstract IBuiltInRuleApp setIfInsts(ImmutableList<PosInOccurrence> ifInsts)
setIfInsts
in interface IBuiltInRuleApp
public ImmutableList<PosInOccurrence> ifInsts()
ifInsts
in interface IBuiltInRuleApp
public abstract AbstractBuiltInRuleApp tryToInstantiate(Goal goal)
IBuiltInRuleApp
UserInterfaceControl
to complete a built-in rule.
Returns a complete app only if there is exactly one contract.
If you want a complete app for combined contracts, use forceInstantiate
instead.
For an example implementation see e.g. UseOperationContractRule
or UseDependencyContractRule
.tryToInstantiate
in interface IBuiltInRuleApp
public AbstractBuiltInRuleApp forceInstantiate(Goal goal)
forceInstantiate
in interface IBuiltInRuleApp
public boolean isSufficientlyComplete()
IBuiltInRuleApp
isSufficientlyComplete
in interface IBuiltInRuleApp
public java.util.List<LocationVariable> getHeapContext()
getHeapContext
in interface IBuiltInRuleApp
public boolean complete()
public java.lang.String toString()
toString
in class java.lang.Object