You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The check mechanism in testcase method deadLoop() inside "Loops.java" is inproper. I must add cfg.exitNode(), which is nop, to the visited nodes at first to get passed. However, according to my observation, the predecessor of the nop is return which indicates the nop is actually dead code.
Additionally, I also wonder should I assume the cfg.exitNode() can eventually be visited. Without this assumption, I can still discover all reachable nodes by performing BFS from the entry node. Am I overlooking some corner cases?
Here is the source code of testcase "Loops.java":
class Loops {
void deadLoop() {
int x = 1;
int y = 0;
int z = 100;
while (x > y) {
use(z);
}
dead(); // unreachable branch
}
void dead() {
}
void use(int n) {
}
}
The text was updated successfully, but these errors were encountered:
The check mechanism in testcase method
deadLoop()
inside "Loops.java" is inproper. I must addcfg.exitNode()
, which isnop
, to the visited nodes at first to get passed. However, according to my observation, the predecessor of thenop
isreturn
which indicates thenop
is actually dead code.Additionally, I also wonder should I assume the
cfg.exitNode()
can eventually be visited. Without this assumption, I can still discover all reachable nodes by performing BFS from the entry node. Am I overlooking some corner cases?Here is the source code of testcase "Loops.java":
The text was updated successfully, but these errors were encountered: