Skip to content

Commit f5a31e7

Browse files
author
1475505
committed
(AC A4) warning: ConstantPropagation.java:transferNode return opposite to the comments. Before commits is not affected!
1 parent 03fe069 commit f5a31e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

A4/tai-e/src/main/java/pascal/taie/analysis/dataflow/analysis/constprop/ConstantPropagation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public boolean transferNode(Stmt stmt, CPFact in, CPFact out) {
120120
out.update(def, Value.getNAC());
121121
}
122122
}
123-
return out.equals(old_out);
123+
return !out.equals(old_out);
124124
}
125125

126126
/**

A4/tai-e/src/main/java/pascal/taie/analysis/dataflow/inter/InterSolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private void doSolve() {
8484
for (var edge : icfg.getInEdgesOf(node)) {
8585
analysis.meetInto(analysis.transferEdge(edge, result.getOutFact(edge.getSource())), result.getInFact(node));
8686
}
87-
if (!analysis.transferNode(node, result.getInFact(node), result.getOutFact(node))) {
87+
if (analysis.transferNode(node, result.getInFact(node), result.getOutFact(node))) {
8888
workList.addAll(icfg.getSuccsOf(node));
8989
}
9090
}

0 commit comments

Comments
 (0)