FlatNode fn = (FlatNode) flatNodesToVisit.iterator().next();
flatNodesToVisit.remove(fn);
+ //System.out.println( " "+fn );
+
// perform this node's contributions to the ownership
// graph on a new copy, then compare it to the old graph
// at this node to see if anything was updated.
returnNodesToCombineForCompleteOwnershipGraph,
og);
+
+
+ //debugSnapshot(og,fn);
+
+
+
// if the results of the new graph are different from
// the current graph at this node, replace the graph
// with the update and enqueue the children for
// insert a call to debugSnapshot() somewhere in the analysis to get
// successive captures of the analysis state
- int debugCounter = 0;
- int numIterationsIn = 80000;
- int numIterationsToCapture = 53;
+ int debugCounter = 0;
+ int numStartCountReport = 66000;
+ int freqCountReport = 50;
+ int iterStartCapture = 70000;
+ int numIterToCapture = 100;
void debugSnapshot( OwnershipGraph og, FlatNode fn ) {
++debugCounter;
- if( debugCounter > numIterationsIn ) {
- System.out.println( " @@@ capturing debug "+(debugCounter-numIterationsIn)+" @@@" );
- String graphName = String.format("snap%04d",debugCounter-numIterationsIn);
+ if( debugCounter > numStartCountReport &&
+ debugCounter % freqCountReport == 0 ) {
+ System.out.println( " @@@ debug counter = "+debugCounter );
+ }
+ if( debugCounter > iterStartCapture ) {
+ System.out.println( " @@@ capturing debug "+(debugCounter-iterStartCapture)+" @@@" );
+ String graphName = String.format("snap%04d",debugCounter-iterStartCapture);
if( fn != null ) {
graphName = graphName+fn;
}
System.exit( 0 );
}
}
- if( debugCounter == numIterationsIn + numIterationsToCapture ) {
+ if( debugCounter == iterStartCapture + numIterToCapture ) {
System.out.println( "Stopping analysis after debug captures." );
System.exit( 0 );
}
ReferenceEdge edge = edgeItr.next();
D_i = D_i.union(edge.getBeta() );
}
+
D_i = D_i.exhaustiveArityCombinations();
+
paramIndex2rewriteD.put(paramIndex, D_i);
}
}
}
-
// update reachable edges
Iterator<ReferenceEdge> edgeReachableItr = edgesReachable.iterator();
while( edgeReachableItr.hasNext() ) {
edgesWithNewBeta.add(edgeReachable);
}
-
// update upstream edges
Hashtable<ReferenceEdge, ChangeTupleSet> edgeUpstreamPlannedChanges
= new Hashtable<ReferenceEdge, ChangeTupleSet>();
}
-
// verify the existence of allocation sites and their
// shadows from the callee in the context of this caller graph
// then map allocated nodes of callee onto the caller shadows
}
-
// return value may need to be assigned in caller
if( fc.getReturnTemp() != null ) {
}
-
// merge the shadow nodes of allocation sites back down to normal capacity
Iterator<AllocationSite> allocItr = ogCallee.allocationSites.iterator();
while( allocItr.hasNext() ) {
int numDimensions = this.possibleReachabilities.size();
+ if( numDimensions > 10 ) {
+ System.out.println( "exhaustiveArityCombinations numDimensions = "+numDimensions );
+ }
+
// add an extra digit to detect termination
int[] digits = new int[numDimensions+1];
// increment
for( int i = 0; i < numDimensions+1; ++i ) {
digits[i]++;
+
+
+ if( i == 11 ) {
+ System.out.print( "x " );
+ }
+
+ if( i == 15 ) {
+ System.out.print( "@ " );
+ }
+
+ if( i == 17 ) {
+ System.out.print( "# " );
+ }
+
if( digits[i] > maxArity ) {
// this axis reached its max, so roll it back to min and increment next higher digit
digits[i] = minArity;