A - the automaton typeI - the input typeD - the output type@ParametersAreNonnullByDefault public interface AutomatonOracle<A extends DeterministicAutomaton<?,I,?>,I,D>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
AutomatonOracle.DFAOracle<I> |
static interface |
AutomatonOracle.MealyOracle<I,O> |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(A hypothesis,
Iterable<? extends I> input,
int length)
Returns whether the given input is accepted by the given hypothesis.
|
void |
addWord(Word<I> input)
Add a new input word.
|
default void |
addWords(A hypothesis,
Collection<? extends I> inputs,
Word<I> prefix)
Adds words to a datastructure.
|
default DefaultQuery<I,D> |
findCounterExample(A hypothesis,
Collection<? extends I> inputs)
Finds a counter example to the given hypothesis.
|
default DefaultQuery<I,D> |
findCounterExample(A hypothesis,
Collection<? extends I> inputs,
int maxQueries)
Find a counterexample for a given
hypothesis. |
double |
getMultiplier()
Returns the multiplier used to compute the number of queries this automaton oracle should perform to
decide whether a given hypothesis is a counter example.
|
boolean |
isCounterExample(A hypothesis,
Iterable<? extends I> inputs,
D output)
Returns whether the given input and output is a counter example for the given hypothesis.
|
Word<I> |
nextInput()
Returns the next input word, or
null if there is no next input. |
void |
pre()
Setup method which is called immediately before
findCounterExample(DeterministicAutomaton, Collection, int) is called. |
DefaultQuery<I,D> |
processInput(A hypothesis,
Word<I> input)
Processes the given input.
|
void |
setMultiplier(double multiplier) |
boolean isCounterExample(A hypothesis, Iterable<? extends I> inputs, @Nullable D output)
hypothesis - the hypothesisinputs - the input sequenceoutput - the output corresponding to the input.@Nullable Word<I> nextInput()
null if there is no next input.
Implementations could for example return words in a breadth-first, or depth-first manner.
null if t here is no next input.void pre()
findCounterExample(DeterministicAutomaton, Collection, int) is called.double getMultiplier()
void setMultiplier(double multiplier)
multiplier - the multipliergetMultiplier()DefaultQuery<I,D> processInput(A hypothesis, Word<I> input)
hypothesis - the hypothesis.input - the input to process.default void addWords(A hypothesis, Collection<? extends I> inputs, Word<I> prefix)
hypothesis - the automaton to add words for.inputs - the input alphabet.prefix - the current prefix to extend.boolean accepts(A hypothesis, Iterable<? extends I> input, int length)
hypothesis - the hypothesis automaton.input - the input.length - the length of the input.@Nullable default DefaultQuery<I,D> findCounterExample(A hypothesis, Collection<? extends I> inputs, int maxQueries)
hypothesis.hypothesis - the hypothesis to find a counter example to.inputs - the alphabet.maxQueries - the maximum number of queries.null if a counter example does not exist.@Nullable default DefaultQuery<I,D> findCounterExample(A hypothesis, Collection<? extends I> inputs)
hypothesis.size() * getMultiplier().hypothesis - the hypothesis automaton.inputs - the input alphabet.null if a counter example does not existCopyright © 2019. All rights reserved.