Package soot.jimple.toolkits.ide.icfg
Class JimpleBasedInterproceduralCFG
- java.lang.Object
-
- soot.jimple.toolkits.ide.icfg.AbstractJimpleBasedICFG
-
- soot.jimple.toolkits.ide.icfg.JimpleBasedInterproceduralCFG
-
- All Implemented Interfaces:
heros.InterproceduralCFG<Unit,SootMethod>,BiDiInterproceduralCFG<Unit,SootMethod>
public class JimpleBasedInterproceduralCFG extends AbstractJimpleBasedICFG
Default implementation for theInterproceduralCFGinterface. Includes all statements reachable fromScene.getEntryPoints()through explicit call statements or through calls toThread.start(). This class is designed to be thread safe, and subclasses of this class must be designed in a thread-safe way, too.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classJimpleBasedInterproceduralCFG.EdgeFilter
-
Field Summary
Fields Modifier and Type Field Description protected CallGraphcgprotected booleanfallbackToImmediateCalleesprotected booleanincludePhantomCalleesprotected booleanincludeReflectiveCallsprotected com.google.common.cache.CacheLoader<SootMethod,Collection<Unit>>loaderMethodToCallersprotected com.google.common.cache.CacheLoader<Unit,Collection<SootMethod>>loaderUnitToCalleesprotected static org.slf4j.Loggerloggerprotected com.google.common.cache.LoadingCache<SootMethod,Collection<Unit>>methodToCallersprotected com.google.common.cache.LoadingCache<Unit,Collection<SootMethod>>unitToCallees-
Fields inherited from class soot.jimple.toolkits.ide.icfg.AbstractJimpleBasedICFG
bodyToUnitGraph, enableExceptions, methodToCallsFromWithin, methodToParameterRefs
-
-
Constructor Summary
Constructors Constructor Description JimpleBasedInterproceduralCFG()JimpleBasedInterproceduralCFG(boolean enableExceptions)JimpleBasedInterproceduralCFG(boolean enableExceptions, boolean includeReflectiveCalls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JimpleBasedInterproceduralCFG.EdgeFiltercreateEdgeFilter()Collection<SootMethod>getCalleesOfCallAt(Unit u)Collection<Unit>getCallersOf(SootMethod m)protected voidinitializeUnitToOwner()voidsetFallbackToImmediateCallees(boolean fallbackToImmediateCallees)Sets whether methods that operate on the callgraph shall return the immediate callee of a call site if the callgraph has no outgoing edgesvoidsetIncludePhantomCallees(boolean includePhantomCallees)Sets whether methods that operate on the callgraph shall also return phantom methods as potential callees-
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
-
logger
protected static final org.slf4j.Logger logger
-
includeReflectiveCalls
protected boolean includeReflectiveCalls
-
includePhantomCallees
protected boolean includePhantomCallees
-
fallbackToImmediateCallees
protected boolean fallbackToImmediateCallees
-
cg
protected final CallGraph cg
-
loaderUnitToCallees
protected com.google.common.cache.CacheLoader<Unit,Collection<SootMethod>> loaderUnitToCallees
-
unitToCallees
protected final com.google.common.cache.LoadingCache<Unit,Collection<SootMethod>> unitToCallees
-
loaderMethodToCallers
protected com.google.common.cache.CacheLoader<SootMethod,Collection<Unit>> loaderMethodToCallers
-
methodToCallers
protected final com.google.common.cache.LoadingCache<SootMethod,Collection<Unit>> methodToCallers
-
-
Constructor Detail
-
JimpleBasedInterproceduralCFG
public JimpleBasedInterproceduralCFG()
-
JimpleBasedInterproceduralCFG
public JimpleBasedInterproceduralCFG(boolean enableExceptions)
-
JimpleBasedInterproceduralCFG
public JimpleBasedInterproceduralCFG(boolean enableExceptions, boolean includeReflectiveCalls)
-
-
Method Detail
-
initializeUnitToOwner
protected void initializeUnitToOwner()
-
getCalleesOfCallAt
public Collection<SootMethod> getCalleesOfCallAt(Unit u)
-
getCallersOf
public Collection<Unit> getCallersOf(SootMethod m)
-
setIncludePhantomCallees
public void setIncludePhantomCallees(boolean includePhantomCallees)
Sets whether methods that operate on the callgraph shall also return phantom methods as potential callees- Parameters:
includePhantomCallees- True if phantom methods shall be returned as potential callees, otherwise false
-
setFallbackToImmediateCallees
public void setFallbackToImmediateCallees(boolean fallbackToImmediateCallees)
Sets whether methods that operate on the callgraph shall return the immediate callee of a call site if the callgraph has no outgoing edges- Parameters:
fallbackToImmediateCallees- True to return the immediate callee if the callgraph does not contain any edges for the respective call site, false to return an empty set in such cases
-
createEdgeFilter
protected JimpleBasedInterproceduralCFG.EdgeFilter createEdgeFilter()
-
-