1) allow to set the maximum threshold for the liveness analysis. if threashold is...
[IRC.git] / Robust / src / Analysis / Pointer / Pointer.java
index 57f6181c183d0a681bfc0e50d74832239aaff95f..8b0ce00bfac302c3987be65ed739192fd9236ab1 100644 (file)
@@ -76,7 +76,7 @@ public class Pointer implements HeapAnalysis {
   public BasicBlock getBBlock(FlatMethod fm) {
     if (!blockMap.containsKey(fm)) {
       blockMap.put(fm, BasicBlock.getBBlock(fm));
-      Hashtable<FlatNode, Set<TempDescriptor>> livemap=Liveness.computeLiveTemps(fm);
+      Hashtable<FlatNode, Set<TempDescriptor>> livemap=Liveness.computeLiveTemps(fm,-1);
       for(BBlock bblock : blockMap.get(fm).getBlocks()) {
         FlatNode fn=bblock.nodes.get(0);
         if (fn==fm) {
@@ -469,6 +469,14 @@ nextdelta:
     case FKind.FlatCall:
       return processFlatCall(bblock, index, (FlatCall) node, delta, newgraph);
 
+    case FKind.FlatLiteralNode:
+      // jjenista - the heap analysis abstraction---when used to verify points-to
+      // analysis results against runtime pointers---will eventually need this to
+      // model that a flat literal node can result in a pointer to an implicitly
+      // allocated string.  For now it will pass through like Pointer used to, but
+      // the checks versus runtime pointers will fail for string literals.
+      return delta;
+
     default:
       throw new Error("Unrecognized node:"+node + " of kind " + node.kind());
     }
@@ -2117,11 +2125,6 @@ nextdelta:
     return null; 
   }
 
-  public Set<Alloc> canPointToAfter( TempDescriptor x,
-                                     FlatNode programPoint ) {
-    return null; 
-  }
-
   public Hashtable< Alloc, Set<Alloc> > canPointToAt( TempDescriptor x,
                                                       FieldDescriptor f,
                                                       FlatNode programPoint ) {
@@ -2132,4 +2135,20 @@ nextdelta:
                                                              FlatNode programPoint ) {
     return null; 
   }
+
+  public Set<Alloc> canPointToAfter( TempDescriptor x,
+                                     FlatNode programPoint ) {
+    return null; 
+  }
+
+  public Hashtable< Alloc, Set<Alloc> > canPointToAfter( TempDescriptor x,
+                                                         FieldDescriptor f,
+                                                         FlatNode programPoint ) {
+    return null;
+  }
+
+  public Hashtable< Alloc, Set<Alloc> > canPointToAfterElement( TempDescriptor x, // x[i]
+                                                                FlatNode programPoint ) {
+    return null;
+  }
 }