public class CallGraph
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
CallGraph.Caller |
class |
CallGraph.Node |
Constructor and Description |
---|
CallGraph(Program program)
Creates a call graph for the program.
|
Modifier and Type | Method and Description |
---|---|
boolean |
callsSelf(Procedure proc) |
java.util.HashMap |
getCallGraph()
Access the graph directly as a hash map.
|
CallGraph.Node |
getRoot()
Access the root node of the graph.
|
java.util.List<Procedure> |
getTopologicalCallList() |
boolean |
isLeaf(Procedure proc)
Determines if the procedure is a leaf of the call graph.
|
boolean |
isRecursive(Procedure proc) |
void |
print(java.io.OutputStream stream)
Prints the graph to a stream in
graphviz
format.
|
public CallGraph(Program program)
program
- The program for which to create the call graph.public boolean callsSelf(Procedure proc)
public java.util.HashMap getCallGraph()
public CallGraph.Node getRoot()
public boolean isLeaf(Procedure proc)
proc
- A Procedure appearing in the call graph.public boolean isRecursive(Procedure proc)
public void print(java.io.OutputStream stream)
stream
- The stream on which to print the graph.public java.util.List<Procedure> getTopologicalCallList()