Skip to content

Commit

Permalink
Comment out two unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kostis committed Oct 6, 2023
1 parent 158c436 commit e0f8a84
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
39 changes: 18 additions & 21 deletions src/main/java/de/learnlib/ralib/ceanalysis/PrefixFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
import java.util.Map;
import java.util.Set;

import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;

import de.learnlib.api.logging.LearnLogger;
import de.learnlib.api.query.DefaultQuery;
import de.learnlib.ralib.automata.TransitionGuard;
Expand Down Expand Up @@ -153,24 +150,24 @@ private int findIndex(Word<PSymbolInstance> ce) {
throw new RuntimeException("should not reach here");
}

private Pair<TreeQueryResult, TreeQueryResult> checkForCE(Word<PSymbolInstance> prefix, SymbolicSuffix suffix, Word<PSymbolInstance> transition) {
SymbolicWord symWord = new SymbolicWord(prefix, suffix);
TreeQueryResult resHyp = hypOracle.treeQuery(prefix, suffix);
TreeQueryResult resSul;
if (storedQueries.containsKey(symWord))
resSul = storedQueries.get(symWord);
else {
resSul = sulOracle.treeQuery(prefix, suffix);
storedQueries.put(symWord, resSul);
}

boolean hasCE = sdtOracle.hasCounterexample(prefix,
resHyp.getSdt(), resHyp.getPiv(),
resSul.getSdt(), resSul.getPiv(),
new TransitionGuard(), transition);

return hasCE ? new ImmutablePair<TreeQueryResult, TreeQueryResult>(resHyp, resSul) : null;
}
// private Pair<TreeQueryResult, TreeQueryResult> checkForCE(Word<PSymbolInstance> prefix, SymbolicSuffix suffix, Word<PSymbolInstance> transition) {
// SymbolicWord symWord = new SymbolicWord(prefix, suffix);
// TreeQueryResult resHyp = hypOracle.treeQuery(prefix, suffix);
// TreeQueryResult resSul;
// if (storedQueries.containsKey(symWord))
// resSul = storedQueries.get(symWord);
// else {
// resSul = sulOracle.treeQuery(prefix, suffix);
// storedQueries.put(symWord, resSul);
// }
//
// boolean hasCE = sdtOracle.hasCounterexample(prefix,
// resHyp.getSdt(), resHyp.getPiv(),
// resSul.getSdt(), resSul.getPiv(),
// new TransitionGuard(), transition);
//
// return hasCE ? new ImmutablePair<TreeQueryResult, TreeQueryResult>(resHyp, resSul) : null;
// }

private boolean transitionHasCE(Word<PSymbolInstance> ce, int idx) {
if (idx+1 >= ce.length())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import de.learnlib.ralib.data.SymbolicDataValue.SuffixValue;
import de.learnlib.ralib.data.VarMapping;
import de.learnlib.ralib.theory.SDTGuard;
import de.learnlib.ralib.theory.SDTOrGuard;
import de.learnlib.ralib.theory.equality.DisequalityGuard;
import de.learnlib.ralib.theory.equality.EqualityGuard;

Expand Down Expand Up @@ -252,16 +251,16 @@ private Set<SDTGuard> mergeIntervals(IntervalGuard other) {

}

private Set<SDTGuard> mergeWithEquality(EqualityGuard other) {
Set<SDTGuard> guards = new LinkedHashSet<>();
if (!(other.getRegister().equals(this.leftLimit) || other.getRegister().equals(this.rightLimit))) {
guards.add(this);
guards.add(other);
} else {
guards.add(new SDTOrGuard(this.parameter, this, other));
}
return guards;
}
// private Set<SDTGuard> mergeWithEquality(EqualityGuard other) {
// Set<SDTGuard> guards = new LinkedHashSet<>();
// if (!(other.getRegister().equals(this.leftLimit) || other.getRegister().equals(this.rightLimit))) {
// guards.add(this);
// guards.add(other);
// } else {
// guards.add(new SDTOrGuard(this.parameter, this, other));
// }
// return guards;
// }

@Override
public Set<SDTGuard> mergeWith(SDTGuard other, List<SymbolicDataValue> regPotential) {
Expand Down

0 comments on commit e0f8a84

Please sign in to comment.