- All Superinterfaces:
BatchProcessor<Query<I,,D>> QueryAnswerer<I,D>
- All Known Subinterfaces:
LearningCacheOracle<A,,I, D> LearningCacheOracle.DFALearningCacheOracle<I>,LearningCacheOracle.MealyLearningCacheOracle<I,,O> LearningCacheOracle.MMMLTLearningCacheOracle<I,,O> LearningCacheOracle.MooreLearningCacheOracle<I,,O> MembershipOracle.DFAMembershipOracle<I>,MembershipOracle.MealyMembershipOracle<I,,O> MembershipOracle.MooreMembershipOracle<I,,O> ParallelOracle<I,,D> ParallelTimedQueryOracle<I,,O> SingleQueryOracle<I,,D> SingleQueryOracle.SingleQueryOracleDFA<I>,SingleQueryOracle.SingleQueryOracleMealy<I,,O> SingleQueryOracle.SingleQueryOracleMMLT<I,,O> SingleQueryOracle.SingleQueryOracleMoore<I,,O> TimedQueryOracle<I,O>
- All Known Implementing Classes:
Adaptive2MembershipWrapper,CLIOracle,CLIOutputOracle,CounterOracle,DFACacheOracle,DFACounterOracle,DFAHashCacheOracle,DFALockableOracle,DFASimulatorOracle,DynamicParallelOracle,DynamicParallelTimedQueryOracle,InterningMealyMembershipOracle,InterningMembershipOracle,InterningMooreMembershipOracle,LockableOracle,MappedOracle,MealyCacheOracle,MealyCounterOracle,MealyLockableOracle,MealySimulatorOracle,MMLTLockableOracle,MooreCacheOracle,MooreCounterOracle,MooreLockableOracle,MooreSimulatorOracle,NFASimulatorOracle,ReuseOracle,SBALockableOracle,SBASimulatorOracle,SEVPALockableOracle,SEVPASimulatorOracle,SimulatorOracle,SPALockableOracle,SPASimulatorOracle,SPMMLockableOracle,SPMMSimulatorOracle,StateLocalInputSULOracle,StaticParallelOracle,StaticParallelTimedQueryOracle,StdInOracle,StdInOutputOracle,SULOracle,ThreadSafeDFACacheOracle,ThreadSafeMealyCacheOracle,ThreadSafeMooreCacheOracle,TimedSULOracle
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
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 pose
queries: A query is a sequence of input symbols (divided into a prefix and a suffix
part, cf. Query.getPrefix() and Query.getSuffix()) in reaction to which the SUL produces a specific
observable behavior (outputting a word, acceptance/rejection etc.).- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA specialization of theMembershipOraclethat binds the output domain toBooleans.static interfaceA specialization of theMembershipOraclethat binds the output domain toWords of the specified output type.static interfaceA specialization of theMembershipOraclethat binds the output domain toWords of the specified output type. -
Method Summary
Modifier and TypeMethodDescriptiondefault 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 Details
-
answerQuery
- Specified by:
answerQueryin interfaceQueryAnswerer<I,D>
-
answerQuery
- Specified by:
answerQueryin interfaceQueryAnswerer<I,D>
-
processQuery
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
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:
-
asOracle
- Specified by:
asOraclein interfaceQueryAnswerer<I,D>
-
processBatch
Description copied from interface:BatchProcessorProcess the batch.- Specified by:
processBatchin interfaceBatchProcessor<I>- Parameters:
batch- the batch to process
-