Package soot.jimple.toolkits.callgraph
Class OnFlyCallGraphBuilder
- java.lang.Object
-
- soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder
-
public class OnFlyCallGraphBuilder extends Object
Models the call graph.- Author:
- Ondrej Lhotak
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classOnFlyCallGraphBuilder.DefaultReflectionModelclassOnFlyCallGraphBuilder.TraceBasedReflectionModelclassOnFlyCallGraphBuilder.TypeBasedReflectionModel
-
Field Summary
-
Constructor Summary
Constructors Constructor Description OnFlyCallGraphBuilder(ContextManager cm, ReachableMethods rm)OnFlyCallGraphBuilder(ContextManager cm, ReachableMethods rm, boolean appOnly)
-
Method Summary
-
-
-
Field Detail
-
sigFinalize
protected final NumberedString sigFinalize
-
sigInit
protected final NumberedString sigInit
-
sigForName
protected final NumberedString sigForName
-
clRunnable
protected final RefType clRunnable
-
clAsyncTask
protected final RefType clAsyncTask
-
clHandler
protected final RefType clHandler
-
receiverToSites
protected final Map<Local,List<VirtualCallSite>> receiverToSites
-
methodToReceivers
protected final Map<SootMethod,List<Local>> methodToReceivers
-
methodToInvokeBases
protected final Map<SootMethod,List<Local>> methodToInvokeBases
-
methodToInvokeArgs
protected final Map<SootMethod,List<Local>> methodToInvokeArgs
-
methodToStringConstants
protected final Map<SootMethod,List<Local>> methodToStringConstants
-
stringConstToSites
protected final Map<Local,List<VirtualCallSite>> stringConstToSites
-
analyzedMethods
protected final HashSet<SootMethod> analyzedMethods
-
baseToInvokeSite
protected final MultiMap<Local,InvokeCallSite> baseToInvokeSite
-
invokeArgsToInvokeSite
protected final MultiMap<Local,InvokeCallSite> invokeArgsToInvokeSite
-
allocDotFieldToLocal
protected final MultiMap<AllocDotField,Local> allocDotFieldToLocal
-
targetsQueue
protected final ChunkedQueue<SootMethod> targetsQueue
-
targets
protected final QueueReader<SootMethod> targets
-
reflectionModel
protected final ReflectionModel reflectionModel
-
options
protected final CGOptions options
-
appOnly
protected boolean appOnly
-
rm
protected final ReachableMethods rm
context-sensitive stuff
-
worklist
protected final QueueReader<MethodOrMethodContext> worklist
-
cm
protected final ContextManager cm
-
virtualEdgeSummaries
protected final VirtualEdgesSummaries virtualEdgeSummaries
-
nullnessCache
protected NullnessAnalysis nullnessCache
-
arrayCache
protected ConstantArrayAnalysis arrayCache
-
analysisKey
protected SootMethod analysisKey
-
-
Constructor Detail
-
OnFlyCallGraphBuilder
public OnFlyCallGraphBuilder(ContextManager cm, ReachableMethods rm, boolean appOnly)
-
OnFlyCallGraphBuilder
public OnFlyCallGraphBuilder(ContextManager cm, ReachableMethods rm)
-
-
Method Detail
-
initializeEdgeSummaries
protected VirtualEdgesSummaries initializeEdgeSummaries()
Initializes the edge summaries that model callbacks in library classes. Custom implementations may override this method to supply a specialized summary provider.- Returns:
- A provider object for virtual edge summaries
-
getContextManager
public ContextManager getContextManager()
-
methodToReceivers
public Map<SootMethod,List<Local>> methodToReceivers()
-
methodToInvokeArgs
public Map<SootMethod,List<Local>> methodToInvokeArgs()
-
methodToInvokeBases
public Map<SootMethod,List<Local>> methodToInvokeBases()
-
methodToStringConstants
public Map<SootMethod,List<Local>> methodToStringConstants()
-
processReachables
public void processReachables()
-
wantTypes
public boolean wantTypes(Local receiver)
-
addPossibleArgArraySize
public void addPossibleArgArraySize(Local argArray, int value, Context context)
-
skipSite
protected boolean skipSite(VirtualCallSite site, FastHierarchy fh, Type type)
-
wantStringConstants
public boolean wantStringConstants(Local stringConst)
-
wantArrayField
public boolean wantArrayField(AllocDotField df)
-
addInvokeArgType
public void addInvokeArgType(AllocDotField df, Context context, Type type)
-
wantInvokeArg
public boolean wantInvokeArg(Local receiver)
-
addInvokeArgDotField
public void addInvokeArgDotField(Local receiver, AllocDotField dot)
-
processNewMethod
protected void processNewMethod(SootMethod m)
-
findReceivers
protected void findReceivers(SootMethod m, Body b)
-
processVirtualEdgeSummary
protected void processVirtualEdgeSummary(SootMethod m, Stmt s, Local receiver, VirtualEdgesSummaries.InvocationVirtualEdgeTarget target, Kind edgeType)
-
getReceiversOfVirtualEdge
public Set<Local> getReceiversOfVirtualEdge(VirtualEdgesSummaries.InvocationVirtualEdgeTarget edgeTarget, InvokeExpr invokeExpr)
Returns all values that should be mapped to this in the edge target.
-
processVirtualEdgeSummary
protected void processVirtualEdgeSummary(SootMethod callSiteMethod, Stmt callSite, Stmt curStmt, Local receiver, VirtualEdgesSummaries.InvocationVirtualEdgeTarget target, Kind edgeType)
-
processNewMethodContext
protected void processNewMethodContext(MethodOrMethodContext momc)
-
getVirtualEdgeSummaries
public VirtualEdgesSummaries getVirtualEdgeSummaries()
-
-