use of soot.PointsToSet in project soot by Sable.
the class PointsToAnalysis method printLocalIntersects.
private static void printLocalIntersects(Map ls) {
soot.PointsToAnalysis pta = Scene.v().getPointsToAnalysis();
Iterator i1 = ls.entrySet().iterator();
while (i1.hasNext()) {
Map.Entry e1 = (Map.Entry) i1.next();
int p1 = ((Integer) e1.getKey()).intValue();
Local l1 = (Local) e1.getValue();
PointsToSet r1 = pta.reachingObjects(l1);
Iterator i2 = ls.entrySet().iterator();
while (i2.hasNext()) {
Map.Entry e2 = (Map.Entry) i2.next();
int p2 = ((Integer) e2.getKey()).intValue();
Local l2 = (Local) e2.getValue();
PointsToSet r2 = pta.reachingObjects(l2);
if (p1 <= p2)
System.out.println("[" + p1 + "," + p2 + "]\t Container intersect? " + r1.hasNonEmptyIntersection(r2));
}
}
}
use of soot.PointsToSet in project soot by Sable.
the class DemandCSPointsTo method computeReachingObjects.
/**
* Computes the possibly refined set of reaching objects for l.
*/
protected PointsToSet computeReachingObjects(Local l) {
VarNode v = pag.findLocalVarNode(l);
if (v == null) {
// no reaching objects
return EmptyPointsToSet.v();
}
PointsToSet contextSensitiveResult = computeRefinedReachingObjects(v);
if (contextSensitiveResult == null) {
// had to abort; return Spark's points-to set in a wrapper
return new WrappedPointsToSet(v.getP2Set());
} else {
return contextSensitiveResult;
}
}
Aggregations