Constructor and Description |
---|
MealySimulatorSUL(net.automatalib.automata.transout.MealyMachine<?,I,?,O> mealy)
Constructor, using
null as the output for undefined transitions. |
MealySimulatorSUL(net.automatalib.automata.transout.MealyMachine<?,I,?,O> mealy,
O noTransOut)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canFork()
Returns whether this SUL is capable of
forking . |
SUL<I,O> |
fork()
Forks this SUL, if possible.
|
void |
post()
shut down SUL.
|
void |
pre()
setup SUL.
|
O |
step(I in)
make one step on the SUL.
|
public MealySimulatorSUL(net.automatalib.automata.transout.MealyMachine<?,I,?,O> mealy)
null
as the output for undefined transitions.
This constructor is provided for convenience. It is equivalent to calling MealySimulatorSUL(MealyMachine,
Object)
with null
as the second argument.
mealy
- Mealy machinepublic MealySimulatorSUL(net.automatalib.automata.transout.MealyMachine<?,I,?,O> mealy, O noTransOut)
If the given Mealy machine has no undefined transitions, the second parameter has no effect. Otherwise, if the
Mealy machine is partial and sequences of step(Object)
invocations reach an undefined transition,
subsequent invocations of step(Object)
will simply return the specified noTransOut
symbol.
mealy
- the Mealy machinenoTransOut
- the output symbol to use when encountering undefined transitionspublic void pre()
SUL
public void post()
SUL
public O step(I in) throws SULException
SUL
step
in interface SUL<I,O>
in
- input to the SULSULException
public boolean canFork()
SUL
forking
.canFork
in interface SUL<I,O>
true
if this SUL can be forked, false
otherwiseSUL.fork()
public SUL<I,O> fork()
SUL
SUL.pre()
and
SUL.post()
.
If SUL.canFork()
returns true
, this method must return a non-null
object, which should
behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, a UnsupportedOperationException
must be thrown.
Implementation note: if resetting a SUL changes the internal state of this object in a non-trivial way (e.g., incrementing a counter to ensure independent sessions), care must be taken that forks of this SUL manipulate the same internal state.
Copyright © 2018. All rights reserved.