Package de.learnlib.oracle
Interface MembershipOracle<I,D>
-
- All Superinterfaces:
BatchProcessor<Query<I,D>>,QueryAnswerer<I,D>
- All Known Subinterfaces:
MembershipOracle.DFAMembershipOracle<I>,MembershipOracle.MealyMembershipOracle<I,O>,MembershipOracle.MooreMembershipOracle<I,O>,ParallelOracle<I,D>,SingleQueryOracle<I,D>,SingleQueryOracle.SingleQueryOracleDFA<I>,SingleQueryOracle.SingleQueryOracleMealy<I,O>,SingleQueryOracle.SingleQueryOracleMoore<I,O>,StatisticOracle<I,D>,SymbolQueryOracle<I,O>
public interface MembershipOracle<I,D> extends QueryAnswerer<I,D>, BatchProcessor<Query<I,D>>
Membership oracle interface. A membership oracle provides an elementary abstraction to a System Under Learning (SUL), by allowing to posequeries: A query is a sequence of input symbols (divided into a prefix and a suffix part, cf.Query.getPrefix()andQuery.getSuffix()) in reaction to which the SUL produces a specific observable behavior (outputting a word, acceptance/rejection etc.).- See Also:
DefaultQuery
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMembershipOracle.DFAMembershipOracle<I>A specialization of theMembershipOraclethat binds the output domain toBooleans.static interfaceMembershipOracle.MealyMembershipOracle<I,O>A specialization of theMembershipOraclethat binds the output domain toWords of the specified output type.static interfaceMembershipOracle.MooreMembershipOracle<I,O>A specialization of theMembershipOraclethat binds the output domain toWords of the specified output type.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default DanswerQuery(Word<I> input)default DanswerQuery(Word<I> prefix, Word<I> suffix)default MembershipOracle<I,D>asOracle()default voidprocessBatch(Collection<? extends Query<I,D>> batch)Process the batch.voidprocessQueries(Collection<? extends Query<I,D>> queries)Processes the specified collection of queries.default voidprocessQuery(Query<I,D> query)Processes a single query.
-
-
-
Method Detail
-
answerQuery
default D answerQuery(Word<I> input)
- Specified by:
answerQueryin interfaceQueryAnswerer<I,D>
-
answerQuery
default D answerQuery(Word<I> prefix, Word<I> suffix)
- Specified by:
answerQueryin interfaceQueryAnswerer<I,D>
-
processQuery
default void processQuery(Query<I,D> query)
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
Queryin a singletonCollectionusingCollections.singleton(Object). Implementations in subclasses should override this method to circumvent the Collection object creation, if possible.- Parameters:
query- the query to process
-
processQueries
void processQueries(Collection<? extends Query<I,D>> queries)
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.- Parameters:
queries- the queries to process- See Also:
Query.answer(Object)
-
asOracle
default MembershipOracle<I,D> asOracle()
- Specified by:
asOraclein interfaceQueryAnswerer<I,D>
-
processBatch
default void processBatch(Collection<? extends Query<I,D>> batch)
Description copied from interface:BatchProcessorProcess the batch.- Specified by:
processBatchin interfaceBatchProcessor<I>- Parameters:
batch- the batch to process
-
-