public class CallGraph extends Object
BoundProgram.
Nodes represent routines; edges represent calls between routines. Table accesses are tracked per node. All traversal algorithms use iterative BFS (no recursion) to avoid stack overflow on deep graphs.
| Modifier and Type | Method and Description |
|---|---|
static CallGraph |
buildFrom(BoundProgram program)
Builds a CallGraph from a BoundProgram.
|
List<String> |
getDirectCallees(String routineId)
Returns the direct callees of the given routine.
|
List<String> |
getDirectCallers(String routineId)
Returns the direct callers of the given routine.
|
List<CallEdge> |
getEdges() |
CallGraphNode |
getNode(String routineId) |
Map<String,CallGraphNode> |
getNodes() |
List<CallGraphNode> |
getNodesAccessingTable(String tableName,
ETableAccessKind filter)
Finds all nodes that access a given table.
|
Set<String> |
getTransitiveCallees(String routineId,
int maxDepth)
Returns all transitively reachable callees using iterative BFS.
|
Set<String> |
getTransitiveCallers(String routineId,
int maxDepth)
Returns all transitive callers using iterative BFS.
|
public static CallGraph buildFrom(BoundProgram program)
public Map<String,CallGraphNode> getNodes()
public CallGraphNode getNode(String routineId)
public List<String> getDirectCallees(String routineId)
public List<String> getDirectCallers(String routineId)
public Set<String> getTransitiveCallees(String routineId, int maxDepth)
public Set<String> getTransitiveCallers(String routineId, int maxDepth)
public List<CallGraphNode> getNodesAccessingTable(String tableName, ETableAccessKind filter)