public class PFSASimulator extends Simulator
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.Vector<java.lang.Integer> |
fresh |
automa, pointer_state, pointer_string| Constructor and Description |
|---|
PFSASimulator(FSA automa) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeAutoma(FSA automa)
Change the automaton
|
protected Continuation |
createContinuation()
Create a new Continuation with the freezed state of the automaton
|
protected boolean |
isValid(Transition tr,
int symbol)
A transition tr with symbol in input is valid if :
sigma=T, stack not empty, top fresh or top equals to symbol in input
sigma=i , register i not empty and available, top fresh or top equals to symbol in input
sigma=square
Z=i, stack and register i not empty, top stack = top register i
Z=?
|
protected void |
restoreStateContinuation(Continuation c)
restore the state of the simulator with the parameters in the continuation C.
|
protected boolean |
sideConditions()
As a side conditions in the final state when the string in input is consumed the automaton must have
the empty stack
|
protected void |
updateState(Transition t,
int symbol)
Update the state of the simulator by performing the transition tr
|
backtracking, checkContinuation, contains, contains, run, steppublic PFSASimulator(FSA automa)
automa - the automaton to simulatepublic void changeAutoma(FSA automa)
changeAutoma in class Simulatorprotected boolean sideConditions()
sideConditions in class Simulatorprotected boolean isValid(Transition tr, int symbol)
protected void updateState(Transition t, int symbol)
updateState in class Simulatort - the transition to be performedsymbol - the symbol in inputprotected void restoreStateContinuation(Continuation c)
restoreStateContinuation in class Simulatorc - the continuation to be restoredprotected Continuation createContinuation()
createContinuation in class Simulator