- Type Parameters:
I- input symbol typeO- output symbol type
- All Implemented Interfaces:
LearningCache<MealyMachine<?,,I, ?, O>, I, Word<O>> LearningCache.MealyLearningCache<I,,O> Resumable<de.learnlib.filter.cache.sul.AbstractSULCache.SULCacheState<I,,O>> SUL<I,,O> SupportsGrowingAlphabet<I>
- Direct Known Subclasses:
ThreadSafeSULCache
SUL.
Because on a SUL, a query is executed step-by-step, it is impossible to determine in advance whether the
cached information is sufficient to answer the complete query. However, in general it is undesired to execute any
actions on the underlying SUL as long as the requested information can be provided from the cache.
This class therefore defers any real execution to the point where the cached information is definitely insufficient;
if such a point is not reached before a call to SUL.post() is made, the underlying SUL is not queried.
Note: this implementation is not thread-safe. If you require a cache that is usable in a parallel
environment. use the ThreadSafeSULCache (or rather the ThreadSafeSULCaches factory) from the
learnlib-parallelism artifact.
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.learnlib.filter.cache.LearningCache
LearningCache.DFALearningCache<I>, LearningCache.MealyLearningCache<I,O>, LearningCache.MMLTLearningCache<I, O>, LearningCache.MooreLearningCache<I, O> -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlphabetSymbol(I symbol) booleancanFork()Returns whether this SUL is capable offorking.Creates a cache consistency test.fork()Forks this SUL, if possible.voidpost()shut down SUL.voidpre()setup SUL.voidResume the data structure from a previously suspended point in time.make one step on the SUL.suspend()Expose the state object.
-
Method Details
-
pre
public void pre()Description copied from interface:SULsetup SUL. -
post
public void post()Description copied from interface:SULshut down SUL. -
step
Description copied from interface:SULmake one step on the SUL. -
canFork
public boolean canFork()Description copied from interface:SULReturns whether this SUL is capable offorking. -
fork
Description copied from interface:SULForks this SUL, if possible. The fork of a SUL is a copy which behaves exactly the same as this SUL. This method should always return a reset SUL, regardless of whether this call is made between a call toSUL.pre()andSUL.post().If
SUL.canFork()returnstrue, this method must return a non-nullobject, which should behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, aUnsupportedOperationExceptionmust be thrown.Implementation note: if resetting a SUL changes the internal state of this object in a non-trivial way (e.g., incrementing a counter to ensure independent sessions), care must be taken that forks of this SUL manipulate the same internal state.
-
createCacheConsistencyTest
Description copied from interface:LearningCacheCreates 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:
createCacheConsistencyTestin interfaceLearningCache<I,O, C extends de.learnlib.filter.cache.sul.AbstractSULCache.SULCacheState<I, O>> - Returns:
- a cache consistency test for the contents of this cache
-
addAlphabetSymbol
- Specified by:
addAlphabetSymbolin interfaceSupportsGrowingAlphabet<I>
-
suspend
Description copied from interface:ResumableExpose the state object. -
resume
Description copied from interface:ResumableResume the data structure from a previously suspended point in time.
-