Skip to content

Commit

Permalink
Dump IR before running analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
silverbullettt committed Nov 19, 2022
1 parent 4aa8caf commit 438c7c4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions A5/tai-e/plan.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- id: class-dumper
options: {}
- id: cipta
options:
merge-string-constants: false
Expand All @@ -12,5 +14,3 @@
algorithm: cipta
action: dump
file: null
- id: class-dumper
options: {}
8 changes: 4 additions & 4 deletions A5/tai-e/src/main/java/pascal/taie/analysis/Tests.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ private static void doTestPTA(
String classPath = "src/test/resources/pta/" + dir;
Collections.addAll(args, "-cp", classPath);
Collections.addAll(args, "-m", main);
if (DUMP_IR) {
// dump IR
Collections.addAll(args, "-a", ClassDumper.ID);
}
List<String> ptaArgs = new ArrayList<>();
ptaArgs.add("implicit-entries:false");
String action = GENERATE_EXPECTED_RESULTS ? "dump" : "compare";
Expand All @@ -77,10 +81,6 @@ private static void doTestPTA(
ptaArgs.add("only-app:true");
}
Collections.addAll(args, "-a", id + "=" + String.join(";", ptaArgs));
if (DUMP_IR) {
// dump IR
Collections.addAll(args, "-a", ClassDumper.ID);
}
Main.main(args.toArray(new String[0]));
}

Expand Down
4 changes: 2 additions & 2 deletions A6/tai-e/plan.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- id: class-dumper
options: {}
- id: cspta
options:
cs: ci
Expand All @@ -12,5 +14,3 @@
algorithm: cspta
action: dump
file: null
- id: class-dumper
options: {}
8 changes: 4 additions & 4 deletions A6/tai-e/src/main/java/pascal/taie/analysis/Tests.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ private static void doTestPTA(
String classPath = "src/test/resources/pta/" + dir;
Collections.addAll(args, "-cp", classPath);
Collections.addAll(args, "-m", main);
if (DUMP_IR) {
// dump IR
Collections.addAll(args, "-a", ClassDumper.ID);
}
List<String> ptaArgs = new ArrayList<>();
ptaArgs.add("implicit-entries:false");
String action = GENERATE_EXPECTED_RESULTS ? "dump" : "compare";
Expand All @@ -77,10 +81,6 @@ private static void doTestPTA(
ptaArgs.add("only-app:true");
}
Collections.addAll(args, "-a", id + "=" + String.join(";", ptaArgs));
if (DUMP_IR) {
// dump IR
Collections.addAll(args, "-a", ClassDumper.ID);
}
Main.main(args.toArray(new String[0]));
}

Expand Down
4 changes: 2 additions & 2 deletions A8/tai-e/plan.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- id: class-dumper
options: {}
- id: cspta
options:
cs: ci
Expand All @@ -13,5 +15,3 @@
algorithm: cspta
action: dump
file: null
- id: class-dumper
options: {}
8 changes: 4 additions & 4 deletions A8/tai-e/src/main/java/pascal/taie/analysis/Tests.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ private static void doTestPTA(
String classPath = "src/test/resources/pta/" + dir;
Collections.addAll(args, "-cp", classPath);
Collections.addAll(args, "-m", main);
if (DUMP_IR) {
// dump IR
Collections.addAll(args, "-a", ClassDumper.ID);
}
List<String> ptaArgs = new ArrayList<>();
ptaArgs.add("implicit-entries:false");
String action = GENERATE_EXPECTED_RESULTS ? "dump" : "compare";
Expand All @@ -76,10 +80,6 @@ private static void doTestPTA(
// if given options do not specify only-app, then set it true
ptaArgs.add("only-app:true");
}
if (DUMP_IR) {
// dump IR
Collections.addAll(args, "-a", ClassDumper.ID);
}
Collections.addAll(args, "-a", id + "=" + String.join(";", ptaArgs));
Main.main(args.toArray(new String[0]));
}
Expand Down

0 comments on commit 438c7c4

Please sign in to comment.