public class PrunedCFG<I,T extends IBasicBlock<I>> extends com.ibm.wala.util.graph.AbstractNumberedGraph<T> implements ControlFlowGraph<I,T>
ControlFlowGraph. Use this class along with an EdgeFilter to
produce a custom view of a CFG.
For example, you can use this class to produce a CFG view that ignores certain types of exceptional edges.
| Modifier and Type | Method and Description |
|---|---|
T |
entry()
Return the entry basic block in the CFG
|
T |
exit() |
T |
getBlockForInstruction(int index) |
com.ibm.wala.util.intset.BitVector |
getCatchBlocks() |
protected com.ibm.wala.util.graph.NumberedEdgeManager<T> |
getEdgeManager() |
java.util.Collection<T> |
getExceptionalPredecessors(T N)
The order of blocks returned should be arbitrary but deterministic.
|
java.util.List<T> |
getExceptionalSuccessors(T N)
The order of blocks returned must indicate the exception-handling scope.
|
I[] |
getInstructions() |
IMethod |
getMethod() |
protected com.ibm.wala.util.graph.NumberedNodeManager<T> |
getNodeManager() |
java.util.Collection<T> |
getNormalPredecessors(T N)
The order of blocks returned should be arbitrary but deterministic.
|
java.util.Collection<T> |
getNormalSuccessors(T N)
The order of blocks returned should be arbitrary but deterministic.
|
com.ibm.wala.util.intset.IntSet |
getPhiIndices(T bb) |
int |
getProgramCounter(int index)
TODO: move this into IR?
|
static <I,T extends IBasicBlock<I>> |
make(ControlFlowGraph<I,T> cfg,
EdgeFilter<T> filter) |
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodesaddEdge, addNode, containsNode, edgeString, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, stream, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetMaxNumber, getNode, getNumber, iterateNodesaddNode, containsNode, getNumberOfNodes, iterator, removeNode, streampublic static <I,T extends IBasicBlock<I>> PrunedCFG<I,T> make(ControlFlowGraph<I,T> cfg, EdgeFilter<T> filter)
cfg - the original CFG that you want a view offilter - an object that selectively filters edges in the original CFGjava.lang.IllegalArgumentException - if cfg is nullprotected com.ibm.wala.util.graph.NumberedNodeManager<T> getNodeManager()
getNodeManager in class com.ibm.wala.util.graph.AbstractNumberedGraph<T extends IBasicBlock<I>>protected com.ibm.wala.util.graph.NumberedEdgeManager<T> getEdgeManager()
getEdgeManager in class com.ibm.wala.util.graph.AbstractNumberedGraph<T extends IBasicBlock<I>>public java.util.List<T> getExceptionalSuccessors(T N)
MinimalCFGgetExceptionalSuccessors in interface MinimalCFG<T extends IBasicBlock<I>>public java.util.Collection<T> getNormalSuccessors(T N)
MinimalCFGgetNormalSuccessors in interface MinimalCFG<T extends IBasicBlock<I>>public java.util.Collection<T> getExceptionalPredecessors(T N)
MinimalCFGgetExceptionalPredecessors in interface MinimalCFG<T extends IBasicBlock<I>>public java.util.Collection<T> getNormalPredecessors(T N)
MinimalCFGgetNormalPredecessors in interface MinimalCFG<T extends IBasicBlock<I>>public T entry()
MinimalCFGentry in interface MinimalCFG<T extends IBasicBlock<I>>public T exit()
exit in interface MinimalCFG<T extends IBasicBlock<I>>public T getBlockForInstruction(int index)
getBlockForInstruction in interface ControlFlowGraph<I,T extends IBasicBlock<I>>index - an instruction indexpublic I[] getInstructions()
getInstructions in interface ControlFlowGraph<I,T extends IBasicBlock<I>>public int getProgramCounter(int index)
ControlFlowGraphgetProgramCounter in interface ControlFlowGraph<I,T extends IBasicBlock<I>>index - an instruction indexpublic IMethod getMethod()
getMethod in interface ControlFlowGraph<I,T extends IBasicBlock<I>>public com.ibm.wala.util.intset.BitVector getCatchBlocks()
getCatchBlocks in interface ControlFlowGraph<I,T extends IBasicBlock<I>>public com.ibm.wala.util.intset.IntSet getPhiIndices(T bb)