changes: now Inference engine works fine with the EyeTracking benchmark.
[IRC.git] / Robust / src / Analysis / SSJava / FlowNode.java
index 51f1b08db11a64073901e5601b92bef8b83542e2..d170494f8a3c32ee9aef5f696f446760af5ab24d 100644 (file)
@@ -1,9 +1,9 @@
 package Analysis.SSJava;
 
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Set;
 
+import IR.ClassDescriptor;
 import IR.Descriptor;
 import IR.FieldDescriptor;
 import IR.VarDescriptor;
@@ -11,7 +11,7 @@ import IR.VarDescriptor;
 public class FlowNode {
 
   // descriptor tuple is a unique identifier of the flow node
-  private NTuple<Descriptor> descTuple;
+  protected NTuple<Descriptor> descTuple;
 
   // if the infer node represents the base type of field access,
   // this set contains fields of the base type
@@ -28,6 +28,10 @@ public class FlowNode {
 
   private boolean isSkeleton;
 
+  private boolean isFormHolder = false;
+
+  private NTuple<Descriptor> baseTuple;
+
   public boolean isIntermediate() {
     return isIntermediate;
   }
@@ -36,6 +40,22 @@ public class FlowNode {
     this.isIntermediate = isIntermediate;
   }
 
+  public void setFormHolder(boolean in) {
+    isFormHolder = in;
+  }
+
+  public boolean isFromHolder() {
+    return isFormHolder;
+  }
+
+  public void setBaseTuple(NTuple<Descriptor> in) {
+    baseTuple = in;
+  }
+
+  public NTuple<Descriptor> getBaseTuple() {
+    return baseTuple;
+  }
+
   public Set<FlowNode> getFieldNodeSet() {
     return fieldNodeSet;
   }
@@ -65,6 +85,7 @@ public class FlowNode {
   }
 
   public void setCompositeLocation(CompositeLocation in) {
+    System.out.println("$$$set compLoc=" + in);
     compLoc = in;
   }
 
@@ -84,14 +105,6 @@ public class FlowNode {
     return descTuple.get(descTuple.size() - 1);
   }
 
-  public boolean isReturn() {
-    return isReturn;
-  }
-
-  public void setReturn(boolean isReturn) {
-    this.isReturn = isReturn;
-  }
-
   public boolean isPrimitiveType() {
     Descriptor desc = descTuple.get(descTuple.size() - 1);
     if (desc instanceof VarDescriptor) {
@@ -111,18 +124,6 @@ public class FlowNode {
     return rtr;
   }
 
-//  public Iterator<FlowEdge> iteratorOfOutEdges() {
-//    return outEdgeSet.iterator();
-//  }
-//
-//  public void addOutEdge(FlowEdge out) {
-//    outEdgeSet.add(out);
-//  }
-//
-//  public Set<FlowEdge> getOutEdgeSet() {
-//    return outEdgeSet;
-//  }
-
   public int hashCode() {
     return 7 + descTuple.hashCode();
   }
@@ -163,13 +164,13 @@ public class FlowNode {
       id += " " + compLoc;
     }
 
-    if (isReturn()) {
-      property += "R";
-    }
-
-    if (isSkeleton()) {
-      property += "S";
-    }
+    // if (isReturn()) {
+    // property += "R";
+    // }
+    //
+    // if (isSkeleton()) {
+    // property += "S";
+    // }
 
     if (property.length() > 0) {
       property = " [" + property + "]";