Package de.learnlib.oracle.equivalence
Class WMethodEQOracle<A extends net.automatalib.automaton.UniversalDeterministicAutomaton<?,I,?,?,?> & net.automatalib.automaton.concept.Output<I,D>,I,D>
- java.lang.Object
-
- de.learnlib.oracle.equivalence.AbstractTestWordEQOracle<A,I,D>
-
- de.learnlib.oracle.equivalence.WMethodEQOracle<A,I,D>
-
- Type Parameters:
A- automaton typeI- input symbol typeD- output domain type
- All Implemented Interfaces:
EquivalenceOracle<A,I,D>
- Direct Known Subclasses:
DFAWMethodEQOracle,MealyWMethodEQOracle,MooreWMethodEQOracle
public class WMethodEQOracle<A extends net.automatalib.automaton.UniversalDeterministicAutomaton<?,I,?,?,?> & net.automatalib.automaton.concept.Output<I,D>,I,D> extends AbstractTestWordEQOracle<A,I,D>
Implements an equivalence test by applying the W-method test on the given hypothesis automaton, as described in Testing Software Design Modeled by Finite-State Machines by T. S. Chow.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.learnlib.oracle.EquivalenceOracle
EquivalenceOracle.DFAEquivalenceOracle<I>, EquivalenceOracle.MealyEquivalenceOracle<I,O>, EquivalenceOracle.MooreEquivalenceOracle<I,O>
-
-
Constructor Summary
Constructors Constructor Description WMethodEQOracle(MembershipOracle<I,D> sulOracle)Constructor.WMethodEQOracle(MembershipOracle<I,D> sulOracle, int lookahead)Constructor.WMethodEQOracle(MembershipOracle<I,D> sulOracle, int lookahead, int expectedSize)Constructor.WMethodEQOracle(MembershipOracle<I,D> sulOracle, int lookahead, int expectedSize, int batchSize)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.-
Methods inherited from class de.learnlib.oracle.equivalence.AbstractTestWordEQOracle
findCounterExample
-
-
-
-
Constructor Detail
-
WMethodEQOracle
public WMethodEQOracle(MembershipOracle<I,D> sulOracle)
Constructor. Convenience method forWMethodEQOracle(MembershipOracle, int)that setslookaheadto 1.- Parameters:
sulOracle- interface to the system under learning
-
WMethodEQOracle
public WMethodEQOracle(MembershipOracle<I,D> sulOracle, int lookahead)
Constructor. Convenience method forWMethodEQOracle(MembershipOracle, int, int)that setsexpectedSizeto 0.- Parameters:
sulOracle- interface to the system under learninglookahead- the maximum length of the "middle" part of the test cases
-
WMethodEQOracle
public WMethodEQOracle(MembershipOracle<I,D> sulOracle, int lookahead, int expectedSize)
Constructor. Convenience method forWMethodEQOracle(MembershipOracle, int, int, int)that setsbatchSizeto 1.- Parameters:
sulOracle- interface to the system under learninglookahead- the (minimal) maximum length of the "middle" part of the test casesexpectedSize- the expected size of the system under learning
-
WMethodEQOracle
public WMethodEQOracle(MembershipOracle<I,D> sulOracle, int lookahead, int expectedSize, int batchSize)
Constructor. UsesMath.max(lookahead, expectedSize -hypothesis.size())to determine the maximum length of sequences, that should be appended to the transition-cover part of the test sequence to account for the fact that the system under learning may have more states than the current hypothesis.- Parameters:
sulOracle- interface to the system under learninglookahead- the (minimal) maximum length of the "middle" part of the test casesexpectedSize- the expected size of the system under learningbatchSize- size of the batches sent to the membership oracle- See Also:
WMethodTestsIterator
-
-
Method Detail
-
generateTestWords
protected Stream<net.automatalib.word.Word<I>> generateTestWords(A hypothesis, Collection<? extends I> inputs)
Description copied from class:AbstractTestWordEQOracleGenerate the stream of test words that should be used for the current equivalence check cycle.- Specified by:
generateTestWordsin classAbstractTestWordEQOracle<A extends net.automatalib.automaton.UniversalDeterministicAutomaton<?,I,?,?,?> & net.automatalib.automaton.concept.Output<I,D>,I,D>- 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)
-
-