Skip to content

Commit

Permalink
disable local splitter for cleaner results
Browse files Browse the repository at this point in the history
  • Loading branch information
kadirayk committed Mar 28, 2023
1 parent acc0654 commit fe065f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/test/java/test/base/IDETestSetUp.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ private void setupSoot(String targetTestClassName) {
Options.v().set_no_bodies_for_excluded(true);
Options.v().set_allow_phantom_refs(true);
Options.v().setPhaseOption("jb", "use-original-names:true");
Options.v().setPhaseOption("jb.ls", "enabled:false");
Options.v().set_prepend_classpath(false);

Scene.v().addBasicClass("java.lang.StringBuilder");
Expand Down
22 changes: 8 additions & 14 deletions src/test/java/test/constant/ConstantPropagationAnalysisTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ public void Assignment6() {
JimpleSparseIDESolver<?, ?, ? extends InterproceduralCFG<Unit, SootMethod>> sparseAnalysis = executeSparseStaticAnalysis(Assignment6.class.getName());
Set<Pair<String, Integer>> sparseIDEResult = getResult(sparseAnalysis);
Set<Pair<String, Integer>> expected = new HashSet<>();
expected.add(new Pair("a#3", 101));
expected.add(new Pair("b#4", 201));
expected.add(new Pair("a", 101));
expected.add(new Pair("b", 201));
checkResults(defaultIDEResult, sparseIDEResult, expected);
}

Expand Down Expand Up @@ -220,8 +220,7 @@ public void Branching() {
JimpleSparseIDESolver<?, ?, ? extends InterproceduralCFG<Unit, SootMethod>> sparseAnalysis = executeSparseStaticAnalysis(Branching.class.getName());
Set<Pair<String, Integer>> sparseIDEResult = getResult(sparseAnalysis);
Set<Pair<String, Integer>> expected = new HashSet<>();
expected.add(new Pair("a", 0));
expected.add(new Pair("a#2", 10));
expected.add(new Pair("a", 10));
expected.add(new Pair("b", 1));
expected.add(new Pair("c", 14));
checkResults(defaultIDEResult, sparseIDEResult, expected);
Expand All @@ -235,8 +234,7 @@ public void Branching2() {
Set<Pair<String, Integer>> sparseIDEResult = getResult(sparseAnalysis);
Set<Pair<String, Integer>> expected = new HashSet<>();
expected.add(new Pair("a", 0));
expected.add(new Pair("b", 0));
expected.add(new Pair("b#2", 42));
expected.add(new Pair("b", 42));
expected.add(new Pair("c", 13));
checkResults(defaultIDEResult, sparseIDEResult, expected);
}
Expand All @@ -248,8 +246,7 @@ public void Branching3() {
JimpleSparseIDESolver<?, ?, ? extends InterproceduralCFG<Unit, SootMethod>> sparseAnalysis = executeSparseStaticAnalysis(Branching3.class.getName());
Set<Pair<String, Integer>> sparseIDEResult = getResult(sparseAnalysis);
Set<Pair<String, Integer>> expected = new HashSet<>();
expected.add(new Pair("a", 0));
expected.add(new Pair("a#2", IDELinearConstantAnalysisProblem.BOTTOM));
expected.add(new Pair("a", IDELinearConstantAnalysisProblem.BOTTOM));
expected.add(new Pair("c", IDELinearConstantAnalysisProblem.BOTTOM));
checkResults(defaultIDEResult, sparseIDEResult, expected);
}
Expand All @@ -261,8 +258,7 @@ public void Branching4() {
JimpleSparseIDESolver<?, ?, ? extends InterproceduralCFG<Unit, SootMethod>> sparseAnalysis = executeSparseStaticAnalysis(Branching4.class.getName());
Set<Pair<String, Integer>> sparseIDEResult = getResult(sparseAnalysis);
Set<Pair<String, Integer>> expected = new HashSet<>();
expected.add(new Pair("a", 0));
expected.add(new Pair("a#2", IDELinearConstantAnalysisProblem.BOTTOM));
expected.add(new Pair("a", IDELinearConstantAnalysisProblem.BOTTOM));
expected.add(new Pair("b", 10));
expected.add(new Pair("c", 10));
checkResults(defaultIDEResult, sparseIDEResult, expected);
Expand All @@ -275,8 +271,7 @@ public void Branching5() {
JimpleSparseIDESolver<?, ?, ? extends InterproceduralCFG<Unit, SootMethod>> sparseAnalysis = executeSparseStaticAnalysis(Branching5.class.getName());
Set<Pair<String, Integer>> sparseIDEResult = getResult(sparseAnalysis);
Set<Pair<String, Integer>> expected = new HashSet<>();
expected.add(new Pair("a", 0));
expected.add(new Pair("a#2", IDELinearConstantAnalysisProblem.BOTTOM));
expected.add(new Pair("a", IDELinearConstantAnalysisProblem.BOTTOM));
expected.add(new Pair("b", 10));
expected.add(new Pair("c", IDELinearConstantAnalysisProblem.BOTTOM));
checkResults(defaultIDEResult, sparseIDEResult, expected);
Expand All @@ -289,8 +284,7 @@ public void Branching6() {
JimpleSparseIDESolver<?, ?, ? extends InterproceduralCFG<Unit, SootMethod>> sparseAnalysis = executeSparseStaticAnalysis(Branching6.class.getName());
Set<Pair<String, Integer>> sparseIDEResult = getResult(sparseAnalysis);
Set<Pair<String, Integer>> expected = new HashSet<>();
expected.add(new Pair("a", 0));
expected.add(new Pair("a#2", 23));
expected.add(new Pair("a", 23));
expected.add(new Pair("b", 10));
expected.add(new Pair("c", 26));
checkResults(defaultIDEResult, sparseIDEResult, expected);
Expand Down

0 comments on commit fe065f8

Please sign in to comment.