Package de.learnlib.oracle.equivalence
Class AbstractTestWordEQOracle<A extends net.automatalib.automaton.concept.Output<I,D>,I,D>
- java.lang.Object
-
- de.learnlib.oracle.equivalence.AbstractTestWordEQOracle<A,I,D>
-
- Type Parameters:
A- hypothesis typeI- input symbol typeD- output (domain) type
- All Implemented Interfaces:
EquivalenceOracle<A,I,D>
- Direct Known Subclasses:
CompleteExplorationEQOracle,IncrementalWMethodEQOracle,RandomWellMatchedWordsEQOracle,RandomWMethodEQOracle,RandomWordsEQOracle,RandomWpMethodEQOracle,WMethodEQOracle,WMethodEQOracle,WMethodEQOracle,WMethodEQOracle,WpMethodEQOracle,WpMethodEQOracle
public abstract class AbstractTestWordEQOracle<A extends net.automatalib.automaton.concept.Output<I,D>,I,D> extends Object implements EquivalenceOracle<A,I,D>
An abstract equivalence oracle that takes care of query batching and hypothesis checking and allows extending classes to solely focus on test word generation by implementinggenerateTestWords(Output, Collection).Being
stream-based, this oracle encourages the lazy computation of counterexamples, so that all counterexamples do not have to be computed upfront, but only until the first valid counterexample is found.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.learnlib.oracle.EquivalenceOracle
EquivalenceOracle.DFAEquivalenceOracle<I extends Object>, EquivalenceOracle.MealyEquivalenceOracle<I extends Object,O extends Object>, EquivalenceOracle.MooreEquivalenceOracle<I extends Object,O extends Object>
-
-
Constructor Summary
Constructors Constructor Description AbstractTestWordEQOracle(MembershipOracle<I,D> membershipOracle)AbstractTestWordEQOracle(MembershipOracle<I,D> membershipOracle, int batchSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @Nullable DefaultQuery<I,D>findCounterExample(A hypothesis, Collection<? extends I> inputs)protected abstract Stream<net.automatalib.word.Word<I>>generateTestWords(A hypothesis, Collection<? extends I> inputs)Generate the stream of test words that should be used for the current equivalence check cycle.
-
-
-
Constructor Detail
-
AbstractTestWordEQOracle
public AbstractTestWordEQOracle(MembershipOracle<I,D> membershipOracle)
-
AbstractTestWordEQOracle
public AbstractTestWordEQOracle(MembershipOracle<I,D> membershipOracle, int batchSize)
-
-
Method Detail
-
findCounterExample
public @Nullable DefaultQuery<I,D> findCounterExample(A hypothesis, Collection<? extends I> inputs)
- Specified by:
findCounterExamplein interfaceEquivalenceOracle<A extends net.automatalib.automaton.concept.Output<I,D>,I,D>
-
generateTestWords
protected abstract Stream<net.automatalib.word.Word<I>> generateTestWords(A hypothesis, Collection<? extends I> inputs)
Generate the stream of test words that should be used for the current equivalence check cycle.- Parameters:
hypothesis- the current hypothesis of the learning algorithminputs- the collection of inputs to consider- Returns:
- the stream of test words used for equivalence testing
- See Also:
EquivalenceOracle.findCounterExample(Object, Collection)
-
-