Package de.learnlib.oracle
Interface SingleQueryOracle<I,D>
-
- Type Parameters:
I
- input symbol typeD
- output domain type
- All Superinterfaces:
BatchProcessor<Query<I,D>>
,MembershipOracle<I,D>
,QueryAnswerer<I,D>
- All Known Subinterfaces:
SingleQueryOracle.SingleQueryOracleDFA<I>
,SingleQueryOracle.SingleQueryOracleMealy<I,O>
,SingleQueryOracle.SingleQueryOracleMoore<I,O>
- All Known Implementing Classes:
DFASimulatorOracle
,MappedOracle
,MealySimulatorOracle
,MooreSimulatorOracle
,NFASimulatorOracle
,ReuseOracle
,SBASimulatorOracle
,SEVPASimulatorOracle
,SimulatorOracle
,SPASimulatorOracle
,SPMMSimulatorOracle
public interface SingleQueryOracle<I,D> extends MembershipOracle<I,D>
Base interface for oracles whose semantic is defined in terms of directly answering single queries (like aQueryAnswerer
), and that cannot profit from batch processing of queries.Implementing this class instead of directly implementing
MembershipOracle
means that theanswerQuery(Word, Word)
instead of theprocessQueries(Collection)
method needs to be implemented.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SingleQueryOracle.SingleQueryOracleDFA<I>
static interface
SingleQueryOracle.SingleQueryOracleMealy<I,O>
static interface
SingleQueryOracle.SingleQueryOracleMoore<I,O>
-
Nested classes/interfaces inherited from interface de.learnlib.oracle.MembershipOracle
MembershipOracle.DFAMembershipOracle<I>, MembershipOracle.MealyMembershipOracle<I,O>, MembershipOracle.MooreMembershipOracle<I,O>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description D
answerQuery(Word<I> prefix, Word<I> suffix)
default void
processQueries(Collection<? extends Query<I,D>> queries)
Processes the specified collection of queries.default void
processQuery(Query<I,D> query)
Processes a single query.-
Methods inherited from interface de.learnlib.oracle.MembershipOracle
answerQuery, asOracle, processBatch
-
-
-
-
Method Detail
-
processQuery
default void processQuery(Query<I,D> query)
Description copied from interface:MembershipOracle
Processes a single query. When this method returns, theQuery.answer(Object)
method of the supplied object will have been called with an argument reflecting the SUL response to the respective query.The default implementation of this method will simply wrap the provided
Query
in a singletonCollection
usingCollections.singleton(Object)
. Implementations in subclasses should override this method to circumvent the Collection object creation, if possible.- Specified by:
processQuery
in interfaceMembershipOracle<I,D>
- Parameters:
query
- the query to process
-
processQueries
default void processQueries(Collection<? extends Query<I,D>> queries)
Description copied from interface:MembershipOracle
Processes the specified collection of queries. When this method returns, each of the contained queriesQuery.answer(Object)
method should have been called with an argument reflecting the SUL response to the respective query.- Specified by:
processQueries
in interfaceMembershipOracle<I,D>
- Parameters:
queries
- the queries to process- See Also:
Query.answer(Object)
-
answerQuery
D answerQuery(Word<I> prefix, Word<I> suffix)
- Specified by:
answerQuery
in interfaceMembershipOracle<I,D>
- Specified by:
answerQuery
in interfaceQueryAnswerer<I,D>
-
-