for( Iterator vIt = pag.getVarNodeNumberer().iterator(); vIt.hasNext(); ) {
final VarNode v = (VarNode) vIt.next();
scalars++;
PointsToSetInternal set = v.getP2Set();
if( set != null ) mass += set.size();
if( set != null ) varMass += set.size();
}
for( Iterator<Object> anIt = pag.allocSourcesIterator(); anIt.hasNext(); ) {
final AllocNode an = (AllocNode) anIt.next();
for( Iterator adfIt = an.getFields().iterator(); adfIt.hasNext(); ) {
final AllocDotField adf = (AllocDotField) adfIt.next();
PointsToSetInternal set = adf.getP2Set();
if( set != null ) mass += set.size();
if( set != null && set.size() > 0 ) {
adfs++;
}
}
}
G.v().out.println( "Set mass: " + mass );
G.v().out.println( "Variable mass: " + varMass );
G.v().out.println( "Scalars: "+scalars );
G.v().out.println( "adfs: "+adfs );
// Compute points-to set sizes of dereference sites BEFORE
// trimming sets by declared type
int[] deRefCounts = new int[30001];
for (VarNode v : pag.getDereferences()) {
PointsToSetInternal set = v.getP2Set();
int size = 0;
if( set != null ) size = set.size();
deRefCounts[size]++;
}
int total = 0;
for (int element : deRefCounts)
total+= element;