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() |
Collection<T> |
getExceptionalPredecessors(T N)
The order of blocks returned should be arbitrary but deterministic.
|
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() |
Collection<T> |
getNormalPredecessors(T N)
The order of blocks returned should be arbitrary but deterministic.
|
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, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetMaxNumber, getNode, getNumber, iterateNodesaddNode, containsNode, getNumberOfNodes, iterator, removeNodepublic 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 CFGIllegalArgumentException - 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 List<T> getExceptionalSuccessors(T N)
ControlFlowGraphgetExceptionalSuccessors in interface ControlFlowGraph<I,T extends IBasicBlock<I>>public Collection<T> getNormalSuccessors(T N)
ControlFlowGraphgetNormalSuccessors in interface ControlFlowGraph<I,T extends IBasicBlock<I>>public Collection<T> getExceptionalPredecessors(T N)
ControlFlowGraphgetExceptionalPredecessors in interface ControlFlowGraph<I,T extends IBasicBlock<I>>public Collection<T> getNormalPredecessors(T N)
ControlFlowGraphgetNormalPredecessors in interface ControlFlowGraph<I,T extends IBasicBlock<I>>public T entry()
ControlFlowGraphentry in interface ControlFlowGraph<I,T extends IBasicBlock<I>>public T exit()
exit in interface ControlFlowGraph<I,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)
Copyright © 2015. All rights reserved.