I
- input symbol typeD
- output domain typepublic class SampleSetEQOracle<I,D> extends Object implements EquivalenceOracle<net.automatalib.automata.concepts.SuffixOutput<I,D>,I,D>
Sample queries are provided through one of the add(...)
or addAll(...)
methods of this class. A query
consists of an input word (split into a prefix and a suffix), and an expected output.
During an equivalence query, for each of those queries if the respective actual suffix output of the hypothesis
equals the expected output.
This oracle will always repeatedly test queries from the sample set if they turned out to be counterexamples. However, the oracle can be configured to remove queries from the sample set if they did not serve as counterexamples.
EquivalenceOracle.DFAEquivalenceOracle<I>, EquivalenceOracle.MealyEquivalenceOracle<I,O>
Constructor and Description |
---|
SampleSetEQOracle(boolean removeUnsuccessful)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SampleSetEQOracle<I,D> |
add(net.automatalib.words.Word<I> input,
D expectedOutput)
Adds a query word along with its expected output to the sample set.
|
SampleSetEQOracle<I,D> |
addAll(Collection<? extends DefaultQuery<I,D>> newTestQueries)
Adds queries to the sample set.
|
SampleSetEQOracle<I,D> |
addAll(DefaultQuery<I,D>... newTestQueries)
Adds queries to the sample set.
|
SampleSetEQOracle<I,D> |
addAll(MembershipOracle<I,D> oracle,
Collection<? extends net.automatalib.words.Word<I>> words)
Adds words to the sample set.
|
SampleSetEQOracle<I,D> |
addAll(MembershipOracle<I,D> oracle,
net.automatalib.words.Word<I>... words)
Adds several query words to the sample set.
|
DefaultQuery<I,D> |
findCounterExample(net.automatalib.automata.concepts.SuffixOutput<I,D> hypothesis,
Collection<? extends I> inputs)
Searches for a counterexample disproving the subjected hypothesis.
|
public SampleSetEQOracle(boolean removeUnsuccessful)
removeUnsuccessful
- if set to true
, queries will be removed from the sample set if they did not reveal a
counterexample. Otherwise, all queries from the sample set will always be tested upon each invocation of
findCounterExample(SuffixOutput, Collection)
.public SampleSetEQOracle<I,D> add(net.automatalib.words.Word<I> input, D expectedOutput)
input
- the input wordexpectedOutput
- the expected output for this wordthis
, to enable chained add
or addAll
calls@SafeVarargs public final SampleSetEQOracle<I,D> addAll(MembershipOracle<I,D> oracle, net.automatalib.words.Word<I>... words)
oracle
- the membership oracle used to determine expected outputswords
- the words to be added to the sample setthis
, to enable chained add
or addAll
callspublic SampleSetEQOracle<I,D> addAll(MembershipOracle<I,D> oracle, Collection<? extends net.automatalib.words.Word<I>> words)
oracle
- the membership oracle used to determine the expected outputwords
- the words to addthis
, to enable chained add
or addAll
calls@SafeVarargs public final SampleSetEQOracle<I,D> addAll(DefaultQuery<I,D>... newTestQueries)
DefaultQuery
s, which allow for retrieving the corresponding
(expected) output.newTestQueries
- the queries to add to the sample setthis
, to enable chained add
or addAll
callspublic SampleSetEQOracle<I,D> addAll(Collection<? extends DefaultQuery<I,D>> newTestQueries)
DefaultQuery
s, which allow for retrieving the corresponding
(expected) output.newTestQueries
- the queries to add to the sample setthis
, to enable chained add
or addAll
callspublic DefaultQuery<I,D> findCounterExample(net.automatalib.automata.concepts.SuffixOutput<I,D> hypothesis, Collection<? extends I> inputs)
EquivalenceOracle
null
is returned.findCounterExample
in interface EquivalenceOracle<net.automatalib.automata.concepts.SuffixOutput<I,D>,I,D>
hypothesis
- the conjectureinputs
- the set of inputs to consider, this should be a subset of the input alphabet of the provided hypothesisDefaultQuery
contains the SUL output for the
respective query.Copyright © 2018. All rights reserved.