State state;
CallGraph callGraph;
+ int debugcount = 0;
+
// maps a descriptor to its known dependents: namely
// methods or tasks that call the descriptor's method
// AND are part of this analysis (reachable from main)
writtenAnalysis_analyzeLoop();
+ if (debugcount > 0) {
+ throw new Error();
+ }
+
}
private void writtenAnalysis_analyzeLoop() {
// READ_bound set
// of callee: callee has 'read' requirement!
-
for (Iterator iterator = calleeUnionBoundReadSet.iterator(); iterator.hasNext();) {
NTuple<Descriptor> read = (NTuple<Descriptor>) iterator.next();
Hashtable<FlatNode, Boolean> gen = curr.get(read);
NTuple<Descriptor> write = (NTuple<Descriptor>) iterator.next();
if (hp.startsWith(write)) {
// it has write effect!
- //throw new Error(
- System.out.println("###"+
- "There is a variable, which is reachable through references "
+ // throw new Error(
+ System.out
+ .println("###"
+ + "There is a variable, which is reachable through references "
+ hp
+ ", who comes back to the same read statement without being overwritten at the out-most iteration at "
+ methodContainingSSJavaLoop.getClassDesc().getSourceFileName() + "::"
+ fn.getNumLine());
+ debugcount++;
}
}
}
}
-
}
private void methodReadOverWrite_nodeActions(FlatNode fn, Set<NTuple<Descriptor>> writtenSet,