Stub out ownership analysis classes that break compilation.
authorjjenista <jjenista>
Tue, 12 Feb 2008 01:05:52 +0000 (01:05 +0000)
committerjjenista <jjenista>
Tue, 12 Feb 2008 01:05:52 +0000 (01:05 +0000)
Robust/src/Analysis/OwnershipAnalysis/AllocationSite.java [new file with mode: 0644]
Robust/src/Analysis/OwnershipAnalysis/HeapRegionNode.java [new file with mode: 0644]
Robust/src/Analysis/OwnershipAnalysis/LabelNode.java [new file with mode: 0644]
Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java
Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
Robust/src/Analysis/OwnershipAnalysis/OwnershipNode.java
Robust/src/Analysis/OwnershipAnalysis/ReferenceEdgeProperties.java [new file with mode: 0644]

diff --git a/Robust/src/Analysis/OwnershipAnalysis/AllocationSite.java b/Robust/src/Analysis/OwnershipAnalysis/AllocationSite.java
new file mode 100644 (file)
index 0000000..2b84766
--- /dev/null
@@ -0,0 +1,34 @@
+package Analysis.OwnershipAnalysis;
+
+import IR.*;
+import IR.Flat.*;
+import java.util.*;
+
+public class AllocationSite {
+    /*
+    protected int newDepthK;
+    protected Vector<HeapRegionNode> ithOldest;
+
+    public NewCluster( int newDepthK ) {
+       assert newDepthK >= 3;
+
+       this.newDepthK = newDepthK;
+       ithOldest = new Vector<HeapRegionNode>( newDepthK );
+    }
+    
+    public void setIthOldest( int i, HeapRegionNode hrn ) {
+       assert i >= 0;
+       assert i < newDepthK;
+       assert hrn != null;
+
+       ithOldest.add( i, hrn );
+    }
+
+    public HeapRegionNode getIthOldest( int i ) {
+       assert i >= 0;
+       assert i < newDepthK;
+
+       return ithOldest.get( i );
+    }
+    */
+}
diff --git a/Robust/src/Analysis/OwnershipAnalysis/HeapRegionNode.java b/Robust/src/Analysis/OwnershipAnalysis/HeapRegionNode.java
new file mode 100644 (file)
index 0000000..c03d03f
--- /dev/null
@@ -0,0 +1,146 @@
+package Analysis.OwnershipAnalysis;
+
+import IR.*;
+import IR.Flat.*;
+import java.util.*;
+
+public class HeapRegionNode extends OwnershipNode {
+
+    /*
+    public HeapRegionNode( Integer id,
+                          boolean isSingleObject,
+                          boolean isFlagged,
+                          boolean isNewSummary ) {
+       this.id = id;
+       this.isSingleObject = isSingleObject;
+       this.isFlagged      = isFlagged;
+       this.isNewSummary   = isNewSummary;
+
+       referencers           = new HashSet<OwnershipNode>();
+       analysisRegionAliases = new HashSet<TempDescriptor>();
+       memberFields          = new HashSet<TempDescriptor>();
+    }
+
+    public HeapRegionNode copy() {
+       return new HeapRegionNode( id,
+                                  isSingleObject,
+                                  isFlagged,
+                                  isNewSummary );
+    }
+
+
+    /////////////////
+    // equality  
+    /////////////////
+    protected Integer id;
+
+    public Integer getID() {
+       return id;
+    }
+
+    public boolean equals( HeapRegionNode hrn ) {
+       assert hrn != null;
+
+       return id.equals( hrn.getID() )            &&
+           isSingleObject == hrn.isSingleObject() &&
+           isFlagged      == hrn.isFlagged()      &&
+           isNewSummary   == hrn.isNewSummary();
+    }
+    /////////////////
+    // end equality  
+    /////////////////
+
+
+    
+    /////////////////
+    // predicates
+    /////////////////
+    boolean isSingleObject;
+    public boolean isSingleObject() {
+       return isSingleObject;
+    }
+
+    boolean isFlagged;
+    public boolean isFlagged() {
+       return isFlagged;
+    }
+
+    boolean isNewSummary;
+    public boolean isNewSummary() {
+       return isNewSummary;
+    }
+    ///////////////////
+    // end predicates 
+    ///////////////////
+
+
+
+    ///////////////////////////////////////////
+    // interface with larger graph
+    ///////////////////////////////////////////
+    protected HashSet<TempDescriptor> memberFields;
+    protected HashSet<OwnershipNode>  referencers;
+
+    public Iterator iteratorToReferencers() {
+       return referencers.iterator();
+    }
+
+    public Iterator iteratorToReferencersClone() {
+       HashSet hs = (HashSet) referencers.clone();
+       return hs.iterator();
+    }
+
+    public void addReferencer( OwnershipNode on ) {
+       assert on != null;
+
+       referencers.add( on );
+    }
+
+    public void removeReferencer( OwnershipNode on ) {
+       assert on != null;
+       assert referencers.contains( on );
+
+       referencers.remove( on );
+    }
+
+    public boolean isReferencedBy( OwnershipNode on ) {
+       assert on != null;
+       return referencers.contains( on );
+    }
+    ///////////////////////////////////////////////
+    // end interface with larger graph
+    ///////////////////////////////////////////////
+
+
+
+
+    ///////////////////////////////////////////////
+    // analysis interface
+    ///////////////////////////////////////////////
+    protected HashSet<TempDescriptor> analysisRegionAliases;
+
+    public void addAnalysisRegionAlias( TempDescriptor td ) {
+       assert td != null;
+       assert !analysisRegionAliases.contains( td );
+       
+       analysisRegionAliases.add( td );
+    }
+
+    public Iterator iteratorToAnalysisRegionAliases() {
+       return analysisRegionAliases.iterator();
+    }
+    ///////////////////////////////////////////////
+    // end analysis interface
+    ///////////////////////////////////////////////
+
+
+    // for writing out
+    public String getIDString() {
+       return id.toString();
+    }
+
+    public String toString() {
+       return "HRN"+getIDString();
+    }
+    */
+}
diff --git a/Robust/src/Analysis/OwnershipAnalysis/LabelNode.java b/Robust/src/Analysis/OwnershipAnalysis/LabelNode.java
new file mode 100644 (file)
index 0000000..d88e12a
--- /dev/null
@@ -0,0 +1,43 @@
+package Analysis.OwnershipAnalysis;
+
+import IR.*;
+import IR.Flat.*;
+import java.util.*;
+
+public class LabelNode extends OwnershipNode {
+
+    /*
+    public LabelNode( TempDescriptor td ) {
+       this.td = td;
+    }
+
+
+    /////////////////
+    // equality  
+    /////////////////
+    protected TempDescriptor td;
+
+    public TempDescriptor getTempDescriptor() {
+       return td;
+    }
+
+    public boolean equals( LabelNode ln ) {
+       assert ln != null;
+       return td == ln.getTempDescriptor();
+    }
+    /////////////////
+    // end equality  
+    /////////////////
+
+
+    // for writing out
+    public String getTempDescriptorString() {
+       return td.toString();
+    }
+
+    public String toString() {
+       return "LN_"+getTempDescriptorString();
+    }
+    */
+
+}
index 511c48ea396462a4b9593dddd901bf622ef432ad..9eae3336d4d3a40d78347dc62f053f7e07de41d6 100644 (file)
@@ -8,6 +8,7 @@ import java.io.*;
 
 public class OwnershipAnalysis {
 
+    /*
     // from the compiler
     private State state;
     private int   allocationDepthK;
@@ -307,4 +308,6 @@ public class OwnershipAnalysis {
     private String makeCondensedAnalysisName( String methodname, Integer id ) {
        return "method_"+methodname+"_Ownership_from"+id;
     }
+    */
+
 }
