Class CHACallGraph
java.lang.Object
com.ibm.wala.util.graph.AbstractGraph<CGNode>
com.ibm.wala.util.graph.AbstractNumberedGraph<CGNode>
com.ibm.wala.ipa.callgraph.impl.BasicCallGraph<CHAContextInterpreter>
com.ibm.wala.ipa.callgraph.cha.CHACallGraph
- All Implemented Interfaces:
CallGraph
,EdgeManager<CGNode>
,Graph<CGNode>
,NodeManager<CGNode>
,NumberedEdgeManager<CGNode>
,NumberedGraph<CGNode>
,NumberedNodeManager<CGNode>
,Iterable<CGNode>
Call graph in which call targets are determined entirely based on an
IClassHierarchy
.-
Nested Class Summary
Nested classes/interfaces inherited from class com.ibm.wala.ipa.callgraph.impl.BasicCallGraph
BasicCallGraph.Key, BasicCallGraph.NodeImpl
-
Field Summary
Fields inherited from class com.ibm.wala.ipa.callgraph.impl.BasicCallGraph
mr2Nodes
-
Constructor Summary
ConstructorDescriptionNOTE: after calling this contructor,init(Iterable)
must be invoked to complete initializationCHACallGraph
(IClassHierarchy cha, boolean applicationOnly) NOTE: after calling this contructor,init(Iterable)
must be invoked to complete initialization -
Method Summary
Modifier and TypeMethodDescriptionfindOrCreateNode
(IMethod method, Context C) Use with extreme care.protected NumberedEdgeManager
<CGNode> int
getNumberOfTargets
(CGNode node, CallSiteReference site) getPossibleSites
(CGNode src, CGNode target) getPossibleTargets
(CGNode node, CallSiteReference site) Return the set of CGNodes that represent possible targets of a particular call site from a particular nodevoid
init
(Iterable<Entrypoint> entrypoints) Builds the call graph data structures.protected CGNode
protected CGNode
Methods inherited from class com.ibm.wala.ipa.callgraph.impl.BasicCallGraph
containsNode, getEntrypointNodes, getFakeRootNode, getFakeWorldClinitNode, getInterpreter, getNode, getNode, getNodeManager, getNodes, getNumberOfNodes, init, iterator, nodeToString, registerEntrypoint, registerNode, removeNodeAndEdges, setInterpreter, summarizeByPackage, toString
Methods inherited from class com.ibm.wala.util.graph.AbstractNumberedGraph
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodes
Methods inherited from class com.ibm.wala.util.graph.AbstractGraph
addEdge, addNode, edgeString, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeOutgoingEdges, stream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.ibm.wala.util.graph.EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.ibm.wala.util.graph.NodeManager
addNode, removeNode, stream
Methods inherited from interface com.ibm.wala.util.graph.NumberedEdgeManager
getPredNodeNumbers, getSuccNodeNumbers
Methods inherited from interface com.ibm.wala.util.graph.NumberedNodeManager
getMaxNumber, getNode, getNumber, iterateNodes
-
Constructor Details
-
CHACallGraph
NOTE: after calling this contructor,init(Iterable)
must be invoked to complete initialization -
CHACallGraph
NOTE: after calling this contructor,init(Iterable)
must be invoked to complete initialization
-
-
Method Details
-
init
Builds the call graph data structures. The call graph will only include methods reachable from the provided entrypoints.- Throws:
CancelException
-
getClassHierarchy
- Returns:
- the governing class hierarchy for this call graph
-
getPossibleTargets
Description copied from interface:CallGraph
Return the set of CGNodes that represent possible targets of a particular call site from a particular node -
getNumberOfTargets
- Returns:
- the number of nodes that the call site may dispatch to
-
getPossibleSites
- Returns:
- iterator of CallSiteReference, the call sites in a node that might dispatch to the target node.
-
makeFakeRootNode
- Specified by:
makeFakeRootNode
in classBasicCallGraph<CHAContextInterpreter>
- Throws:
CancelException
-
makeFakeWorldClinitNode
- Specified by:
makeFakeWorldClinitNode
in classBasicCallGraph<CHAContextInterpreter>
- Throws:
CancelException
-
findOrCreateNode
Description copied from class:BasicCallGraph
Use with extreme care.- Specified by:
findOrCreateNode
in classBasicCallGraph<CHAContextInterpreter>
- Throws:
CancelException
- TODO
-
getEdgeManager
- Specified by:
getEdgeManager
in classAbstractNumberedGraph<CGNode>
- Returns:
- the object which manages edges in the graph
-