Package de.learnlib.oracle.membership
Class SimulatorOmegaOracle<S,I,D>
- java.lang.Object
-
- de.learnlib.oracle.membership.SimulatorOmegaOracle<S,I,D>
-
- Type Parameters:
S
- the state type.I
- the input type.D
- the output type.
- All Implemented Interfaces:
OmegaMembershipOracle<S,I,D>
,OmegaQueryAnswerer<S,I,D>
,BatchProcessor<OmegaQuery<I,D>>
,SingleQueryOmegaOracle<S,I,D>
- Direct Known Subclasses:
SimulatorOmegaOracle.DFASimulatorOmegaOracle
,SimulatorOmegaOracle.MealySimulatorOmegaOracle
public class SimulatorOmegaOracle<S,I,D> extends Object implements SingleQueryOmegaOracle<S,I,D>
AnswersOmegaQuery
s by simulating an automaton.Implementation note: Under the assumption that read-operations do not alter the internal state of the automaton, this oracle is thread-safe.
- See Also:
SimulatorOracle
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimulatorOmegaOracle.DFASimulatorOmegaOracle<S,I>
static class
SimulatorOmegaOracle.MealySimulatorOmegaOracle<S,I,O>
-
Nested classes/interfaces inherited from interface de.learnlib.oracle.OmegaMembershipOracle
OmegaMembershipOracle.DFAOmegaMembershipOracle<S,I>, OmegaMembershipOracle.MealyOmegaMembershipOracle<S,I,O>
-
Nested classes/interfaces inherited from interface de.learnlib.oracle.SingleQueryOmegaOracle
SingleQueryOmegaOracle.SingleQueryOmegaOracleDFA<S,I>, SingleQueryOmegaOracle.SingleQueryOmegaOracleMealy<S,I,O>
-
-
Constructor Summary
Constructors Constructor Description SimulatorOmegaOracle(A automaton, SimulatorOracle<I,D> simulatorOracle)
Constructs a newSimulatorOmegaOracle
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<@Nullable D,Integer>
answerQuery(Word<I> prefix, Word<I> loop, int repeat)
Returns an answer for anOmegaQuery
.MembershipOracle<I,D>
getMembershipOracle()
Gets theSimulatorOracle
used to answerQuery
s.boolean
isSameState(Word<I> input1, S s1, Word<I> input2, S s2)
Test for state equivalence by simply invokingObject.equals(Object)
.void
processQueries(Collection<? extends OmegaQuery<I,D>> queries)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.learnlib.oracle.OmegaMembershipOracle
asOracle, processBatch
-
Methods inherited from interface de.learnlib.oracle.SingleQueryOmegaOracle
processQuery
-
-
-
-
Constructor Detail
-
SimulatorOmegaOracle
public SimulatorOmegaOracle(A automaton, SimulatorOracle<I,D> simulatorOracle)
Constructs a newSimulatorOmegaOracle
.- Type Parameters:
A
- the automaton type.- Parameters:
automaton
- the automaton to simulate.simulatorOracle
- theSimulatorOracle
used to answerQuery
s.
-
-
Method Detail
-
getMembershipOracle
public MembershipOracle<I,D> getMembershipOracle()
Gets theSimulatorOracle
used to answerQuery
s.- Specified by:
getMembershipOracle
in interfaceOmegaMembershipOracle<S,I,D>
- Returns:
- the SimulatorOracle.
-
isSameState
public boolean isSameState(Word<I> input1, S s1, Word<I> input2, S s2)
Test for state equivalence by simply invokingObject.equals(Object)
.- Specified by:
isSameState
in interfaceOmegaMembershipOracle<S,I,D>
- Parameters:
input1
- the first access sequence.s1
- the first state.input2
- the second access sequence.s2
- the second state.- Returns:
- whether both states, or states via the given access sequences are equal.
- See Also:
OmegaMembershipOracle.isSameState(Word, Object, Word, Object)
-
processQueries
public void processQueries(Collection<? extends OmegaQuery<I,D>> queries)
- Specified by:
processQueries
in interfaceOmegaMembershipOracle<S,I,D>
- Specified by:
processQueries
in interfaceSingleQueryOmegaOracle<S,I,D>
-
answerQuery
public Pair<@Nullable D,Integer> answerQuery(Word<I> prefix, Word<I> loop, int repeat)
Returns an answer for anOmegaQuery
.The output is obtained through the
SimulatorOracle
, while the states are obtained by means of creating two access sequences to states in the simulated automaton.- Specified by:
answerQuery
in interfaceOmegaMembershipOracle<S,I,D>
- Specified by:
answerQuery
in interfaceOmegaQueryAnswerer<S,I,D>
- See Also:
OmegaQueryAnswerer.answerQuery(Word, Word, int)
-
-