associate assignment nodes that writes to the same height location with corresponding...
[IRC.git] / Robust / src / Analysis / SSJava / SSJavaAnalysis.java
index 58369f8f6e4c885abe7ad5dd8bd1891b4ee81b3d..7326d7e9b01455c2ba2ca270e7208f4ff1f2814c 100644 (file)
@@ -87,6 +87,8 @@ public class SSJavaAnalysis {
   // keep the field ownership from the linear type checking
   Hashtable<MethodDescriptor, Set<FieldDescriptor>> mapMethodToOwnedFieldSet;
 
+  Set<FlatNode> sameHeightWriteFlatNodeSet;
+
   CallGraph callgraph;
 
   LinearTypeCheck checker;
@@ -106,6 +108,7 @@ public class SSJavaAnalysis {
     this.bf = bf;
     this.trustWorthyMDSet = new HashSet<MethodDescriptor>();
     this.mapMethodToOwnedFieldSet = new Hashtable<MethodDescriptor, Set<FieldDescriptor>>();
+    this.sameHeightWriteFlatNodeSet = new HashSet<FlatNode>();
   }
 
   public void doCheck() {
@@ -560,4 +563,12 @@ public class SSJavaAnalysis {
     this.ssjavaLoopEntrance = ssjavaLoopEntrance;
   }
 
+  public void addSameHeightWriteFlatNode(FlatNode fn) {
+    this.sameHeightWriteFlatNodeSet.add(fn);
+  }
+
+  public boolean isSameHeightWrite(FlatNode fn) {
+    return this.sameHeightWriteFlatNodeSet.contains(fn);
+  }
+
 }