I - input alphabet typeO - output alphabet typepublic class SymbolQueryCache<I,O> extends Object implements SymbolQueryOracle<I,O>, LearningCacheOracle.MealyLearningCacheOracle<I,O>, Resumable<SymbolQueryCache.SymbolQueryCacheState<I,O>>
SymbolQueryOracle. Upon construction, it is provided with a delegate oracle. Queries that can
be answered from the cache are answered directly, others are forwarded to the delegate oracle. Queried symbols that
have to be delegated are incorporated into the cache directly.
Internally, an incrementally growing tree (in form of a mealy automaton) is used for caching.
| Modifier and Type | Class and Description |
|---|---|
static class |
SymbolQueryCache.SymbolQueryCacheState<I,O> |
LearningCacheOracle.DFALearningCacheOracle<I>, LearningCacheOracle.MealyLearningCacheOracle<I,O>LearningCache.DFALearningCache<I>, LearningCache.MealyLearningCache<I,O>MembershipOracle.DFAMembershipOracle<I>, MembershipOracle.MealyMembershipOracle<I,O>| Constructor and Description |
|---|
SymbolQueryCache(SymbolQueryOracle<I,O> delegate,
Alphabet<I> alphabet) |
| Modifier and Type | Method and Description |
|---|---|
EquivalenceOracle<MealyMachine<?,I,?,O>,I,Word<O>> |
createCacheConsistencyTest()
Creates a cache consistency test.
|
O |
query(I i) |
void |
reset() |
void |
resume(SymbolQueryCache.SymbolQueryCacheState<I,O> state) |
SymbolQueryCache.SymbolQueryCacheState<I,O> |
suspend() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessQueriesanswerQuery, answerQuery, asOracle, processQuerypublic SymbolQueryCache(SymbolQueryOracle<I,O> delegate, Alphabet<I> alphabet)
public void reset()
reset in interface SymbolQueryOracle<I,O>public EquivalenceOracle<MealyMachine<?,I,?,O>,I,Word<O>> createCacheConsistencyTest()
LearningCacheThe created cache consistency test is backed by the cache contents. This method does not need to be invoked repeatedly when the cache contents change.
createCacheConsistencyTest in interface LearningCache<MealyMachine<?,I,?,O>,I,Word<O>>public SymbolQueryCache.SymbolQueryCacheState<I,O> suspend()
suspend in interface Resumable<SymbolQueryCache.SymbolQueryCacheState<I,O>>public void resume(SymbolQueryCache.SymbolQueryCacheState<I,O> state)
resume in interface Resumable<SymbolQueryCache.SymbolQueryCacheState<I,O>>Copyright © 2019. All rights reserved.