Interface ControlFlowGraph<I, T extends IBasicBlock<I>>
- All Superinterfaces:
EdgeManager<T>, Graph<T>, Iterable<T>, MinimalCFG<T>, NodeManager<T>, NumberedEdgeManager<T>, NumberedGraph<T>, NumberedNodeManager<T>
- All Known Implementing Classes:
AbstractCFG, AstInducedCFG, AstTranslator.AstCFG, DelegatingCFG, DexCFG, ExplodedControlFlowGraph, InducedCFG, JSInducedCFG, MutableCFG, PrunedCFG, ShrikeCFG, SSACFG
public interface ControlFlowGraph<I, T extends IBasicBlock<I>>
extends NumberedGraph<T>, MinimalCFG<T>
An interface that is common to the Shrike and SSA CFG implementations.
-
Method Summary
Modifier and TypeMethodDescriptiongetBlockForInstruction(int index) I[]intgetProgramCounter(int index) TODO: move this into IR?Methods inherited from interface EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdgesModifier and TypeMethodDescriptionvoidintReturn the number ofimmediate predecessornodes of ngetPredNodes(T n) Return anIteratorover the immediate predecessor nodes of nintReturn the number ofimmediate successornodes of this Node in the GraphgetSuccNodes(T n) Return an Iterator over the immediate successor nodes of nbooleanvoidremoveAllIncidentEdges(T node) voidremoveEdge(T src, T dst) voidremoveIncomingEdges(T node) voidremoveOutgoingEdges(T node) Methods inherited from interface Graph
removeNodeAndEdgesModifier and TypeMethodDescriptionvoidremove a node and all its incident edgesMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface MinimalCFG
entry, exit, getExceptionalPredecessors, getExceptionalSuccessors, getNormalPredecessors, getNormalSuccessorsModifier and TypeMethodDescriptionentry()Return the entry basic block in the CFGexit()The order of blocks returned should be arbitrary but deterministic.The order of blocks returned must indicate the exception-handling scope.The order of blocks returned should be arbitrary but deterministic.The order of blocks returned should be arbitrary but deterministic.Methods inherited from interface NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, streamModifier and TypeMethodDescriptionvoidadd a node to this graphbooleancontainsNode(T n) intiterator()voidremoveNode(T n) remove a node from this graphstream()Methods inherited from interface NumberedEdgeManager
getPredNodeNumbers, getSuccNodeNumbersMethods inherited from interface NumberedNodeManager
getMaxNumber, getNode, getNumber, iterateNodes
-
Method Details
-
getCatchBlocks
BitVector getCatchBlocks()- Returns:
- the indices of the catch blocks, as a bit vector
-
getBlockForInstruction
- Parameters:
index- an instruction index- Returns:
- the basic block which contains this instruction.
-
getInstructions
I[] getInstructions()- Returns:
- the instructions of this CFG, as an array.
-
getProgramCounter
int getProgramCounter(int index) TODO: move this into IR?- Parameters:
index- an instruction index- Returns:
- the program counter (bytecode index) corresponding to that instruction
-
getMethod
IMethod getMethod()- Returns:
- the Method this CFG represents
-