public HashSet<AllocationSite> allocationSites;
+ // CHANGE! Map HRN ID's to token sets (sets of IDs!)
+ public Hashtable< HeapRegionNode, HashSet< HashSet<HeapRegionNode> > > alpha;
+ //public Hashtable< touple< HRN, HRN >, HashSet< HashSet<HeapRegionNode> > > beta;
+
public OwnershipGraph( int allocationDepth ) {
this.allocationDepth = allocationDepth;
paramIndex2id = new Hashtable<Integer, Integer >();
allocationSites = new HashSet <AllocationSite>();
+
+ alpha = new Hashtable< HeapRegionNode, HashSet< HashSet<HeapRegionNode> > >();
}
mergeReferenceEdges ( og );
mergeId2paramIndex ( og );
mergeAllocationSites( og );
+ mergeTokenSets ( og );
}
protected void mergeOwnershipNodes( OwnershipGraph og ) {
}
+
+ protected void mergeTokenSets( OwnershipGraph og ) {
+ // alpha = new Hashtable< HeapRegionNode, HashSet< HashSet<HeapRegionNode> > >();
+
+ // if a key is in one or the other token set,
+ // add it to the merged token set.
+ // if a key is in both graphs, the merged
+ // token set should have that key and the union
+ // of values as the merged value.
+
+ /*
+ Set alphaB = og.alpha.entrySet();
+ Iterator iB = alphaB.iterator();
+ while( iB.hasNext() ) {
+ Map.Entry meB = (Map.Entry) iB.next();
+ HeapRegionNode hrnKeyB = (HeapRegionNode) meB.getKey();
+ HashSet< HashSet<HeapRegionNode> > > tokenSetsB =
+ (HashSet< HashSet<HeapRegionNode> > >) meB.getValue();
+
+ if( !alpha.containsKey( hrnKeyB ) ) {
+ alpha.put( hrnKeyB, tokenSetsB );
+ } else {
+
+ }
+ }
+ */
+ }
+
+
+
+
+
+
// it is necessary in the equals() member functions
// to "check both ways" when comparing the data
// structures of two graphs. For instance, if all