+
+ computeNewMapping(curr, KILLSet, GENSet);
+ // System.out.println("#######" + curr);
+
+ }
+
+ }
+
+ private void checkWriteAgeSet(Set<WriteAge> writeAgeSet, NTuple<Descriptor> path, FlatNode fn) {
+ if (writeAgeSet != null) {
+ for (Iterator iterator = writeAgeSet.iterator(); iterator.hasNext();) {
+ WriteAge writeAge = (WriteAge) iterator.next();
+ if (writeAge.getAge() >= MAXAGE) {
+ throw new Error(
+ "Memory location, which is reachable through references "
+ + path
+ + ", who comes back to the same read statement without being overwritten at the out-most iteration at "
+ + methodContainingSSJavaLoop.getClassDesc().getSourceFileName() + "::"
+ + fn.getNumLine());
+ }
+ }
+ }
+ }
+
+ private void generateGENSetForFlatCall(FlatCall fc,
+ Hashtable<NTuple<Descriptor>, Set<WriteAge>> GENSet) {
+
+ Set<NTuple<Descriptor>> boundMayWriteSet = mapFlatNodeToBoundMayWriteSet.get(fc);
+
+ for (Iterator iterator = boundMayWriteSet.iterator(); iterator.hasNext();) {
+ NTuple<Descriptor> key = (NTuple<Descriptor>) iterator.next();
+ // TODO: shared location
+ Set<WriteAge> set = new HashSet<WriteAge>();
+ set.add(new WriteAge(0));
+ GENSet.put(key, set);
+ }
+
+ }
+
+ private void generateKILLSetForFlatCall(FlatCall fc,
+ Hashtable<NTuple<Descriptor>, Set<WriteAge>> curr,
+ Hashtable<NTuple<Descriptor>, Set<WriteAge>> KILLSet) {
+
+ Set<NTuple<Descriptor>> boundMustWriteSet = mapFlatNodeToBoundMustWriteSet.get(fc);
+
+ for (Iterator iterator = boundMustWriteSet.iterator(); iterator.hasNext();) {
+ NTuple<Descriptor> key = (NTuple<Descriptor>) iterator.next();
+ // TODO: shared location
+ if (curr.get(key) != null) {
+ KILLSet.put(key, curr.get(key));
+ }