|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.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 class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Field Summary |
|---|
| Fields inherited from class jwutil.collections.UnmodifiableMultiMap |
|---|
DEFAULT_HISTOGRAM_SIZE |
| Constructor Summary | |
|---|---|
CallGraph()
|
|
| Method Summary | |
|---|---|
java.util.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. |
java.util.Set |
calculateReachableMethods(java.util.Collection roots)
Returns the set of methods that are reachable from the given method root set. |
boolean |
contains(java.lang.Object a,
java.lang.Object b)
|
java.util.Set |
entrySet()
|
java.util.Collection[] |
findDepths()
|
java.util.Collection |
getAllCallSites()
Returns the collection of all call sites in the call graph. |
java.util.Collection |
getAllMethods()
Returns the collection of all methods in the call graph. |
java.util.Collection |
getCallees(ControlFlowGraph cfg)
Returns the set of methods that are called by the given CFG. |
java.util.Collection |
getCallees(jq_Method caller)
Returns the set of methods that are called by the given method. |
java.util.Collection |
getCallerMethods(jq_Method callee)
Returns the set of methods that can call the given method. |
java.util.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()
|
java.util.Collection |
getCallSites(ControlFlowGraph cfg)
Returns the set of call sites in the given CFG. |
java.util.Collection |
getCallSites(jq_Method caller)
Returns the set of call sites in the given method. |
static java.util.Collection |
getCallSites0(ControlFlowGraph cfg)
|
static java.util.Collection |
getCallSites0(jq_Method caller)
|
static java.util.Collection |
getCallSites1(ControlFlowGraph cfg)
|
jwutil.graphs.Navigator |
getMethodNavigator()
|
jwutil.graphs.Navigator |
getNavigator()
|
abstract java.util.Collection |
getRoots()
Returns the collection of root methods for this call graph. |
jq_Method |
getTargetMethod(java.lang.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 java.util.Collection |
getTargetMethods(java.lang.Object context,
ProgramLocation callSite)
Returns the possible target methods of the given call site under the given context. |
java.util.Collection |
getTargetMethods(ProgramLocation callSite)
Returns the possible target methods of the given call site. |
java.util.Collection |
getValues(java.lang.Object key)
|
static CallGraph |
makeCallGraph(java.util.Collection rootMethods,
java.util.Map callsToTargets)
|
int |
numberOfTargetMethods(java.lang.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(java.util.Collection roots)
Sets up the root methods to be the given set. |
java.lang.String |
toString()
Returns a string representation of this call graph. |
| Methods inherited from class jwutil.collections.UnmodifiableMultiMap |
|---|
add, addAll, addAll, clear, computeHistogram, computeHistogram, proxy, put, putAll, remove, remove, removeAll, retainAll |
| Methods inherited from class java.util.AbstractMap |
|---|
containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, size, values |
| Methods inherited from class java.lang.Object |
|---|
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(java.util.Collection roots)
roots - collection of root methodspublic abstract java.util.Collection getRoots()
getRoots in interface jwutil.graphs.Graphpublic java.util.Collection getAllMethods()
public java.util.Collection getAllCallSites()
public abstract java.util.Collection getTargetMethods(java.lang.Object context,
ProgramLocation callSite)
context - callSite -
public java.util.Collection getTargetMethods(ProgramLocation callSite)
callSite -
public int numberOfTargetMethods(java.lang.Object context,
ProgramLocation callSite)
context - callSite -
public int numberOfTargetMethods(ProgramLocation callSite)
callSite -
public jq_Method getTargetMethod(java.lang.Object context,
ProgramLocation callSite)
context - callSite -
public java.util.Collection getCallSites(jq_Method caller)
caller -
public static java.util.Collection getCallSites0(jq_Method caller)
public java.util.Collection getCallSites(ControlFlowGraph cfg)
cfg -
public static java.util.Collection getCallSites0(ControlFlowGraph cfg)
public static java.util.Collection getCallSites1(ControlFlowGraph cfg)
public java.util.Collection getCallees(jq_Method caller)
caller -
public java.util.Collection getCallees(ControlFlowGraph cfg)
cfg -
public java.util.Collection getCallers(jq_Method callee)
callee -
public java.util.Collection getCallerMethods(jq_Method callee)
callee -
public java.util.Set calculateReachableMethods(java.util.Collection roots)
roots -
public java.lang.String toString()
toString in class java.util.AbstractMappublic java.util.Map calculateCallerRelation()
public jwutil.collections.InvertibleMultiMap calculateEdgeRelation()
public java.util.Collection[] findDepths()
public jwutil.graphs.Navigator getNavigator()
getNavigator in interface jwutil.graphs.Graphpublic jwutil.graphs.Navigator getMethodNavigator()
public jwutil.graphs.Navigator getCallSiteNavigator()
public jwutil.collections.MultiMap getCallSiteMap()
public jwutil.collections.MultiMap getCallGraphMap()
public java.util.Set entrySet()
entrySet in interface java.util.MapentrySet in interface jwutil.collections.MultiMapentrySet in class jwutil.collections.UnmodifiableMultiMap
public boolean contains(java.lang.Object a,
java.lang.Object b)
contains in interface jwutil.collections.BinaryRelationcontains in interface jwutil.collections.MultiMappublic java.util.Collection getValues(java.lang.Object key)
getValues in interface jwutil.collections.MultiMap
public static CallGraph makeCallGraph(java.util.Collection rootMethods,
java.util.Map callsToTargets)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||