diff --git a/src/main/java/de/learnlib/ralib/equivalence/RAEquivalenceTest.java b/src/main/java/de/learnlib/ralib/equivalence/RAEquivalenceTest.java index 9a4ffa19..07878e2f 100644 --- a/src/main/java/de/learnlib/ralib/equivalence/RAEquivalenceTest.java +++ b/src/main/java/de/learnlib/ralib/equivalence/RAEquivalenceTest.java @@ -49,30 +49,6 @@ public class RAEquivalenceTest implements IOEquivalenceOracle { - /* ********************************************************************** - * object pairs ... - */ - - private static class Pair { - - private final T1 first; - private final T2 second; - - public Pair(T1 first, T2 second) { - this.first = first; - this.second = second; - } - - public T1 getFirst() { - return first; - } - - public T2 getSecond() { - return second; - } - } - - /* ********************************************************************** * state pair hash stuff ... */ @@ -274,7 +250,6 @@ public DefaultQuery findCounterExample( // found counterexample if (next.sys1loc.isAccepting() != next.sys2loc.isAccepting()) { - //System.out.println("CE: " + out.getFirst() + " : " + out.getSecond()); return new DefaultQuery<>(next.trace, next.sys1loc.isAccepting()); } // FIXME: this may not be OK in general. I think it is ok diff --git a/src/main/java/de/learnlib/ralib/learning/CounterexampleAnalysis.java b/src/main/java/de/learnlib/ralib/learning/CounterexampleAnalysis.java index 8285c9e1..2d0d5635 100644 --- a/src/main/java/de/learnlib/ralib/learning/CounterexampleAnalysis.java +++ b/src/main/java/de/learnlib/ralib/learning/CounterexampleAnalysis.java @@ -71,7 +71,6 @@ public CounterexampleAnalysis(TreeOracle sulOracle, TreeOracle hypOracle, public CEAnalysisResult analyzeCounterexample(Word ce) { int idx = binarySearch(ce); - //int idx = linearBackWardsSearch(ce); Word prefix = ce.prefix(idx); Word suffix = ce.suffix(ce.length() -idx); @@ -179,42 +178,6 @@ private boolean hypRefinesTransitions(Word prefix, return true; } - private int linearBackWardsSearch(Word ce) { - - assert ce.length() > 1; - - IndexResult[] results = new IndexResult[ce.length()]; - results[ce.length()-1] = IndexResult.NO_CE; - - int idx = ce.length()-2; - - while (idx >= 0) { - IndexResult res = computeIndex(ce, idx); - results[idx] = res; - if (res != IndexResult.NO_CE) { - break; - } - idx--; - } - - assert (idx >= 0); - - // if in the last step there was no counterexample, - // we have to move one step to the left - if (results[idx] == IndexResult.NO_CE) { - assert idx > 0; - idx--; - } - - // if the current index has no refinement use the - // suffix of the next index - if (results[idx] == IndexResult.HAS_CE_NO_REFINE) { - idx++; - } - - return idx; - } - private int binarySearch(Word ce) { assert ce.length() > 1;