Package de.learnlib.filter.cache.dfa
Class DFAHashCacheOracle<I>
- java.lang.Object
-
- de.learnlib.filter.cache.dfa.DFAHashCacheOracle<I>
-
- Type Parameters:
I
- input symbol type
- All Implemented Interfaces:
LearningCache<DFA<?,I>,I,Boolean>
,LearningCache.DFALearningCache<I>
,LearningCacheOracle<DFA<?,I>,I,Boolean>
,LearningCacheOracle.DFALearningCacheOracle<I>
,MembershipOracle<I,Boolean>
,MembershipOracle.DFAMembershipOracle<I>
,BatchProcessor<Query<I,Boolean>>
,QueryAnswerer<I,Boolean>
,Resumable<DFAHashCacheOracle.DFAHashCacheOracleState<I>>
public class DFAHashCacheOracle<I> extends Object implements LearningCacheOracle.DFALearningCacheOracle<I>, Resumable<DFAHashCacheOracle.DFAHashCacheOracleState<I>>
ALearningCacheOracle.DFALearningCacheOracle
that uses aMap
for internal cache organization.Note: this implementation is not thread-safe. If you require a cache that is usable in a parallel environment. consider using the alternatives offered by the
ThreadSafeDFACaches
factory from thelearnlib-parallelism
artifact.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DFAHashCacheOracle.DFAHashCacheOracleState<I>
-
Nested classes/interfaces inherited from interface de.learnlib.filter.cache.LearningCache
LearningCache.DFALearningCache<I>, LearningCache.MealyLearningCache<I,O>, LearningCache.MooreLearningCache<I,O>
-
Nested classes/interfaces inherited from interface de.learnlib.filter.cache.LearningCacheOracle
LearningCacheOracle.DFALearningCacheOracle<I>, LearningCacheOracle.MealyLearningCacheOracle<I,O>, LearningCacheOracle.MooreLearningCacheOracle<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 Concrete Methods Modifier and Type Method Description EquivalenceOracle<DFA<?,I>,I,Boolean>
createCacheConsistencyTest()
Creates a cache consistency test.void
processQueries(Collection<? extends Query<I,Boolean>> queries)
Processes the specified collection of queries.void
resume(DFAHashCacheOracle.DFAHashCacheOracleState<I> state)
Resume the datastructure from a previously suspended point in time.DFAHashCacheOracle.DFAHashCacheOracleState<I>
suspend()
Expose the state object.-
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.MembershipOracle
answerQuery, answerQuery, asOracle, processBatch, processQuery
-
-
-
-
Method Detail
-
createCacheConsistencyTest
public EquivalenceOracle<DFA<?,I>,I,Boolean> createCacheConsistencyTest()
Description copied from interface:LearningCache
Creates a cache consistency test. A cache consistency test is an equivalence oracle which checks a given hypothesis against the current contents of the cache. Hence, no queries are posed to the underlying system.The created cache consistency test is backed by the cache contents. This method does not need to be invoked repeatedly when the cache contents change.
- Specified by:
createCacheConsistencyTest
in interfaceLearningCache<DFA<?,I>,I,Boolean>
- Returns:
- a cache consistency test for the contents of this cache
-
processQueries
public void processQueries(Collection<? extends Query<I,Boolean>> 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,Boolean>
- Parameters:
queries
- the queries to process- See Also:
Query.answer(Object)
-
suspend
public DFAHashCacheOracle.DFAHashCacheOracleState<I> suspend()
Description copied from interface:Resumable
Expose the state object.
-
-