Package de.learnlib.filter.reuse
Class ReuseOracle<S,I,O>
- java.lang.Object
-
- de.learnlib.filter.reuse.ReuseOracle<S,I,O>
-
- Type Parameters:
S- system state classI- input symbol classO- output symbol class
- All Implemented Interfaces:
MembershipOracle<I,Word<O>>,MembershipOracle.MealyMembershipOracle<I,O>,BatchProcessor<Query<I,Word<O>>>,QueryAnswerer<I,Word<O>>,SingleQueryOracle<I,Word<O>>,SingleQueryOracle.SingleQueryOracleMealy<I,O>
public final class ReuseOracle<S,I,O> extends Object implements SingleQueryOracle.SingleQueryOracleMealy<I,O>
The reuse oracle is aMembershipOracle.MealyMembershipOraclethat is able to- Cache queries: Each processed query will
not be delegated again (instead the answer will be retrieved from the
ReuseTree) - Pump queries: If
the
ReuseTreeis configured to know which symbols are model invariant input symbols viaReuseOracle.ReuseOracleBuilder.withInvariantInputs(Set)(like a read from a database which does not change the SUL) or configured for failure output symbols viaReuseOracle.ReuseOracleBuilder.withFailureOutputs(Set)(e.g. a roll back mechanism exists for the invoked symbol) the oracle could ''pump'' those symbols inside a query once seen. - Reuse system states: There are a lot of situations where a prefix of a query is already known and a system state
is available. In this situation the oracle is able to reuse the available system state and only process the remaining
suffix. Whether a system state will be removed after it is used is decided upon construction (see
ReuseOracleBuilder(Alphabet, Supplier).
ReuseTree.The usage of model invariant input symbols and failure output symbols is disabled by default and can be enabled upon construction (see
ReuseOracle.ReuseOracleBuilder.withFailureOutputs(Set)andReuseOracle.ReuseOracleBuilder.withInvariantInputs(Set)).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReuseOracle.ReuseOracleBuilder<S,I,O>-
Nested classes/interfaces inherited from interface de.learnlib.oracle.MembershipOracle
MembershipOracle.DFAMembershipOracle<I extends Object>, MembershipOracle.MealyMembershipOracle<I extends Object,O extends Object>, MembershipOracle.MooreMembershipOracle<I extends Object,O extends Object>
-
Nested classes/interfaces inherited from interface de.learnlib.oracle.SingleQueryOracle
SingleQueryOracle.SingleQueryOracleDFA<I extends Object>, SingleQueryOracle.SingleQueryOracleMealy<I extends Object,O extends Object>, SingleQueryOracle.SingleQueryOracleMoore<I extends Object,O extends Object>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Word<O>answerQuery(Word<I> input)Word<O>answerQuery(Word<I> prefix, Word<I> suffix)ReuseCapableOracle<S,I,O>getReuseCapableOracle()Returns theReuseCapableOracleused by this instance.ReuseTree<S,I,O>getReuseTree()Returns theReuseTreeused by this instance.-
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
asOracle, processBatch
-
Methods inherited from interface de.learnlib.oracle.SingleQueryOracle
processQueries, processQuery
-
-
-
-
Method Detail
-
answerQuery
public Word<O> answerQuery(Word<I> prefix, Word<I> suffix)
- Specified by:
answerQueryin interfaceMembershipOracle<S,I>- Specified by:
answerQueryin interfaceQueryAnswerer<S,I>- Specified by:
answerQueryin interfaceSingleQueryOracle<S,I>
-
answerQuery
public Word<O> answerQuery(Word<I> input)
- Specified by:
answerQueryin interfaceMembershipOracle<S,I>- Specified by:
answerQueryin interfaceQueryAnswerer<S,I>
-
getReuseCapableOracle
public ReuseCapableOracle<S,I,O> getReuseCapableOracle()
Returns theReuseCapableOracleused by this instance.
-
-