jpaul.Graphs
Interface BasicBlock<Vertex>


public interface BasicBlock<Vertex>

BasicBlock is a straight-line sequence of vertices. Except (possibly) for the first vertex, every other vertex has a single incoming arc, from the immediate predecessor in the same basic block. Similarly, except (possibly) for the last vertex, every other vertex has a single outgoing arc, to the immediate successor in the same basic block. Moreover, the basic block is maximal with respect to these properties: it cannot be extended upward (e.g., because the first element has two incoming arcs), not downward.

Version:
$Id: BasicBlock.java,v 1.6 2005/12/08 06:27:04 salcianu Exp $
Author:
Alexandru Salcianu - salcianu@alum.mit.edu
See Also:
BasicBlockDiGraph

Method Summary
 java.util.LinkedList<Vertex> elems()
           
 DiGraph<BasicBlock<Vertex>> enclosingBBDiGraph()
           
 int getId()
           
 java.util.List<BasicBlock<Vertex>> next()
           
 java.util.List<BasicBlock<Vertex>> prev()
           
 

Method Detail

prev

java.util.List<BasicBlock<Vertex>> prev()
Returns:
List of basic blocks predecessors. Caller should not mutate the returned list. Complexity: O(1).

next

java.util.List<BasicBlock<Vertex>> next()
Returns:
List of basic blocks successors. Caller should not mutate the returned list. Complexity: O(1).

elems

java.util.LinkedList<Vertex> elems()
Returns:
List of vertices from this basic block. Caller should not mutate the returned list. Complexity: O(1).

getId

int getId()
Returns:
Integer identifier for this basic block. The identifiers of basic blocks from the same BasicBlockDiGraph should be distinct. Complexity: O(1).

enclosingBBDiGraph

DiGraph<BasicBlock<Vertex>> enclosingBBDiGraph()
Returns:
Enclosing BasicBlockDiGraph. Complexity: O(1).


Copyright 2005 Alexandru Salcianu - salcianu@alum.mit.edu