Package com.ibm.wala.cfg
Interface ControlFlowGraph<I,T extends IBasicBlock<I>>
-
- All Superinterfaces:
com.ibm.wala.util.graph.EdgeManager<T>
,com.ibm.wala.util.graph.Graph<T>
,java.lang.Iterable<T>
,MinimalCFG<T>
,com.ibm.wala.util.graph.NodeManager<T>
,com.ibm.wala.util.graph.NumberedEdgeManager<T>
,com.ibm.wala.util.graph.NumberedGraph<T>
,com.ibm.wala.util.graph.NumberedNodeManager<T>
- All Known Implementing Classes:
AbstractCFG
,ExplodedControlFlowGraph
,InducedCFG
,MutableCFG
,PrunedCFG
,ShrikeCFG
,SSACFG
public interface ControlFlowGraph<I,T extends IBasicBlock<I>> extends com.ibm.wala.util.graph.NumberedGraph<T>, MinimalCFG<T>
An interface that is common to the Shrike and SSA CFG implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getBlockForInstruction(int index)
com.ibm.wala.util.intset.BitVector
getCatchBlocks()
I[]
getInstructions()
IMethod
getMethod()
int
getProgramCounter(int index)
TODO: move this into IR?-
Methods inherited from interface com.ibm.wala.util.graph.EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
-
Methods inherited from interface com.ibm.wala.cfg.MinimalCFG
entry, exit, getExceptionalPredecessors, getExceptionalSuccessors, getNormalPredecessors, getNormalSuccessors
-
Methods inherited from interface com.ibm.wala.util.graph.NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, stream
-
-
-
-
Method Detail
-
getCatchBlocks
com.ibm.wala.util.intset.BitVector getCatchBlocks()
- Returns:
- the indices of the catch blocks, as a bit vector
-
getBlockForInstruction
T getBlockForInstruction(int index)
- 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
-
-