public class CallGraph<BlockStateType extends IBlockState<BlockStateType,?,CallEdgeType>,CallContextType extends ICallContext<?>,CallEdgeType extends ICallEdge<BlockStateType>> extends Object
| Constructor and Description |
|---|
CallGraph()
Constructs a new initially empty call graph.
|
| Modifier and Type | Method and Description |
|---|---|
BlockStateType |
addTarget(AbstractNode caller,
CallContextType caller_context,
BasicBlock callee,
CallContextType callee_context,
CallEdgeType edge,
SolverSynchronizer sync)
Adds an edge from the given call node to the given function.
|
int |
getBlockContextOrder(BasicBlock b,
CallContextType context)
Returns the occurrence order of the given (basic block,context).
|
CallEdgeType |
getCallEdge(AbstractNode caller,
CallContextType caller_context,
BasicBlock callee,
CallContextType callee_context)
Returns the specified call edge info.
|
String |
getCallGraphStatistics(FlowGraph fg)
Return call graph statistics on the number of invocations in human readable form.
|
Set<NodeAndContext<CallContextType>> |
getSources(BasicBlock b,
CallContextType callee_context)
Returns the call nodes and caller contexts that have the given basic block as target for a given callee context.
|
void |
registerBlockContext(BasicBlock b,
CallContextType context)
Assigns an order to the given (basic block,context).
|
void |
toDot(PrintWriter out)
Produces a Graphviz dot representation of this call graph.
|
void |
toDot(PrintWriter out,
boolean show_source_locations)
Produces a Graphviz dot representation of this call graph.
|
String |
toString()
Returns a textual description of this call graph.
|
void |
visitAllEdges(ICallEdge.Visitor<CallEdgeType> visitor)
Visits all edges by the given visitor.
|
public BlockStateType addTarget(AbstractNode caller, CallContextType caller_context, BasicBlock callee, CallContextType callee_context, CallEdgeType edge, SolverSynchronizer sync)
public int getBlockContextOrder(BasicBlock b, CallContextType context)
public CallEdgeType getCallEdge(AbstractNode caller, CallContextType caller_context, BasicBlock callee, CallContextType callee_context)
public String getCallGraphStatistics(FlowGraph fg)
public Set<NodeAndContext<CallContextType>> getSources(BasicBlock b, CallContextType callee_context)
public void registerBlockContext(BasicBlock b, CallContextType context)
public void toDot(PrintWriter out)
public void toDot(PrintWriter out, boolean show_source_locations)
show_source_locations - if true, each function will be annotated with its source locationpublic String toString()
public void visitAllEdges(ICallEdge.Visitor<CallEdgeType> visitor)
Copyright © 2012 Aarhus University