@Test public void testDFASimulatorOmegaOracle() { DFA<Integer, Symbol> dfa = ExamplePaulAndMary.constructMachine(); DFASimulatorOmegaOracle<Integer, Symbol> oracle = new DFASimulatorOmegaOracle<>(dfa); List<OmegaQuery<Symbol, Boolean>> queries = new ArrayList<>(); OmegaQuery<Symbol, Boolean> q1 = new OmegaQuery<>(Word.epsilon(), Word.fromSymbols(ExamplePaulAndMary.IN_PAUL, ExamplePaulAndMary.IN_LOVES, ExamplePaulAndMary.IN_MARY), 1); OmegaQuery<Symbol, Boolean> q2 = new OmegaQuery<>(Word.fromSymbols(ExamplePaulAndMary.IN_MARY), Word.fromSymbols(ExamplePaulAndMary.IN_MARY, ExamplePaulAndMary.IN_LOVES, ExamplePaulAndMary.IN_PAUL), 1); queries.add(q1); queries.add(q2); Assert.assertEquals(queries.get(0).getLoop().size(), 3); Assert.assertEquals(queries.get(1).getLoop().size(), 3); oracle.processQueries(queries); Assert.assertFalse(queries.get(0).isUltimatelyPeriodic()); Assert.assertTrue(queries.get(1).isUltimatelyPeriodic()); Assert.assertEquals(queries.get(1).getOutput(), Boolean.FALSE); }
@Override public void processQueries(Collection<? extends OmegaQuery<I, D>> queries) { MQUtil.answerOmegaQueries(this, queries); }
SimulatorOmegaOracle implements SingleQueryOmegaOracle<S, I, D> { @Override public void processQueries(Collection<? extends OmegaQuery<I, D>> queries) { MQUtil.answerOmegaQueries(this, queries); } }
SimulatorOmegaOracle implements SingleQueryOmegaOracle<S, I, D> { @Override public void processQueries(Collection<? extends OmegaQuery<I, D>> queries) { MQUtil.answerOmegaQueries(this, queries); } <A extends SuffixOutput<I, D> & SimpleDTS<S, I>> SimulatorOmegaOracle(A automaton, SimulatorOracle<I, D> simulatorOracle); }
SimulatorOmegaOracle implements SingleQueryOmegaOracle<S, I, D> { @Override public void processQueries(Collection<? extends OmegaQuery<I, D>> queries) { MQUtil.answerOmegaQueries(this, queries); } <A extends SuffixOutput<I, D> & SimpleDTS<S, I>> SimulatorOmegaOracle(A automaton, SimulatorOracle<I, D> simulatorOracle); @Override MembershipOracle<I, D> getMembershipOracle(); @Override boolean isSameState(Word<I> input1, S s1, Word<I> input2, S s2); @Override void processQueries(Collection<? extends OmegaQuery<I, D>> queries); @Override Pair<D, Integer> answerQuery(Word<I> prefix, Word<I> loop, int repeat); }
SimulatorOmegaOracle implements SingleQueryOmegaOracle<S, I, D> { @Override public void processQueries(Collection<? extends OmegaQuery<I, D>> queries) { MQUtil.answerOmegaQueries(this, queries); } <A extends SuffixOutput<I, D> & SimpleDTS<S, I>> SimulatorOmegaOracle(A automaton, SimulatorOracle<I, D> simulatorOracle); @Override MembershipOracle<I, D> getMembershipOracle(); @Override boolean isSameState(Word<I> input1, S s1, Word<I> input2, S s2); @Override void processQueries(Collection<? extends OmegaQuery<I, D>> queries); @Override Pair<D, Integer> answerQuery(Word<I> prefix, Word<I> loop, int repeat);  }