Class StrategyRewriteGraph
java.lang.Object
es.ucm.maude.bindings.StrategyRewriteGraph
Complete rewriting graph under the control of a strategy from an initial state.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Cause of the transition in the graph. -
Constructor Summary
ConstructorsConstructorDescriptionStrategyRewriteGraph
(Term initial, StrategyExpression strat) Construct a strategy transition graph.
StrategyRewriteGraph
(Term initial, StrategyExpression strat, StringVector opaques) Construct a strategy transition graph.
StrategyRewriteGraph
(Term initial, StrategyExpression strat, StringVector opaques, boolean biased) Construct a strategy transition graph.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
int
getNextState
(int stateNr, int index) List the successors of a state in the graph.
int
Get the number of real (not merged) states in the graph (in linear time).int
Get the number of rewrites used to generate this graph,
including the evaluation of atomic propositions.int
Get the number of states in the graph.getStateStrategy
(int stateNr) Get the strategy that will be executed next
from the given state.
getStateTerm
(int stateNr) Get the term of the given state.
getTransition
(int origin, int dest) Get the transition that connects two states (if any).
boolean
isSolutionState
(int stateNr) Whether the state is a solution for the strategy.
modelCheck
(Term formula) Model check a given LTL formula.
-
Constructor Details
-
StrategyRewriteGraph
public StrategyRewriteGraph(Term initial, StrategyExpression strat, StringVector opaques, boolean biased) Construct a strategy transition graph.
- Parameters:
initial
- Initial state term (it will be reduced).strat
- A strategy expression.opaques
- A list of strategy names to be considered opaque.biased
- Whether the matchrews should be biased.
-
StrategyRewriteGraph
Construct a strategy transition graph.
- Parameters:
initial
- Initial state term (it will be reduced).strat
- A strategy expression.opaques
- A list of strategy names to be considered opaque.
-
StrategyRewriteGraph
Construct a strategy transition graph.
- Parameters:
initial
- Initial state term (it will be reduced).strat
- A strategy expression.
-
-
Method Details
-
delete
public void delete() -
getStateTerm
Get the term of the given state.
- Parameters:
stateNr
- A state number.
-
getStateStrategy
Get the strategy that will be executed next
from the given state.
- Parameters:
stateNr
- A state number.
- Returns:
- That strategy expression or null if there is
no pending strategy in the current call or subsearch frame.
-
getTransition
Get the transition that connects two states (if any).
- Parameters:
origin
- Origin state number.dest
- Destination state number.
- Returns:
- That transition if exists or a null pointer.
-
getNrRewrites
public int getNrRewrites()Get the number of rewrites used to generate this graph,
including the evaluation of atomic propositions. -
modelCheck
Model check a given LTL formula.
- Parameters:
formula
- Term of theFormula
sort.
- Returns:
- The result of model checking.
-
getNrStates
public int getNrStates()Get the number of states in the graph. -
getNrRealStates
public int getNrRealStates()Get the number of real (not merged) states in the graph (in linear time). -
getNextState
public int getNextState(int stateNr, int index) List the successors of a state in the graph.
- Parameters:
stateNr
- A state number.index
- A child index (from zero).
- Returns:
- The state number of a successor or -1.
-
isSolutionState
public boolean isSolutionState(int stateNr) Whether the state is a solution for the strategy.
- Parameters:
stateNr
- A state number.
-