@Test public void testDFASimulatorOracle() { DFA<?, Symbol> dfa = ExamplePaulAndMary.constructMachine(); SimulatorOracle<Symbol, Boolean> oracle = new SimulatorOracle<>(dfa); List<DefaultQuery<Symbol, Boolean>> queries = new ArrayList<>(); DefaultQuery<Symbol, Boolean> q1 = new DefaultQuery<>(Word.fromSymbols(ExamplePaulAndMary.IN_PAUL, ExamplePaulAndMary.IN_LOVES, ExamplePaulAndMary.IN_MARY)); DefaultQuery<Symbol, Boolean> q2 = new DefaultQuery<>(Word.fromSymbols(ExamplePaulAndMary.IN_MARY, ExamplePaulAndMary.IN_LOVES, ExamplePaulAndMary.IN_PAUL)); queries.add(q1); queries.add(q2); Assert.assertEquals(queries.get(0).getInput().size(), 3); Assert.assertEquals(queries.get(1).getInput().size(), 3); oracle.processQueries(queries); Assert.assertEquals(queries.get(0).getOutput(), Boolean.TRUE); Assert.assertEquals(queries.get(1).getOutput(), Boolean.FALSE); }
@Override public void processQueries(Collection<? extends Query<I, D>> queries) { MQUtil.answerQueries(this, queries); }
SimulatorOracle implements SingleQueryOracle<I, D> { @Override public void processQueries(Collection<? extends Query<I, D>> queries) { MQUtil.answerQueries(this, queries); } }
SimulatorOracle implements SingleQueryOracle<I, D> { @Override public void processQueries(Collection<? extends Query<I, D>> queries) { MQUtil.answerQueries(this, queries); } SimulatorOracle(SuffixOutput<I, D> automaton); }
SimulatorOracle implements SingleQueryOracle<I, D> { @Override public void processQueries(Collection<? extends Query<I, D>> queries) { MQUtil.answerQueries(this, queries); } SimulatorOracle(SuffixOutput<I, D> automaton); @Override D answerQuery(Word<I> prefix, Word<I> suffix); @Override void processQueries(Collection<? extends Query<I, D>> queries); }
SimulatorOracle implements SingleQueryOracle<I, D> { @Override public void processQueries(Collection<? extends Query<I, D>> queries) { MQUtil.answerQueries(this, queries); } SimulatorOracle(SuffixOutput<I, D> automaton); @Override D answerQuery(Word<I> prefix, Word<I> suffix); @Override void processQueries(Collection<? extends Query<I, D>> queries);  }