protected AllocationSite allocSite;
protected ReachabilitySet alpha;
+ protected ReachabilitySet alphaNew;
protected String description;
this.isNewSummary = isNewSummary;
this.allocSite = allocSite;
this.alpha = alpha;
+ this.alphaNew = null;
this.description = description;
referencers = new HashSet<OwnershipNode>();
return alpha;
}
+ public ReachabilitySet getAlphaNew() {
+ return alphaNew;
+ }
+
+ public void setAlphaNew( ReachabilitySet alpha ) {
+ this.alphaNew = alpha;
+ }
+
+ public void applyAlphaNew() {
+ assert alphaNew != null;
+ alpha = alphaNew;
+ alphaNew = null;
+ }
+
public String getIDString() {
return id.toString();
}
+
+ protected void propagateTokens( HeapRegionNode nPrime, ChangeTupleSet c0 ) {
+
+ }
+
+
////////////////////////////////////////////////////
//
// Assignment Operation Methods
ReachabilitySet beta2 = rep2.getBeta();
ReferenceEdgeProperties rep = rep2.copy();
+ rep.setIsInitialParamReflexive( false );
rep.setBeta( beta1.intersection( beta2 ) );
addReferenceEdge( dstln, hrnOneHop, rep );
public void assignFieldToTemp( TempDescriptor src,
TempDescriptor dst,
FieldDescriptor fd ) {
+
+ // I think my use of src and dst are actually backwards in this method!
+ // acccording to the Reachability Notes, think of dst at N and src as N prime
+
LabelNode srcln = getLabelNodeFromTemp( src );
LabelNode dstln = getLabelNodeFromTemp( dst );
- HeapRegionNode hrn = null;
+ HashSet<HeapRegionNode> nodesWithNewAlpha = new HashSet<HeapRegionNode>();
+ HashSet<ReferenceEdgeProperties> edgesWithNewBeta = new HashSet<ReferenceEdgeProperties>();
+
+ HeapRegionNode hrn = null;
+ ReferenceEdgeProperties rep = null;
Iterator dstRegionsItr = dstln.setIteratorToReferencedRegions();
while( dstRegionsItr.hasNext() ) {
- Map.Entry me = (Map.Entry) dstRegionsItr.next();
- hrn = (HeapRegionNode) me.getKey();
+ Map.Entry me = (Map.Entry) dstRegionsItr.next();
+ hrn = (HeapRegionNode) me.getKey();
+ rep = (ReferenceEdgeProperties) me.getValue();
- HeapRegionNode hrnSrc = null;
+ ReachabilitySet R = hrn.getAlpha().intersection( rep.getBeta() );
+
+ HeapRegionNode hrnSrc = null;
+ ReferenceEdgeProperties repSrc = null;
Iterator srcRegionsItr = srcln.setIteratorToReferencedRegions();
while( srcRegionsItr.hasNext() ) {
- Map.Entry meS = (Map.Entry) srcRegionsItr.next();
- hrnSrc = (HeapRegionNode) meS.getKey();
+ Map.Entry meS = (Map.Entry) srcRegionsItr.next();
+ hrnSrc = (HeapRegionNode) meS.getKey();
+ repSrc = (ReferenceEdgeProperties) meS.getValue();
+
+ ReferenceEdgeProperties repNew
+ = new ReferenceEdgeProperties( false, false, null );
- ReferenceEdgeProperties rep = new ReferenceEdgeProperties();
- addReferenceEdge( hrn, hrnSrc, rep );
+ addReferenceEdge( hrn, hrnSrc, repNew );
+
+ ReachabilitySet O = srcln.getReferenceTo( hrnSrc ).getBeta();
+ ChangeTupleSet C = O.unionUpArity( R );
+ propagateTokens( hrnSrc, C );
}
}
+
+ Iterator nodeItr = nodesWithNewAlpha.iterator();
+ while( nodeItr.hasNext() ) {
+ ((HeapRegionNode) nodeItr.next()).applyAlphaNew();
+ }
+
+ Iterator edgeItr = edgesWithNewBeta.iterator();
+ while( edgeItr.hasNext() ) {
+ ((ReferenceEdgeProperties) edgeItr.next()).applyBetaNew();
+ }
}
public void assignTempToParameterAllocation( boolean isTask,
public class ReferenceEdgeProperties {
+ protected boolean isUnique;
+ protected boolean isInitialParamReflexive;
+
+ protected ReachabilitySet beta;
+ protected ReachabilitySet betaNew;
+
+
public ReferenceEdgeProperties() {
this.isUnique = false;
this.isInitialParamReflexive = false;
this.beta = new ReachabilitySet();
+ this.betaNew = null;
}
public ReferenceEdgeProperties( boolean isUnique ) {
this.isUnique = isUnique;
this.isInitialParamReflexive = false;
this.beta = new ReachabilitySet();
+ this.betaNew = null;
}
public ReferenceEdgeProperties( boolean isUnique,
this.isUnique = isUnique;
this.isInitialParamReflexive = isInitialParamReflexive;
this.beta = new ReachabilitySet();
+ this.betaNew = null;
}
public ReferenceEdgeProperties( boolean isUnique,
this.isUnique = isUnique;
this.isInitialParamReflexive = isInitialParamReflexive;
this.beta = beta;
+ this.betaNew = null;
}
}
- protected boolean isUnique;
+
public boolean isUnique() {
return isUnique;
}
}
- protected boolean isInitialParamReflexive;
+
public boolean isInitialParamReflexive() {
return isInitialParamReflexive;
}
}
- protected ReachabilitySet beta;
+
public ReachabilitySet getBeta() {
return beta;
}
this.beta = beta;
}
+ public ReachabilitySet getBetaNew() {
+ return betaNew;
+ }
+ public void setBetaNew( ReachabilitySet beta ) {
+ this.betaNew = beta;
+ }
+ public void applyBetaNew() {
+ assert betaNew != null;
+ beta = betaNew;
+ betaNew = null;
+ }
+
+
public boolean equals( ReferenceEdgeProperties rep ) {
return isUnique == rep.isUnique() &&
isInitialParamReflexive == rep.isInitialParamReflexive();
}
*/
if( isInitialParamReflexive ) {
- edgeLabel += "Rfx\\n";
+ edgeLabel += "Rflx\\n";
}
edgeLabel += getBetaString();
return edgeLabel;