Class DefaultCallGraph
java.lang.Object
pascal.taie.analysis.graph.callgraph.AbstractCallGraph<Invoke,JMethod>
pascal.taie.analysis.graph.callgraph.DefaultCallGraph
- All Implemented Interfaces:
Serializable
,Iterable<JMethod>
,CallGraph<Invoke,
,JMethod> StmtResult<Set<JMethod>>
,Graph<JMethod>
Default implementation of call graph.
- See Also:
-
Field Summary
Fields inherited from class pascal.taie.analysis.graph.callgraph.AbstractCallGraph
calleeToEdges, callSitesIn, callSiteToContainer, callSiteToEdges, entryMethods, reachableMethods
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds a new call graph edge to this call graph.void
addEntryMethod
(JMethod entryMethod) Adds an entry method to this call graph.boolean
addReachableMethod
(JMethod method) Adds a reachable method to this call graph.getContainerOf
(Invoke invoke) boolean
isRelevant
(Stmt stmt) Methods inherited from class pascal.taie.analysis.graph.callgraph.AbstractCallGraph
contains, edges, edgesInTo, edgesOutOf, entryMethods, getCalleesOf, getCalleesOfM, getCallersOf, getCallSitesIn, getInEdgesOf, getNodes, getNumberOfEdges, getNumberOfMethods, getOutEdgesOf, getPredsOf, getSuccsOf, reachableMethods
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface pascal.taie.analysis.graph.callgraph.CallGraph
callSitesIn
Methods inherited from interface pascal.taie.util.graph.Graph
getInDegreeOf, getNumberOfNodes, getOutDegreeOf, hasEdge, hasEdge, hasNode, iterator
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DefaultCallGraph
public DefaultCallGraph()
-
-
Method Details
-
addEntryMethod
Adds an entry method to this call graph. -
addReachableMethod
Adds a reachable method to this call graph.- Returns:
- true if this call graph changed as a result of the call, otherwise false.
-
addEdge
Adds a new call graph edge to this call graph.- Parameters:
edge
- the call edge to be added- Returns:
- true if the call graph changed as a result of the call, otherwise false.
-
getContainerOf
- Specified by:
getContainerOf
in interfaceCallGraph<Invoke,
JMethod> - Overrides:
getContainerOf
in classAbstractCallGraph<Invoke,
JMethod> - Returns:
- the method that contains the given call site.
-
isRelevant
- Returns:
- if
stmt
is relevant in this result.
-
getResult
- Returns:
- analysis result of given stmt.
-