Package boomerang.callgraph
Interface ObservableICFG<N,M>
-
- Type Parameters:
N- Nodes in the CFG, typicallyUnitorBlockM- Method representation
- All Known Implementing Classes:
BackwardsObservableICFG,ObservableDynamicICFG,ObservableStaticICFG
public interface ObservableICFG<N,M>An interprocedural control-flow graph, for which caller-callee edges can be observed usingCalleeListenerandCallerListener. Can be used for demand-driven call graph generation.- Author:
- Melanie Bruns on 04.05.2018
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCalleeListener(CalleeListener<N,M> listener)Registers a listener that will be notified whenever a callee is addedvoidaddCallerListener(CallerListener<N,M> listener)Registers a listener that will be notified whenever a caller is added.voidaddEdges(CallGraph.Edge e)voidcomputeFallback()Collection<N>getEndPointsOf(M flowReaches)intgetNumberOfEdgesTakenFromPrecomputedGraph()Collection<N>getStartPointsOf(M callee)booleanisCallStmt(N stmt)Returnstrueif the given statement is a call site.booleanisExitStmt(N stmt)Returnstrueif the given statement leads to a method return (exceptional or not).booleanisStartPoint(N stmt)Returns true is this is a method's start statement.voidresetCallGraph()Resets the call graph.
-
-
-
Method Detail
-
addCalleeListener
void addCalleeListener(CalleeListener<N,M> listener)
Registers a listener that will be notified whenever a callee is added
-
addCallerListener
void addCallerListener(CallerListener<N,M> listener)
Registers a listener that will be notified whenever a caller is added.
-
isCallStmt
boolean isCallStmt(N stmt)
Returnstrueif the given statement is a call site.
-
isExitStmt
boolean isExitStmt(N stmt)
Returnstrueif the given statement leads to a method return (exceptional or not). For backward analyses may also be start statements.
-
isStartPoint
boolean isStartPoint(N stmt)
Returns true is this is a method's start statement. For backward analyses those may also be return or throws statements.
-
getNumberOfEdgesTakenFromPrecomputedGraph
int getNumberOfEdgesTakenFromPrecomputedGraph()
-
resetCallGraph
void resetCallGraph()
Resets the call graph. Only affects the call graph if it was built demand-driven, otherwise graph will remain unchanged. Demand-driven call graph will keep intraprocedual information, but reset start with an empty call graph again.
-
getStartPointsOf
Collection<N> getStartPointsOf(M callee)
-
getEndPointsOf
Collection<N> getEndPointsOf(M flowReaches)
-
computeFallback
void computeFallback()
-
addEdges
void addEdges(CallGraph.Edge e)
-
-