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, removePredecessor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId, getPredecessors, getType
protected Store.FlowRule thenFlowRule
protected Store.FlowRule elseFlowRule
public ConditionalBlockImpl()
public void setThenSuccessor(BlockImpl b)
public void setElseSuccessor(BlockImpl b)
public Block getThenSuccessor()
ConditionalBlock
getThenSuccessor
in interface ConditionalBlock
public Block getElseSuccessor()
ConditionalBlock
getElseSuccessor
in interface ConditionalBlock
public Set<Block> getSuccessors()
Block
getSuccessors
in interface Block
public Store.FlowRule getThenFlowRule()
ConditionalBlock
getThenFlowRule
in interface ConditionalBlock
public Store.FlowRule getElseFlowRule()
ConditionalBlock
getElseFlowRule
in interface ConditionalBlock
public void setThenFlowRule(Store.FlowRule rule)
ConditionalBlock
setThenFlowRule
in interface ConditionalBlock
public void setElseFlowRule(Store.FlowRule rule)
ConditionalBlock
setElseFlowRule
in interface ConditionalBlock
public List<Node> getNodes()
The following invariant holds.
forall n in getNodes() :: n.getBlock() == this
This implementation returns an empty list.
public @Nullable Node getLastNode()
Block
getLastNode
in interface Block
null