updateDeleteSetForSameHeightWrite(currDeleteSet, lhsLocTuple, lhsHeapPath);
}
- // System.out.println("VAR WRITE:" + fn);
- // System.out.println("lhsLocTuple=" + lhsLocTuple +
- // " lhsHeapPath=" + lhsHeapPath);
- // System.out.println("dstLoc=" + dstLoc + " srcLoc=" + srcLoc);
- // System.out.println("KILLSET=" + killSet);
- // System.out.println("GENSet=" + genSet);
- // System.out.println("DELETESET=" + currDeleteSet);
-
}
} else {
break;
updateDeleteSetForSameHeightWrite(currDeleteSet, fieldLocTuple, fldHeapPath);
}
- // System.out.println("################");
- // System.out.println("FIELD WRITE:" + fn);
- // System.out.println("FldHeapPath=" + fldHeapPath);
- // System.out.println("fieldLocTuple=" + fieldLocTuple + " srcLoc=" +
- // srcLoc);
- // System.out.println("KILLSET=" + killSet);
- // System.out.println("GENSet=" + genSet);
- // System.out.println("DELETESET=" + currDeleteSet);
}
}
generateKILLSetForFlatCall(curr, killSet);
generateGENSetForFlatCall(curr, genSet);
- // System.out.println("#FLATCALL=" + fc);
- // System.out.println("KILLSET=" + killSet);
- // System.out.println("GENSet=" + genSet);
- // System.out.println("bound DELETE Set=" + calleeUnionBoundDeleteSet);
-
}
break;
mergeSharedLocMap(sharedLocMap, curr);
mergeDeleteSet(deleteSet, currDeleteSet);
- // System.out.println("#FLATEXIT sharedLocMap=" + sharedLocMap);
}
break;
}
computeNewMapping(curr, killSet, genSet);
- if (!curr.map.isEmpty()) {
- // System.out.println(fn + "#######" + curr);
- }
}
private void computeSharedCoverSet_analyzeMethod(FlatMethod fm, boolean onlyVisitSSJavaLoop) {
- System.out.println("\n###");
- System.out.println("computeSharedCoverSet_analyzeMethod=" + fm);
+ // System.out.println("computeSharedCoverSet_analyzeMethod=" + fm);
MethodDescriptor md = fm.getMethod();
Set<FlatNode> flatNodesToVisit = new HashSet<FlatNode>();
}
NTuple<Location> lhsLocTuple = new NTuple<Location>();
- lhsLocTuple.addAll(deriveLocationTuple(md, lhs));
+ if (fld.isStatic()) {
+ if (fld.isFinal()) {
+ // in this case, fld has TOP location
+ Location topLocation = Location.createTopLocation(md);
+ lhsLocTuple.add(topLocation);
+ } else {
+ lhsLocTuple.addAll(deriveGlobalLocationTuple(md));
+ }
+ } else {
+ lhsLocTuple.addAll(deriveLocationTuple(md, lhs));
+ }
+
mapDescriptorToLocationPath.put(lhs, lhsLocTuple);
NTuple<Location> fieldLocTuple = new NTuple<Location>();
computeGENSetForWrite(lhsHeapPath, readWriteGenSet);
}
- // System.out.println("write effect on =" + lhsHeapPath);
- // System.out.println("#KILLSET=" + readWriteKillSet);
- // System.out.println("#GENSet=" + readWriteGenSet + "\n");
-
Set<WriteAge> writeAgeSet = curr.get(lhsHeapPath);
checkWriteAgeSet(writeAgeSet, lhsHeapPath, fn);
}
computeGENSetForWrite(fldHeapPath, readWriteGenSet);
}
- // System.out.println("KILLSET=" + readWriteKillSet);
- // System.out.println("GENSet=" + readWriteGenSet);
-
}
}
FlatCall fc = (FlatCall) fn;
SharedLocMap sharedLocMap = mapFlatNodeToSharedLocMapping.get(fc);
- // System.out.println("FLATCALL:" + fn);
generateKILLSetForFlatCall(fc, curr, sharedLocMap, readWriteKillSet);
generateGENSetForFlatCall(fc, sharedLocMap, readWriteGenSet);
- // System.out.println("KILLSET=" + readWriteKillSet);
- // System.out.println("GENSet=" + readWriteGenSet);
-
}
break;
checkManyRead((FlatCall) fn, curr);
}
- // System.out.println("#######" + curr);
-
}
}
Set<NTuple<Descriptor>> coverSet =
mapMethodToSharedLocCoverSet.get(methodContainingSSJavaLoop).get(locTuple);
- // System.out.println("locTuple=" + locTuple + " coverSet=" + coverSet +
- // " currSet=" + inSet);
-
return inSet.containsAll(coverSet);
}
private void checkWriteAgeSet(Set<WriteAge> writeAgeSet, NTuple<Descriptor> path, FlatNode fn) {
- // System.out.println("# CHECK WRITE AGE of " + path + " from set=" +
- // writeAgeSet);
-
if (writeAgeSet != null) {
for (Iterator iterator = writeAgeSet.iterator(); iterator.hasNext();) {
WriteAge writeAge = (WriteAge) iterator.next();
Hashtable<NTuple<Descriptor>, Set<WriteAge>> GENSet) {
Set<NTuple<Descriptor>> boundMayWriteSet = mapFlatNodeToBoundMayWriteSet.get(fc);
- // System.out.println("boundMayWriteSet=" + boundMayWriteSet);
for (Iterator iterator = boundMayWriteSet.iterator(); iterator.hasNext();) {
NTuple<Descriptor> heapPath = (NTuple<Descriptor>) iterator.next();