public class DisjointAnalysis implements HeapAnalysis {
+
///////////////////////////////////////////
//
// Public interface to discover possible
} else {
treport = String.format("Disjoint reachability analysis took %.3f sec.", dt);
}
+ if( state.DISJOINT_COUNT_VISITS ) {
+ treport += "\nFixed point algorithm visited "+totalMethodVisits+
+ " methods and "+totalNodeVisits+" nodes.";
+ }
String justtime = String.format("%.2f", dt);
System.out.println(treport);
protected ReachGraph analyzeMethod(Descriptor d)
throws java.io.IOException {
+ if( state.DISJOINT_COUNT_VISITS ) {
+ ++totalMethodVisits;
+ }
+
// get the flat code for this descriptor
FlatMethod fm;
if( d == mdAnalysisEntry ) {
) throws java.io.IOException {
+ if( state.DISJOINT_COUNT_VISITS ) {
+ ++totalNodeVisits;
+ }
+
+
// any variables that are no longer live should be
// nullified in the graph to reduce edges
//rg.nullifyDeadVars( liveness.getLiveInTemps( fmContaining, fn ) );
return rgAtExit.canPointTo( x, arrayElementFieldName, x.getType().dereference() );
}
+
+
+ // to evaluate convergence behavior
+ private static long totalMethodVisits = 0;
+ private static long totalNodeVisits = 0;
}
state.DO_DEFINITE_REACH_ANALYSIS = true;
+ } else if( option.equals("-count-visits") ) {
+ state.DISJOINT_COUNT_VISITS = true;
+
+
} else if (option.equals("-optional"))
state.OPTIONAL=true;
else if (option.equals("-optimize"))
echo -disjoint-desire-determinism set above interproc for determinism
echo -disjoint-debug-scheduling debug when methods are scheduled for analysis
echo -do-definite-reach-analysis enable improved precision for disjoint reachability analysis
+echo -count-visits for counting visits in the fixed point algorithm to evaluate convergence behavior
echo
echo -pointsto-check-v-runtime check allocation site of pointer targets at runtime to help verify heap analysis results
echo