public class ConditionalBlockImpl extends BlockImpl implements ConditionalBlock
Block.BlockType| Modifier and Type | Field and Description |
|---|---|
protected Store.FlowRule |
elseFlowRule |
protected @Nullable BlockImpl |
elseSuccessor
Successor of the else branch.
|
protected Store.FlowRule |
thenFlowRule
The initial values for the rules below say that the THEN store before a conditional block
flows to BOTH of the stores of the then successor, while the ELSE store before a conditional
block flows to BOTH of the stores of the else successor.
|
protected @Nullable BlockImpl |
thenSuccessor
Successor of the then branch.
|
id, lastId, predecessors, type| Constructor and Description |
|---|
ConditionalBlockImpl()
Initialize an empty conditional basic block to be filled with contents and linked to other
basic blocks later.
|
| Modifier and Type | Method and Description |
|---|---|
Store.FlowRule |
getElseFlowRule()
Returns the flow rule for information flowing from this block to its else successor.
|
Block |
getElseSuccessor()
Returns the entry block of the else branch.
|
@Nullable Node |
getLastNode()
Returns the last node of this block, or null if none.
|
List<Node> |
getNodes()
Returns the nodes contained within this basic block.
|
Set<Block> |
getSuccessors()
Returns the successors of this basic block.
|
Store.FlowRule |
getThenFlowRule()
Returns the flow rule for information flowing from this block to its then successor.
|
Block |
getThenSuccessor()
Returns the entry block of the then branch.
|
void |
setElseFlowRule(Store.FlowRule rule)
Set the flow rule for information flowing from this block to its else successor.
|
void |
setElseSuccessor(BlockImpl b)
Set the else branch successor.
|
void |
setThenFlowRule(Store.FlowRule rule)
Set the flow rule for information flowing from this block to its then successor.
|
void |
setThenSuccessor(BlockImpl b)
Set the then branch successor.
|
String |
toString() |
addPredecessor, getId, getPredecessors, getType, removePredecessorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetId, getPredecessors, getTypeprotected Store.FlowRule thenFlowRule
protected Store.FlowRule elseFlowRule
public ConditionalBlockImpl()
public void setThenSuccessor(BlockImpl b)
public void setElseSuccessor(BlockImpl b)
public Block getThenSuccessor()
ConditionalBlockgetThenSuccessor in interface ConditionalBlockpublic Block getElseSuccessor()
ConditionalBlockgetElseSuccessor in interface ConditionalBlockpublic Set<Block> getSuccessors()
BlockgetSuccessors in interface Blockpublic Store.FlowRule getThenFlowRule()
ConditionalBlockgetThenFlowRule in interface ConditionalBlockpublic Store.FlowRule getElseFlowRule()
ConditionalBlockgetElseFlowRule in interface ConditionalBlockpublic void setThenFlowRule(Store.FlowRule rule)
ConditionalBlocksetThenFlowRule in interface ConditionalBlockpublic void setElseFlowRule(Store.FlowRule rule)
ConditionalBlocksetElseFlowRule in interface ConditionalBlockpublic List<Node> getNodes()
The following invariant holds.
forall n in getNodes() :: n.getBlock() == this
This implementation returns an empty list.
public @Nullable Node getLastNode()
BlockgetLastNode in interface Blocknull