public class ExplodedControlFlowGraph extends Object implements ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static ExplodedControlFlowGraph make(IR ir)
public IExplodedBasicBlock entry()
ControlFlowGraph
entry
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
public IExplodedBasicBlock exit()
exit
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
public IExplodedBasicBlock getBlockForInstruction(int index)
getBlockForInstruction
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
index
- an instruction indexpublic BitVector getCatchBlocks()
getCatchBlocks
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
public Collection<IExplodedBasicBlock> getExceptionalPredecessors(IExplodedBasicBlock bb)
ControlFlowGraph
getExceptionalPredecessors
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
public List<IExplodedBasicBlock> getExceptionalSuccessors(IExplodedBasicBlock bb)
ControlFlowGraph
getExceptionalSuccessors
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
public SSAInstruction[] getInstructions()
getInstructions
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
public IMethod getMethod() throws UnimplementedError
getMethod
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
UnimplementedError
public Collection<IExplodedBasicBlock> getNormalPredecessors(IExplodedBasicBlock bb)
ControlFlowGraph
getNormalPredecessors
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
public Collection<IExplodedBasicBlock> getNormalSuccessors(IExplodedBasicBlock bb)
ControlFlowGraph
getNormalSuccessors
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
public int getProgramCounter(int index) throws UnimplementedError
ControlFlowGraph
getProgramCounter
in interface ControlFlowGraph<SSAInstruction,IExplodedBasicBlock>
index
- an instruction indexUnimplementedError
public void removeNodeAndEdges(IExplodedBasicBlock N) throws UnsupportedOperationException
Graph
removeNodeAndEdges
in interface Graph<IExplodedBasicBlock>
UnsupportedOperationException
- if the graph implementation does not allow removalpublic void addNode(IExplodedBasicBlock n) throws UnsupportedOperationException
NodeManager
addNode
in interface NodeManager<IExplodedBasicBlock>
UnsupportedOperationException
public boolean containsNode(IExplodedBasicBlock N)
containsNode
in interface NodeManager<IExplodedBasicBlock>
public int getNumberOfNodes()
getNumberOfNodes
in interface NodeManager<IExplodedBasicBlock>
public Iterator<IExplodedBasicBlock> iterator()
iterator
in interface NodeManager<IExplodedBasicBlock>
iterator
in interface Iterable<IExplodedBasicBlock>
Iterator
of the nodes in this graphpublic void removeNode(IExplodedBasicBlock n) throws UnsupportedOperationException
NodeManager
removeNode
in interface NodeManager<IExplodedBasicBlock>
UnsupportedOperationException
public void addEdge(IExplodedBasicBlock src, IExplodedBasicBlock dst) throws UnsupportedOperationException
addEdge
in interface EdgeManager<IExplodedBasicBlock>
UnsupportedOperationException
public int getPredNodeCount(IExplodedBasicBlock bb) throws IllegalArgumentException
EdgeManager
immediate predecessor
nodes of ngetPredNodeCount
in interface EdgeManager<IExplodedBasicBlock>
IllegalArgumentException
public Iterator<IExplodedBasicBlock> getPredNodes(IExplodedBasicBlock bb) throws IllegalArgumentException
EdgeManager
Iterator
over the immediate predecessor nodes of n
This method never returns null
.getPredNodes
in interface EdgeManager<IExplodedBasicBlock>
Iterator
over the immediate predecessor nodes of this Node.IllegalArgumentException
public int getSuccNodeCount(IExplodedBasicBlock N) throws UnimplementedError
EdgeManager
immediate successor
nodes of this Node in the GraphgetSuccNodeCount
in interface EdgeManager<IExplodedBasicBlock>
UnimplementedError
public Iterator<IExplodedBasicBlock> getSuccNodes(IExplodedBasicBlock bb)
EdgeManager
This method never returns null
.
getSuccNodes
in interface EdgeManager<IExplodedBasicBlock>
public boolean hasEdge(IExplodedBasicBlock src, IExplodedBasicBlock dst) throws UnimplementedError
hasEdge
in interface EdgeManager<IExplodedBasicBlock>
UnimplementedError
public void removeAllIncidentEdges(IExplodedBasicBlock node) throws UnsupportedOperationException
removeAllIncidentEdges
in interface EdgeManager<IExplodedBasicBlock>
UnsupportedOperationException
public void removeEdge(IExplodedBasicBlock src, IExplodedBasicBlock dst) throws UnsupportedOperationException
removeEdge
in interface EdgeManager<IExplodedBasicBlock>
UnsupportedOperationException
public void removeIncomingEdges(IExplodedBasicBlock node) throws UnsupportedOperationException
removeIncomingEdges
in interface EdgeManager<IExplodedBasicBlock>
UnsupportedOperationException
public void removeOutgoingEdges(IExplodedBasicBlock node) throws UnsupportedOperationException
removeOutgoingEdges
in interface EdgeManager<IExplodedBasicBlock>
UnsupportedOperationException
public int getMaxNumber()
getMaxNumber
in interface NumberedNodeManager<IExplodedBasicBlock>
public IExplodedBasicBlock getNode(int number)
getNode
in interface NumberedNodeManager<IExplodedBasicBlock>
public int getNumber(IExplodedBasicBlock n) throws IllegalArgumentException
getNumber
in interface NumberedNodeManager<IExplodedBasicBlock>
IllegalArgumentException
public Iterator<IExplodedBasicBlock> iterateNodes(IntSet s) throws UnimplementedError
iterateNodes
in interface NumberedNodeManager<IExplodedBasicBlock>
UnimplementedError
public IntSet getPredNodeNumbers(IExplodedBasicBlock node)
getPredNodeNumbers
in interface NumberedEdgeManager<IExplodedBasicBlock>
public IntSet getSuccNodeNumbers(IExplodedBasicBlock node) throws UnimplementedError
getSuccNodeNumbers
in interface NumberedEdgeManager<IExplodedBasicBlock>
UnimplementedError
public IR getIR()