Skip to content

Commit

Permalink
eqtests: make SimpleEQOracle implement EquivalenceOracle
Browse files Browse the repository at this point in the history
  • Loading branch information
mtf90 committed Sep 6, 2017
1 parent 9208cb1 commit fba1023
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@
*/
package de.learnlib.eqtests.basic;

import java.util.Collection;

import javax.annotation.Nullable;

import de.learnlib.api.EquivalenceOracle;
import de.learnlib.oracles.DefaultQuery;
import net.automatalib.automata.concepts.InputAlphabetHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SimpleEQOracle<A extends InputAlphabetHolder<I>, I, D> implements EquivalenceOracle<A, I, D> {

public class SimpleEQOracle<A extends InputAlphabetHolder<I>, I, D> {
private static final Logger LOGGER = LoggerFactory.getLogger(SimpleEQOracle.class);

private final EquivalenceOracle<A, I, D> eqOracle;

Expand All @@ -31,7 +39,11 @@ public static <A extends InputAlphabetHolder<I>, I, D> SimpleEQOracle<A, I, D> c
return new SimpleEQOracle<>(eqOracle);
}

public DefaultQuery<I, D> findCounterExample(A hypothesis) {
@Nullable
@Override
public DefaultQuery<I, D> findCounterExample(A hypothesis, Collection<? extends I> inputs) {
LOGGER.debug("Ignoring the set of inputs '{}', because I always use the complete hypothesis' input alphabet",
inputs);
return eqOracle.findCounterExample(hypothesis, hypothesis.getInputAlphabet());
}
}

0 comments on commit fba1023

Please sign in to comment.