Package de.learnlib.util
Class AbstractBFOracle<A extends DeterministicAutomaton<?,I,?>,I,D>
- java.lang.Object
-
- de.learnlib.util.AbstractBFOracle<A,I,D>
-
- Type Parameters:
A
- the automaton typeI
- the input typeD
- the output type
- All Implemented Interfaces:
AutomatonOracle<A,I,D>
- Direct Known Subclasses:
AbstractBFInclusionOracle
,DFABFEmptinessOracle
,MealyBFEmptinessOracle
public abstract class AbstractBFOracle<A extends DeterministicAutomaton<?,I,?>,I,D> extends Object implements AutomatonOracle<A,I,D>
AnAutomatonOracle
that processes words in a breadth-first manner.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.learnlib.oracle.AutomatonOracle
AutomatonOracle.DFAOracle<I>, AutomatonOracle.MealyOracle<I,O>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBFOracle(MembershipOracle<I,D> membershipOracle, double multiplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addWord(Word<I> input)
Adds a new input word to the queue.MembershipOracle<I,D>
getMembershipOracle()
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.@Nullable Word<I>
nextInput()
Returns the next input word, by popping from a queue.void
pre()
Clears the queue.DefaultQuery<I,D>
processInput(A hypothesis, Word<I> input)
Processes the given input.void
setMultiplier(double multiplier)
-
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.AutomatonOracle
accepts, addWords, findCounterExample, findCounterExample, isCounterExample
-
-
-
-
Constructor Detail
-
AbstractBFOracle
protected AbstractBFOracle(MembershipOracle<I,D> membershipOracle, double multiplier)
-
-
Method Detail
-
processInput
public DefaultQuery<I,D> processInput(A hypothesis, Word<I> input)
Description copied from interface:AutomatonOracle
Processes the given input. Implementations could use membership oracles to process the query.- Specified by:
processInput
in interfaceAutomatonOracle<A extends DeterministicAutomaton<?,I,?>,I,D>
- Parameters:
hypothesis
- the hypothesis.input
- the input to process.- Returns:
- the processed query.
-
getMultiplier
public double getMultiplier()
Description copied from interface:AutomatonOracle
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.- Specified by:
getMultiplier
in interfaceAutomatonOracle<A extends DeterministicAutomaton<?,I,?>,I,D>
- Returns:
- the multiplier
-
setMultiplier
public void setMultiplier(double multiplier)
- Specified by:
setMultiplier
in interfaceAutomatonOracle<A extends DeterministicAutomaton<?,I,?>,I,D>
- Parameters:
multiplier
- the multiplier- See Also:
AutomatonOracle.getMultiplier()
-
getMembershipOracle
public MembershipOracle<I,D> getMembershipOracle()
-
nextInput
public @Nullable Word<I> nextInput()
Returns the next input word, by popping from a queue.- Specified by:
nextInput
in interfaceAutomatonOracle<A extends DeterministicAutomaton<?,I,?>,I,D>
- Returns:
- the next input word, or
null
if there is no next input. - See Also:
AutomatonOracle.nextInput()
-
addWord
public void addWord(Word<I> input)
Adds a new input word to the queue.- Specified by:
addWord
in interfaceAutomatonOracle<A extends DeterministicAutomaton<?,I,?>,I,D>
- Parameters:
input
- the input word to add.- See Also:
AutomatonOracle.addWord(Word)
-
pre
public void pre()
Clears the queue.- Specified by:
pre
in interfaceAutomatonOracle<A extends DeterministicAutomaton<?,I,?>,I,D>
-
-