Package pascal.taie.analysis.pta.core.cs
Class CSCallGraph
java.lang.Object
pascal.taie.analysis.graph.callgraph.AbstractCallGraph<CSCallSite,CSMethod>
pascal.taie.analysis.pta.core.cs.CSCallGraph
- All Implemented Interfaces:
Serializable
,Iterable<CSMethod>
,CallGraph<CSCallSite,
,CSMethod> StmtResult<Set<CSMethod>>
,Graph<CSMethod>
Represents context-sensitive 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
addEdge
(Edge<CSCallSite, CSMethod> edge) Adds a new call graph edge to this call graph.void
addEntryMethod
(CSMethod entryMethod) Adds an entry method to this call graph.boolean
addReachableMethod
(CSMethod csMethod) Adds a reachable method to this call graph.edges()
edgesOutOf
(CSCallSite csCallSite) getCalleesOf
(CSCallSite csCallSite) getCallersOf
(CSMethod callee) getCallSitesIn
(CSMethod csMethod) getContainerOf
(CSCallSite csCallSite) boolean
isRelevant
(Stmt stmt) Methods inherited from class pascal.taie.analysis.graph.callgraph.AbstractCallGraph
contains, entryMethods, getCalleesOfM, 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
-
CSCallGraph
-
-
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.
-
getCallersOf
- Specified by:
getCallersOf
in interfaceCallGraph<CSCallSite,
CSMethod> - Overrides:
getCallersOf
in classAbstractCallGraph<CSCallSite,
CSMethod> - Returns:
- the call sites that invoke the given method.
-
getCalleesOf
- Specified by:
getCalleesOf
in interfaceCallGraph<CSCallSite,
CSMethod> - Overrides:
getCalleesOf
in classAbstractCallGraph<CSCallSite,
CSMethod> - Returns:
- the methods that are called by the given call site.
-
getContainerOf
- Specified by:
getContainerOf
in interfaceCallGraph<CSCallSite,
CSMethod> - Overrides:
getContainerOf
in classAbstractCallGraph<CSCallSite,
CSMethod> - Returns:
- the method that contains the given call site.
-
getCallSitesIn
- Specified by:
getCallSitesIn
in interfaceCallGraph<CSCallSite,
CSMethod> - Overrides:
getCallSitesIn
in classAbstractCallGraph<CSCallSite,
CSMethod> - Returns:
- the call sites within the given method.
-
edgesOutOf
- Specified by:
edgesOutOf
in interfaceCallGraph<CSCallSite,
CSMethod> - Overrides:
edgesOutOf
in classAbstractCallGraph<CSCallSite,
CSMethod> - Returns:
- the call edges out of the given call site.
-
edgesInTo
- Specified by:
edgesInTo
in interfaceCallGraph<CSCallSite,
CSMethod> - Overrides:
edgesInTo
in classAbstractCallGraph<CSCallSite,
CSMethod> - Returns:
- the call edges targeting to the given method.
-
edges
- Specified by:
edges
in interfaceCallGraph<CSCallSite,
CSMethod> - Overrides:
edges
in classAbstractCallGraph<CSCallSite,
CSMethod> - Returns:
- all call edges in this call graph.
-
isRelevant
- Returns:
- if
stmt
is relevant in this result.
-
getResult
- Returns:
- analysis result of given stmt.
-