// keep the field ownership from the linear type checking
Hashtable<MethodDescriptor, Set<FieldDescriptor>> mapMethodToOwnedFieldSet;
-
+
Set<FlatNode> sameHeightWriteFlatNodeSet;
CallGraph callgraph;
public void doCheck() {
doMethodAnnotationCheck();
- if (state.SSJAVA) {
+ if (state.SSJAVA && !state.SSJAVAINFER) {
computeLinearTypeCheckMethodSet();
doLinearTypeCheck();
+ init();
}
- init();
-
if (state.SSJAVADEBUG) {
// debug_printAnnotationRequiredSet();
}
}
}
- private void init() {
+ public void init() {
// perform topological sort over the set of methods accessed by the main
// event loop
Set<MethodDescriptor> methodDescriptorsToAnalyze = new HashSet<MethodDescriptor>();
public <T> void writeLatticeDotFile(ClassDescriptor cd, MethodDescriptor md,
SSJavaLattice<T> locOrder) {
+ writeLatticeDotFile(cd, md, locOrder, "");
+
+ }
+
+ public <T> void writeLatticeDotFile(ClassDescriptor cd, MethodDescriptor md,
+ SSJavaLattice<T> locOrder, String nameSuffix) {
String fileName = "lattice_";
if (md != null) {
fileName +=
- cd.getSymbol().replaceAll("[\\W_]", "") + "_" + md.getSymbol().replaceAll("[\\W_]", "");
+ cd.getSymbol().replaceAll("[\\W_]", "") + "_" + md.toString().replaceAll("[\\W_]", "");
} else {
fileName += cd.getSymbol().replaceAll("[\\W_]", "");
}
+ fileName += nameSuffix;
+
Set<Pair<T, T>> pairSet = locOrder.getOrderingPairSet();
if (pairSet.size() > 0) {
locOrder.put(higherLoc, lowerLoc);
if (locOrder.isIntroducingCycle(higherLoc)) {
throw new Error("Error: the order relation " + lowerLoc + " < " + higherLoc
- + " introduces a cycle.");
+ + " introduces a cycle in the class lattice " + cd);
}
} else if (orderElement.contains("*")) {
// spin loc definition