Class RandomWalkEQOracle<I,​O>

  • Type Parameters:
    I - input symbol type
    O - output symbol type
    All Implemented Interfaces:
    EquivalenceOracle<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​net.automatalib.word.Word<O>>, EquivalenceOracle.MealyEquivalenceOracle<I,​O>

    public class RandomWalkEQOracle<I,​O>
    extends Object
    implements EquivalenceOracle.MealyEquivalenceOracle<I,​O>
    Performs a random walk over the hypothesis. A random walk restarts with a fixed probability after every step and terminates after a fixed number of steps or with a counterexample. The number of steps to termination may be reset for every new search.
    • Constructor Detail

      • RandomWalkEQOracle

        public RandomWalkEQOracle​(SUL<I,​O> sul,
                                  double restartProbability,
                                  long maxSteps,
                                  boolean resetStepCount,
                                  Random random)
      • RandomWalkEQOracle

        public RandomWalkEQOracle​(SUL<I,​O> sul,
                                  double restartProbability,
                                  long maxSteps,
                                  Random random)
    • Method Detail

      • findCounterExample

        public @Nullable DefaultQuery<I,​net.automatalib.word.Word<O>> findCounterExample​(net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O> hypothesis,
                                                                                               Collection<? extends I> inputs)
        Description copied from interface: EquivalenceOracle
        Searches for a counterexample disproving the subjected hypothesis. A counterexample is query which, when performed on the SUL, yields a different output than what was predicted by the hypothesis. If no counterexample could be found (this does not necessarily mean that none exists), null is returned.
        Specified by:
        findCounterExample in interface EquivalenceOracle<net.automatalib.automaton.transducer.MealyMachine<?,​I,​?,​O>,​I,​net.automatalib.word.Word<O>>
        Parameters:
        hypothesis - the conjecture
        inputs - the set of inputs to consider, this should be a subset of the input alphabet of the provided hypothesis
        Returns:
        a query exposing different behavior, or null if no counterexample could be found. In case a non-null value is returned, the output field in the DefaultQuery contains the SUL output for the respective query.