|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--envgen.analysis.stat.InvokeGraph
|
+--envgen.analysis.stat.EnvCallGraph
Mappings from callsites to their possible targets, from targets to their callsites.
| Field Summary | |
(package private) edu.ksu.cis.indus.interfaces.ICallGraphInfo |
callGraphInfo
|
(package private) int |
debug
|
(package private) soot.Hierarchy |
hierarchy
Class Hierarchy needed for virtual method call resolution. |
(package private) int |
numMethods
|
(package private) int |
numTargets
|
(package private) boolean |
ofaAnalysis
|
(package private) boolean |
packageAnalysis
|
(package private) java.lang.String |
packageName
|
(package private) soot.SootMethod |
root
Root of the call graph, an artificial dummy node needed for a common start. |
(package private) java.util.HashMap |
unitTable
|
| Fields inherited from class envgen.analysis.stat.InvokeGraph |
methodToContainedSites, siteToDeclaringMethod, siteToTargetMethods, targetToCallingSites |
| Constructor Summary | |
EnvCallGraph(java.util.HashMap unitTable)
|
|
| Method Summary | |
private void |
addTargetToSite(soot.jimple.Stmt s,
soot.SootMethod target,
soot.SootMethod sm)
Checks if the target needs to be processed, adds it
site, and calls recursiveBuildCallGraph
for target. |
void |
buildCallGraph()
|
void |
buildCHACallGraph()
Builds a call graph starting with a dummy root at the top, unit methods at the second level down, methods that get called inside the unit methods at the 3d level down. |
edu.ksu.cis.indus.interfaces.ICallGraphInfo |
getCallGraph(java.util.Collection rootMethods)
Builds an OFA analysis-based call graph. |
java.util.List |
getEntryMethods(java.util.List methods)
|
java.util.List |
getEnvInterfaceMethods()
|
void |
getStatistics()
|
java.util.List |
getTargetsOf(soot.SootMethod sm)
Returns the list of targets of SootMethod |
java.util.Collection |
getTargetsOf(soot.jimple.Stmt site,
soot.jimple.InvokeExpr expr,
soot.Type receiverType,
soot.SootMethod sm)
This method is called from EnvInterface to discover the environment methods |
java.util.Collection |
getTargetsOf(soot.jimple.Stmt site,
soot.SootMethod sm)
|
java.util.List |
getTargetsOfRoot()
|
java.util.List |
getUnitMethods()
|
boolean |
isLibraryMethod(soot.SootMethod target)
Checks whether target belongs to a library class. |
boolean |
isSubType(soot.SootClass unitClass,
soot.SootClass paramTypeClass)
Finds whether unitClass class is a subtype of
paramTypeClass class. |
boolean |
isUnitSuperType(soot.SootClass paramTypeClass)
Checks whether paramTypeClass is a supertype of any of the unit classes. |
void |
printGraph()
Prints the graph in terms of methods and call sites they contain. |
boolean |
processTarget(soot.SootMethod target)
Quick package test: if the environment includes only lib classes, the unit doesn't include any lib classes, and none of the unit classes inherit from the env classes (except for Object), then the env method can't see any of the fields of the unit classes. |
boolean |
processTargetPackage(soot.SootMethod target)
|
private void |
recursiveBuildCallGraph(soot.SootMethod sm)
Recursive function that gets called from buildCallGraph to update the callGraph |
private void |
recursivePrintGraph(soot.SootMethod sm,
java.util.HashSet visited)
Recursive method that is used to walk the graph tree. |
boolean |
unitIncludesLibClasses()
Checks whether there is a library class in the unit. |
| Methods inherited from class envgen.analysis.stat.InvokeGraph |
addSite, addTarget, containsSite, copyTargets, getCallingSitesOf, getDeclaringMethod, getSitesOf, getTargetsOf, getTransitiveTargetsOf, removeAllTargets, removeSite, removeTarget |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.util.HashMap unitTable
soot.SootMethod root
soot.Hierarchy hierarchy
boolean packageAnalysis
java.lang.String packageName
int numTargets
int numMethods
boolean ofaAnalysis
edu.ksu.cis.indus.interfaces.ICallGraphInfo callGraphInfo
int debug
| Constructor Detail |
public EnvCallGraph(java.util.HashMap unitTable)
| Method Detail |
public void buildCallGraph()
public edu.ksu.cis.indus.interfaces.ICallGraphInfo getCallGraph(java.util.Collection rootMethods)
rootMethods -
public void buildCHACallGraph()
private void recursiveBuildCallGraph(soot.SootMethod sm)
public java.util.List getTargetsOf(soot.SootMethod sm)
InvokeGraph
getTargetsOf in class InvokeGraph
public java.util.Collection getTargetsOf(soot.jimple.Stmt site,
soot.SootMethod sm)
site -
public java.util.Collection getTargetsOf(soot.jimple.Stmt site,
soot.jimple.InvokeExpr expr,
soot.Type receiverType,
soot.SootMethod sm)
site - expr - receiverType - sm -
private void addTargetToSite(soot.jimple.Stmt s,
soot.SootMethod target,
soot.SootMethod sm)
target needs to be processed, adds it
site, and calls recursiveBuildCallGraph
for target.
public boolean processTarget(soot.SootMethod target)
public boolean isLibraryMethod(soot.SootMethod target)
target belongs to a library class.
public boolean unitIncludesLibClasses()
public boolean processTargetPackage(soot.SootMethod target)
public boolean isUnitSuperType(soot.SootClass paramTypeClass)
public boolean isSubType(soot.SootClass unitClass,
soot.SootClass paramTypeClass)
unitClass class is a subtype of
paramTypeClass class. Used to check whether a unitClass
type can flow into a method through paramTypeClass, or whether a
unitClass inherits from a class in the env, in which case we need to keep
track of side-effects to the fields of paramTypeClass.
public void printGraph()
private void recursivePrintGraph(soot.SootMethod sm,
java.util.HashSet visited)
public java.util.List getTargetsOfRoot()
public java.util.List getEntryMethods(java.util.List methods)
public java.util.List getEnvInterfaceMethods()
public java.util.List getUnitMethods()
public void getStatistics()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||