Class MealySimulatorSUL<I,O>
- java.lang.Object
-
- de.learnlib.driver.simulator.MealySimulatorSUL<I,O>
-
- Type Parameters:
I
- input symbol typeO
- output symbol type
- All Implemented Interfaces:
SUL<I,O>
- Direct Known Subclasses:
ObservableMealySimulatorSUL
,StateLocalInputMealySimulatorSUL
public class MealySimulatorSUL<I,O> extends Object implements SUL<I,O>
-
-
Constructor Summary
Constructors Constructor Description MealySimulatorSUL(net.automatalib.automaton.transducer.MealyMachine<?,I,?,O> mealy)
Constructor, usingnull
as the output for undefined transitions.MealySimulatorSUL(net.automatalib.automaton.transducer.MealyMachine<?,I,?,O> mealy, O noTransOut)
Constructor.
-
-
-
Constructor Detail
-
MealySimulatorSUL
public MealySimulatorSUL(net.automatalib.automaton.transducer.MealyMachine<?,I,?,O> mealy)
Constructor, usingnull
as the output for undefined transitions.This constructor is provided for convenience. It is equivalent to calling
MealySimulatorSUL(MealyMachine, Object)
withnull
as the second argument.- Parameters:
mealy
- Mealy machine
-
MealySimulatorSUL
public MealySimulatorSUL(net.automatalib.automaton.transducer.MealyMachine<?,I,?,O> mealy, O noTransOut)
Constructor.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 ofstep(Object)
will simply return the specifiednoTransOut
symbol.- Parameters:
mealy
- the Mealy machinenoTransOut
- the output symbol to use when encountering undefined transitions
-
-
Method Detail
-
pre
public void pre()
Description copied from interface:SUL
setup SUL.
-
post
public void post()
Description copied from interface:SUL
shut down SUL.
-
canFork
public boolean canFork()
Description copied from interface:SUL
Returns whether this SUL is capable offorking
.- Specified by:
canFork
in interfaceSUL<I,O>
- Returns:
true
if this SUL can be forked,false
otherwise- See Also:
SUL.fork()
-
fork
public SUL<I,O> fork()
Description copied from interface:SUL
Forks this SUL, if possible. The fork of a SUL is a copy which behaves exactly the same as this SUL. This method should always return a reseted SUL, regardless of whether this call is made between a call toSUL.pre()
andSUL.post()
.If
SUL.canFork()
returnstrue
, this method must return a non-null
object, which should behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, aUnsupportedOperationException
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.
-
-