Package soot.jimple.toolkits.ide.icfg
Class OnTheFlyJimpleBasedICFG
- java.lang.Object
-
- soot.jimple.toolkits.ide.icfg.AbstractJimpleBasedICFG
-
- soot.jimple.toolkits.ide.icfg.OnTheFlyJimpleBasedICFG
-
- All Implemented Interfaces:
heros.InterproceduralCFG<Unit,SootMethod>,BiDiInterproceduralCFG<Unit,SootMethod>
public class OnTheFlyJimpleBasedICFG extends AbstractJimpleBasedICFG
This is an implementation of AbstractJimpleBasedICFG that computes the ICFG on-the-fly. In other words, it can be used without pre-computing a call graph. Instead this implementation resolves calls through Class Hierarchy Analysis (CHA), as implemented through FastHierarchy. The CHA is supported by LocalMustNotAliasAnalysis, which is used to determine cases where the concrete type of an object at an InvokeVirtual or InvokeInterface callsite is known. In these cases the call can be resolved concretely, i.e., to a single target. To be sound, for InvokeInterface calls that cannot be resolved concretely, OnTheFlyJimpleBasedICFG requires that all classes on the classpath be loaded at least to signatures. This must be done before the FastHierarchy is computed such that the hierarchy is intact. Clients should callloadAllClassesOnClassPathToSignatures()to load all required classes to this level.
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.cache.LoadingCache<Body,LocalMustNotAliasAnalysis>bodyToLMNAAprotected Map<SootMethod,Set<Unit>>methodToCallersprotected com.google.common.cache.LoadingCache<Unit,Set<SootMethod>>unitToCallees-
Fields inherited from class soot.jimple.toolkits.ide.icfg.AbstractJimpleBasedICFG
bodyToUnitGraph, enableExceptions, methodToCallsFromWithin, methodToParameterRefs
-
-
Constructor Summary
Constructors Constructor Description OnTheFlyJimpleBasedICFG(Collection<SootMethod> entryPoints)OnTheFlyJimpleBasedICFG(SootMethod... entryPoints)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<SootMethod>getCalleesOfCallAt(Unit u)Set<Unit>getCallersOf(SootMethod m)protected BodyinitForMethod(SootMethod m)static voidloadAllClassesOnClassPathToSignatures()static voidmain(String[] args)-
Methods inherited from class soot.jimple.toolkits.ide.icfg.AbstractJimpleBasedICFG
allNonCallEndNodes, allNonCallStartNodes, createUnitToOwnerMap, getBodyOf, getCallsFromWithin, getCallsFromWithinMethod, getEndPointsOf, getMethodOf, getOrCreateUnitGraph, getOrCreateUnitGraph, getParameterRefs, getPredsOf, getPredsOfCallAt, getReturnSitesOfCallAt, getStartPointsOf, getSuccsOf, initializeUnitToOwner, initializeUnitToOwner, isBranchTarget, isCallStmt, isExitStmt, isFallThroughSuccessor, isReachable, isReturnSite, isStartPoint, makeGraph, setOwnerStatement
-
-
-
-
Field Detail
-
bodyToLMNAA
protected final com.google.common.cache.LoadingCache<Body,LocalMustNotAliasAnalysis> bodyToLMNAA
-
unitToCallees
protected final com.google.common.cache.LoadingCache<Unit,Set<SootMethod>> unitToCallees
-
methodToCallers
protected Map<SootMethod,Set<Unit>> methodToCallers
-
-
Constructor Detail
-
OnTheFlyJimpleBasedICFG
public OnTheFlyJimpleBasedICFG(SootMethod... entryPoints)
-
OnTheFlyJimpleBasedICFG
public OnTheFlyJimpleBasedICFG(Collection<SootMethod> entryPoints)
-
-
Method Detail
-
initForMethod
protected Body initForMethod(SootMethod m)
-
getCalleesOfCallAt
public Set<SootMethod> getCalleesOfCallAt(Unit u)
-
getCallersOf
public Set<Unit> getCallersOf(SootMethod m)
-
loadAllClassesOnClassPathToSignatures
public static void loadAllClassesOnClassPathToSignatures()
-
main
public static void main(String[] args)
-
-