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, removeOutgoingEdgesMethods inherited from interface Graph
removeNodeAndEdgesMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface MinimalCFG
entry, exit, getExceptionalPredecessors, getExceptionalSuccessors, getNormalPredecessors, getNormalSuccessorsMethods inherited from interface NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, streamMethods 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
-