index ec9b4a992299b0bd6138240d1f09cadebe0c2514..069425ec0e34c5338bc175009dd45ec360f9ecda 100644 (file)
@@ -7,6 +7,7 @@ import java.io.*;
 
 public class OwnershipGraph {
 
+    /*
     protected static final int VISIT_HRN_WRITE_FULL      = 0;
     protected static final int VISIT_HRN_WRITE_CONDENSED = 1;
 
@@ -1111,4 +1112,6 @@ public class OwnershipGraph {
            traverseHeapRegionNodes( mode, hrnChild, bw, td, visited );
        }
     }
+    */
+
 }
index a216ca7a0655f627ca3eb85c77729fcdd46c2691..bb7a2ebb7c4d89d07aa9eb138b26b7ca4a31f01e 100644 (file)
@@ -6,6 +6,7 @@ import java.util.*;
 
 public class OwnershipNode {   
 
+    /*
     public OwnershipNode() {
        referencedRegions = 
            new Hashtable<HeapRegionNode, ReferenceEdgeProperties>();
@@ -53,4 +54,5 @@ public class OwnershipNode {
     ///////////////////////////////////////////////
     // end interface with larger graph
     ///////////////////////////////////////////////
+    */
 }
\ No newline at end of file
diff --git a/Robust/src/Analysis/OwnershipAnalysis/ReferenceEdgeProperties.java b/Robust/src/Analysis/OwnershipAnalysis/ReferenceEdgeProperties.java
new file mode 100644 (file)
index 0000000..772c3b4
--- /dev/null
@@ -0,0 +1,36 @@
+package Analysis.OwnershipAnalysis;
+
+public class ReferenceEdgeProperties {
+
+    /*
+    public ReferenceEdgeProperties( boolean isUnique ) {
+       this.isUnique = isUnique;
+    }
+
+    public ReferenceEdgeProperties copy() {
+       return new ReferenceEdgeProperties( isUnique );
+    }
+
+
+    /////////////////
+    // equality  
+    /////////////////
+    protected boolean isUnique;
+
+    public boolean isUnique() {
+       return isUnique;
+    }
+
+    public boolean equals( ReferenceEdgeProperties rep ) {
+       return isUnique == rep.isUnique();
+    }
+    /////////////////
+    // end equality  
+    /////////////////
+
+
+    public void setIsUnique( boolean isUnique ) {
+       this.isUnique = isUnique;
+    }
+    */
+}