|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap jwutil.collections.UnmodifiableMultiMap joeq.Compiler.Quad.CallGraph
public abstract class CallGraph
Abstract representation of a call graph.
Nested Class Summary | |
---|---|
class |
CallGraph.CallGraphCSNavigator
|
static class |
CallGraph.CallGraphMap
|
class |
CallGraph.CallGraphMethodNavigator
|
static class |
CallGraph.CallSiteMap
|
class |
CallGraph.CallTargetMap
|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class jwutil.collections.UnmodifiableMultiMap |
---|
DEFAULT_HISTOGRAM_SIZE |
Constructor Summary | |
---|---|
CallGraph()
|
Method Summary | |
---|---|
Map |
calculateCallerRelation()
Calculate a multimap between methods and their callers. |
jwutil.collections.InvertibleMultiMap |
calculateEdgeRelation()
Returns the call graph edge relation in the form of an invertible multi-map. |
Set |
calculateReachableMethods(Collection roots)
Returns the set of methods that are reachable from the given method root set. |
boolean |
contains(Object a,
Object b)
|
Set |
entrySet()
|
Collection[] |
findDepths()
|
Collection |
getAllCallSites()
Returns the collection of all call sites in the call graph. |
Collection |
getAllMethods()
Returns the collection of all methods in the call graph. |
Collection |
getCallees(ControlFlowGraph cfg)
Returns the set of methods that are called by the given CFG. |
Collection |
getCallees(jq_Method caller)
Returns the set of methods that are called by the given method. |
Collection |
getCallerMethods(jq_Method callee)
Returns the set of methods that can call the given method. |
Collection |
getCallers(jq_Method callee)
Returns the set of call sites that can call the given method. |
jwutil.collections.MultiMap |
getCallGraphMap()
|
jwutil.collections.MultiMap |
getCallSiteMap()
|
jwutil.graphs.Navigator |
getCallSiteNavigator()
|
Collection |
getCallSites(ControlFlowGraph cfg)
Returns the set of call sites in the given CFG. |
Collection |
getCallSites(jq_Method caller)
Returns the set of call sites in the given method. |
static Collection |
getCallSites0(ControlFlowGraph cfg)
|
static Collection |
getCallSites0(jq_Method caller)
|
static Collection |
getCallSites1(ControlFlowGraph cfg)
|
jwutil.graphs.Navigator |
getMethodNavigator()
|
jwutil.graphs.Navigator |
getNavigator()
|
abstract Collection |
getRoots()
Returns the collection of root methods for this call graph. |
jq_Method |
getTargetMethod(Object context,
ProgramLocation callSite)
Returns the target method of the given call site under the given context, assuming that it is a single target. |
abstract Collection |
getTargetMethods(Object context,
ProgramLocation callSite)
Returns the possible target methods of the given call site under the given context. |
Collection |
getTargetMethods(ProgramLocation callSite)
Returns the possible target methods of the given call site. |
Collection |
getValues(Object key)
|
static CallGraph |
makeCallGraph(Collection rootMethods,
Map callsToTargets)
|
int |
numberOfTargetMethods(Object context,
ProgramLocation callSite)
Returns the number of possible target methods of the given call site under the given context. |
int |
numberOfTargetMethods(ProgramLocation callSite)
Returns the number of possible target methods of the given call site. |
abstract void |
setRoots(Collection roots)
Sets up the root methods to be the given set. |
String |
toString()
Returns a string representation of this call graph. |
Methods inherited from class jwutil.collections.UnmodifiableMultiMap |
---|
add, addAll, addAll, clear, computeHistogram, computeHistogram, entrySetHelper, proxy, put, putAll, remove, remove, removeAll, retainAll |
Methods inherited from class java.util.AbstractMap |
---|
clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, size, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jwutil.collections.MultiMap |
---|
get, size |
Methods inherited from interface java.util.Map |
---|
containsKey, containsValue, equals, hashCode, isEmpty, keySet, values |
Constructor Detail |
---|
public CallGraph()
Method Detail |
---|
public abstract void setRoots(Collection roots)
roots
- collection of root methodspublic abstract Collection getRoots()
getRoots
in interface jwutil.graphs.Graph
public Collection getAllMethods()
public Collection getAllCallSites()
public abstract Collection getTargetMethods(Object context, ProgramLocation callSite)
context
- callSite
-
public Collection getTargetMethods(ProgramLocation callSite)
callSite
-
public int numberOfTargetMethods(Object context, ProgramLocation callSite)
context
- callSite
-
public int numberOfTargetMethods(ProgramLocation callSite)
callSite
-
public jq_Method getTargetMethod(Object context, ProgramLocation callSite)
context
- callSite
-
public Collection getCallSites(jq_Method caller)
caller
-
public static Collection getCallSites0(jq_Method caller)
public Collection getCallSites(ControlFlowGraph cfg)
cfg
-
public static Collection getCallSites0(ControlFlowGraph cfg)
public static Collection getCallSites1(ControlFlowGraph cfg)
public Collection getCallees(jq_Method caller)
caller
-
public Collection getCallees(ControlFlowGraph cfg)
cfg
-
public Collection getCallers(jq_Method callee)
callee
-
public Collection getCallerMethods(jq_Method callee)
callee
-
public Set calculateReachableMethods(Collection roots)
roots
-
public String toString()
toString
in class AbstractMap
public Map calculateCallerRelation()
public jwutil.collections.InvertibleMultiMap calculateEdgeRelation()
public Collection[] findDepths()
public jwutil.graphs.Navigator getNavigator()
getNavigator
in interface jwutil.graphs.Graph
public jwutil.graphs.Navigator getMethodNavigator()
public jwutil.graphs.Navigator getCallSiteNavigator()
public jwutil.collections.MultiMap getCallSiteMap()
public jwutil.collections.MultiMap getCallGraphMap()
public Set entrySet()
entrySet
in interface Map
entrySet
in interface jwutil.collections.MultiMap
entrySet
in class jwutil.collections.UnmodifiableMultiMap
public boolean contains(Object a, Object b)
contains
in interface jwutil.collections.BinaryRelation
contains
in interface jwutil.collections.MultiMap
public Collection getValues(Object key)
getValues
in interface jwutil.collections.MultiMap
public static CallGraph makeCallGraph(Collection rootMethods, Map callsToTargets)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |