|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soot.jimple.spark.ondemand.DemandCSPointsTo
public final class DemandCSPointsTo
Tries to find imprecision in points-to sets from a previously run analysis. Requires that all sub-results of previous analysis were cached.
Nested Class Summary | |
---|---|
protected static class |
DemandCSPointsTo.AllocAndContextCache
|
protected static class |
DemandCSPointsTo.CallingContextSet
|
protected static class |
DemandCSPointsTo.CallSiteAndContext
|
protected static class |
DemandCSPointsTo.CallSiteToTargetsMap
|
protected static class |
DemandCSPointsTo.IncomingEdgeHandler
|
protected static class |
DemandCSPointsTo.VarAndContext
|
protected static class |
DemandCSPointsTo.VarContextAndUp
|
Constructor Summary | |
---|---|
DemandCSPointsTo(ContextSensitiveInfo csInfo,
PAG pag)
|
|
DemandCSPointsTo(ContextSensitiveInfo csInfo,
PAG pag,
int maxTraversal,
int maxPasses,
boolean lazy)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DEBUG
protected static final int DEBUG_NESTING
protected static final int DEBUG_PASS
protected static final boolean DEBUG_VIRT
protected static final int DEFAULT_MAX_PASSES
protected static final int DEFAULT_MAX_TRAVERSAL
protected static final boolean DEFAULT_LAZY
protected static final ImmutableStack<Integer> EMPTY_CALLSTACK
protected final DemandCSPointsTo.AllocAndContextCache allocAndContextCache
protected Stack<Pair<Integer,ImmutableStack<Integer>>> callGraphStack
protected final DemandCSPointsTo.CallSiteToTargetsMap callSiteToResolvedTargets
protected HashMap<List<Object>,Set<SootMethod>> callTargetsArgCache
protected final Stack<DemandCSPointsTo.VarAndContext> contextForAllocsStack
protected Map<DemandCSPointsTo.VarAndContext,Pair<PointsToSetInternal,AllocAndContextSet>> contextsForAllocsCache
protected final ContextSensitiveInfo csInfo
protected boolean doPointsTo
true
, compute full points-to set for queried
variable
protected FieldCheckHeuristic fieldCheckHeuristic
protected HeuristicType heuristicType
protected SootUtil.FieldToEdgesMap fieldToLoads
protected SootUtil.FieldToEdgesMap fieldToStores
protected final int maxNodesPerPass
protected final int maxPasses
protected int nesting
protected int numNodesTraversed
protected int numPasses
protected final PAG pag
protected AllocAndContextSet pointsTo
protected final Set<DemandCSPointsTo.CallSiteAndContext> queriedCallSites
protected int recursionDepth
protected boolean refiningCallSite
protected OTFMethodSCCManager sccManager
protected Map<DemandCSPointsTo.VarContextAndUp,Map<AllocAndContext,DemandCSPointsTo.CallingContextSet>> upContextCache
protected ValidMatches vMatches
protected Map<Local,PointsToSet> reachingObjectsCache
protected Map<Local,PointsToSet> reachingObjectsCacheNoCGRefinement
protected boolean useCache
Constructor Detail |
---|
public DemandCSPointsTo(ContextSensitiveInfo csInfo, PAG pag)
public DemandCSPointsTo(ContextSensitiveInfo csInfo, PAG pag, int maxTraversal, int maxPasses, boolean lazy)
Method Detail |
---|
public static DemandCSPointsTo makeDefault()
public static DemandCSPointsTo makeWithBudget(int maxTraversal, int maxPasses, boolean lazy)
public PointsToSet reachingObjects(Local l)
PointsToAnalysis
reachingObjects
in interface PointsToAnalysis
public PointsToSet doReachingObjects(Local l)
protected PointsToSet computeReachingObjects(Local l)
protected PointsToSet computeRefinedReachingObjects(VarNode v)
null
if refinement failed.
protected boolean callEdgeInSCC(AssignEdge assignEdge)
protected DemandCSPointsTo.CallingContextSet checkAllocAndContextCache(AllocAndContext allocAndContext, VarNode targetVar)
protected PointsToSetInternal checkContextsForAllocsCache(DemandCSPointsTo.VarAndContext varAndContext, AllocAndContextSet ret, PointsToSetInternal locs)
protected boolean checkP2Set(VarNode v, HeuristicType heuristic, Predicate<Set<AllocAndContext>> p2setPred)
v
- the variableheuristic
- how to refine match edgesp2setPred
- the predicate on the points-to set
protected DemandCSPointsTo.CallingContextSet checkUpContextCache(DemandCSPointsTo.VarContextAndUp varContextAndUp, AllocAndContext allocAndContext)
protected void clearState()
protected Set<VarNode> computeFlowsTo(AllocNode alloc, HeuristicType heuristic)
alloc
- heuristic
-
protected void debugPrint(String str)
protected void dumpPathForLoc(VarNode v, AllocNode badLoc, String filePrefix)
protected Collection<AssignEdge> filterAssigns(VarNode v, ImmutableStack<Integer> callingContext, boolean forward, boolean refineVirtCalls)
protected AllocAndContextSet findContextsForAllocs(DemandCSPointsTo.VarAndContext varAndContext, PointsToSetInternal locs)
protected DemandCSPointsTo.CallingContextSet findUpContextsForVar(AllocAndContext allocAndContext, DemandCSPointsTo.VarContextAndUp varContextAndUp)
protected DemandCSPointsTo.CallingContextSet findVarContextsFromAlloc(AllocAndContext allocAndContext, VarNode targetVar)
protected Set<SootMethod> getCallTargets(PointsToSetInternal p2Set, NumberedString methodStr, Type receiverType, Set<SootMethod> possibleTargets)
protected Set<SootMethod> getCallTargetsForType(Type type, NumberedString methodStr, Type receiverType, Set<SootMethod> possibleTargets)
protected Set<VarNode> getFlowsToHelper(AllocAndContext allocAndContext)
protected int getMaxPasses()
protected void incrementNodesTraversed()
protected boolean isRecursive(ImmutableStack<Integer> context, AssignEdge assignEdge)
protected boolean isRecursiveCallSite(Integer callSite)
protected Set<VarNode> nodesPropagatedThrough(VarNode source, PointsToSetInternal allocs)
protected ImmutableStack<Integer> popRecursiveCallSites(ImmutableStack<Integer> context)
protected void processIncomingEdges(DemandCSPointsTo.IncomingEdgeHandler h, Stack<DemandCSPointsTo.VarAndContext> worklist)
protected ImmutableStack<Integer> pushWithRecursionCheck(ImmutableStack<Integer> context, AssignEdge assignEdge)
protected boolean refineAlias(VarNode v1, VarNode v2, PointsToSetInternal intersection, HeuristicType heuristic)
protected boolean refineAliasInternal(VarNode v1, VarNode v2, PointsToSetInternal intersection, HeuristicType heuristic)
protected Set<SootMethod> refineCallSite(Integer callSite, ImmutableStack<Integer> origContext)
protected boolean refineP2Set(DemandCSPointsTo.VarAndContext varAndContext, PointsToSetInternal badLocs)
protected boolean refineP2Set(VarNode v, PointsToSetInternal badLocs, HeuristicType heuristic)
protected boolean weirdCall(Integer callSite)
public PointsToSet reachingObjects(Context c, Local l)
reachingObjects
in interface PointsToAnalysis
UnsupportedOperationException
- alwayspublic PointsToSet reachingObjects(Context c, Local l, SootField f)
reachingObjects
in interface PointsToAnalysis
UnsupportedOperationException
- alwayspublic PointsToSet reachingObjects(Local l, SootField f)
reachingObjects
in interface PointsToAnalysis
UnsupportedOperationException
- alwayspublic PointsToSet reachingObjects(PointsToSet s, SootField f)
reachingObjects
in interface PointsToAnalysis
UnsupportedOperationException
- alwayspublic PointsToSet reachingObjects(SootField f)
reachingObjects
in interface PointsToAnalysis
UnsupportedOperationException
- alwayspublic PointsToSet reachingObjectsOfArrayElement(PointsToSet s)
reachingObjectsOfArrayElement
in interface PointsToAnalysis
UnsupportedOperationException
- alwayspublic PAG getPAG()
public boolean usesCache()
true
is caching is enabledpublic void enableCache()
public void disableCache()
public void clearCache()
public boolean isRefineCallGraph()
public void setRefineCallGraph(boolean refineCallGraph)
public HeuristicType getHeuristicType()
public void setHeuristicType(HeuristicType heuristicType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |