Simulator.SimulationSnapshot
innerVariablesMemory, outputsMemory, simulatedModel
Modifier and Type | Method and Description |
---|---|
Vector |
enableGuardedAction(GuardedAction guardedAction,
EventList fixedEvents,
java.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> fixedInputs)
Generates an input vector to enable the specified guarded action considering the specified
fixed events and inputs.
|
ru.ispras.fortress.expression.Node |
fillExpression(ru.ispras.fortress.expression.Node expression,
java.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> fixedInputs)
Fills the specified expression with the specified inputs and current values of inner variables.
|
EfsmTransitionCoverage |
getCoverage()
Returns a test coverage reached during simulation since last reset.
|
EfsmState |
getCurrentState()
Returns a state of an underlying EFSM which this simulator is currently in.
|
java.util.Set<java.lang.String> |
getInnerVariableNames()
Returns a collection of inner variables' names.
|
EfsmTransition |
getLastTraversedTransition()
Returns a transition which was traversed by this simulator on last cycle.
|
java.lang.String |
getName()
Returns a name of this simulator.
|
java.util.Set<java.lang.String> |
getOutputVariableNames()
Returns a collection of output variables' names.
|
Efsm |
getSimulatedModel()
Returns a model which is simulated by this simulator.
|
ru.ispras.fortress.expression.NodeValue |
getVariableValue(java.lang.String variableName)
Returns value of variable with the specified name.
|
protected boolean |
hasInnerVariable(java.lang.String variableName)
Checks rather this operates with inner variable that has the specified name.
|
protected boolean |
hasInput(java.lang.String variableName)
Checks rather this operates with input variable that has the specified name.
|
boolean |
hasOutput(java.lang.String variableName)
Checks rather this operates with output variable that has the specified name.
|
ru.ispras.retrascope.engine.efsm.simulator.ProcessSimulator.ProcessSimulationSnapshot |
makeSimulationSnapshot()
Returns a snapshot representing a current state of the simulation.
|
void |
reset()
Resets this simulator, that is, returns it to an uninitialised state.
|
void |
resetCoverage()
Resets a test coverage achieved by this simulator.
|
Sequence |
simulateSequence(Sequence inputSequence)
Simulates processing of the specified input vector and returns produced output vector.
|
Vector |
simulateVector(Vector inputVector)
Simulates processing of the specified input vector and returns produced output vector.
|
getOutputVector, loadSnapshot, readVector, substituteVariables
public java.lang.String getName()
public EfsmState getCurrentState()
getCurrentState
in class Simulator<Efsm>
Efsm.getInitialState()
do if called immediately
after construction/reset of this simulatorreset()
public EfsmTransition getLastTraversedTransition()
public EfsmTransitionCoverage getCoverage()
getCoverage
in class Simulator<Efsm>
public void reset()
public Vector simulateVector(Vector inputVector)
Simulator
simulateVector
in class Simulator<Efsm>
inputVector
- the vector to be processedpublic Sequence simulateSequence(Sequence inputSequence)
Simulator
simulateSequence
in class Simulator<Efsm>
inputSequence
- the vector to be processedpublic Efsm getSimulatedModel()
Simulator
getSimulatedModel
in class Simulator<Efsm>
public java.util.Set<java.lang.String> getInnerVariableNames()
Simulator
getInnerVariableNames
in class Simulator<Efsm>
public java.util.Set<java.lang.String> getOutputVariableNames()
Simulator
getOutputVariableNames
in class Simulator<Efsm>
protected boolean hasInput(java.lang.String variableName)
Simulator
protected boolean hasInnerVariable(java.lang.String variableName)
Simulator
hasInnerVariable
in class Simulator<Efsm>
variableName
- Inner variable's name.true
when it operates with inner variable
that has the specified name, false
otherwise.public boolean hasOutput(java.lang.String variableName)
Simulator
public ru.ispras.fortress.expression.NodeValue getVariableValue(java.lang.String variableName)
Simulator
getVariableValue
in class Simulator<Efsm>
variableName
- variable namenull
otherwisepublic Vector enableGuardedAction(GuardedAction guardedAction, EventList fixedEvents, java.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> fixedInputs)
guardedAction
- the guarded action to be enabledfixedEvents
- the fixed eventsfixedInputs
- the fixed inputsnull
is
returnedpublic ru.ispras.fortress.expression.Node fillExpression(ru.ispras.fortress.expression.Node expression, java.util.Map<java.lang.String,ru.ispras.fortress.expression.NodeValue> fixedInputs)
expression
- the expression to be filledfixedInputs
- the fixed inputspublic void resetCoverage()
Simulator
resetCoverage
in class Simulator<Efsm>
public ru.ispras.retrascope.engine.efsm.simulator.ProcessSimulator.ProcessSimulationSnapshot makeSimulationSnapshot()
Simulator
makeSimulationSnapshot
in class Simulator<Efsm>