Package de.learnlib.filter.reuse
Interface ReuseCapableOracle<S,I,O>
-
- Type Parameters:
S
- system state classI
- input symbol classO
- output symbol class
public interface ReuseCapableOracle<S,I,O>
Required interface for theReuseOracle
. An implementation needs to provide the ability to answer queries with respect to a system state class S and an input and must be able to reset to SUL to an initial state.The
ReuseOracle
decides whether a full membership query needs to be answered including a reset (viaprocessQuery(Word)
) or if there is a system state available that is able to save the reset with some prefix (viacontinueQuery(Word, Object)
).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ReuseCapableOracle.QueryResult<S,O>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ReuseCapableOracle.QueryResult<S,O>
continueQuery(Word<I> trace, S s)
This method will be invoked whenever a system state s was found for reuse when a new membership query is processed.ReuseCapableOracle.QueryResult<S,O>
processQuery(Word<I> trace)
An implementation needs to provide a fresh system state, process the whole query and return aReuseCapableOracle.QueryResult
with the resulting system state (ReuseCapableOracle.QueryResult.newState
) and the SUL output to that query (ReuseCapableOracle.QueryResult.output
).
-
-
-
Method Detail
-
continueQuery
ReuseCapableOracle.QueryResult<S,O> continueQuery(Word<I> trace, S s)
This method will be invoked whenever a system state s was found for reuse when a new membership query is processed. Please note that only a saved reset can be ensured.- Parameters:
trace
- The query to consider (mostly a real suffix from a membership query).s
- A system state that corresponds to an already answered prefix.- Returns:
- A query result consisting of the output to the input and the resulting system state.
-
processQuery
ReuseCapableOracle.QueryResult<S,O> processQuery(Word<I> trace)
An implementation needs to provide a fresh system state, process the whole query and return aReuseCapableOracle.QueryResult
with the resulting system state (ReuseCapableOracle.QueryResult.newState
) and the SUL output to that query (ReuseCapableOracle.QueryResult.output
).This method will be invoked if no available system state was found and can be seen as a 'normal membership query'.
- Parameters:
trace
- The query to consider.- Returns:
- A query result consisting of the output to the input and the resulting system state.
-
-