Class ConditionalBlockImpl
java.lang.Object
org.checkerframework.dataflow.cfg.block.BlockImpl
org.checkerframework.dataflow.cfg.block.ConditionalBlockImpl
- All Implemented Interfaces:
Block
,ConditionalBlock
,org.plumelib.util.UniqueId
Implementation of a conditional basic block.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.checkerframework.dataflow.cfg.block.Block
Block.BlockType
-
Field Summary
Modifier and TypeFieldDescriptionprotected Store.FlowRule
The initial value says that the ELSE store before a conditional block flows to BOTH of the stores of the else successor.Successor of the else branch.protected Store.FlowRule
The initial value says that the THEN store before a conditional block flows to BOTH of the stores of the then successor.Successor of the then branch.Fields inherited from class org.checkerframework.dataflow.cfg.block.BlockImpl
predecessors, type
-
Constructor Summary
ConstructorDescriptionInitialize an empty conditional basic block to be filled with contents and linked to other basic blocks later. -
Method Summary
Modifier and TypeMethodDescriptionReturns the flow rule for information flowing from this block to its else successor.Returns the entry block of the else branch.Returns the last node of this block, or null if none.getNodes()
Returns the nodes contained within this basic block.Returns the successors of this basic block.Returns the flow rule for information flowing from this block to its then successor.Returns the entry block of the then branch.void
Set the flow rule for information flowing from this block to its else successor.void
Set the else branch successor.void
Set the flow rule for information flowing from this block to its then successor.void
Set the then branch successor.toString()
Methods inherited from class org.checkerframework.dataflow.cfg.block.BlockImpl
addPredecessor, getPredecessors, getType, getUid, removePredecessor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.checkerframework.dataflow.cfg.block.Block
getPredecessors, getType
Methods inherited from interface org.plumelib.util.UniqueId
getClassAndUid, getUid
-
Field Details
-
thenSuccessor
Successor of the then branch. -
elseSuccessor
Successor of the else branch. -
thenFlowRule
The initial value says that the THEN store before a conditional block flows to BOTH of the stores of the then successor. -
elseFlowRule
The initial value says that the ELSE store before a conditional block flows to BOTH of the stores of the else successor.
-
-
Constructor Details
-
ConditionalBlockImpl
public ConditionalBlockImpl()Initialize an empty conditional basic block to be filled with contents and linked to other basic blocks later.
-
-
Method Details
-
setThenSuccessor
Set the then branch successor. -
setElseSuccessor
Set the else branch successor. -
getThenSuccessor
Description copied from interface:ConditionalBlock
Returns the entry block of the then branch.- Specified by:
getThenSuccessor
in interfaceConditionalBlock
- Returns:
- the entry block of the then branch
-
getElseSuccessor
Description copied from interface:ConditionalBlock
Returns the entry block of the else branch.- Specified by:
getElseSuccessor
in interfaceConditionalBlock
- Returns:
- the entry block of the else branch
-
getSuccessors
Description copied from interface:Block
Returns the successors of this basic block.- Specified by:
getSuccessors
in interfaceBlock
- Returns:
- the successors of this basic block
-
getThenFlowRule
Description copied from interface:ConditionalBlock
Returns the flow rule for information flowing from this block to its then successor.- Specified by:
getThenFlowRule
in interfaceConditionalBlock
- Returns:
- the flow rule for information flowing from this block to its then successor
-
getElseFlowRule
Description copied from interface:ConditionalBlock
Returns the flow rule for information flowing from this block to its else successor.- Specified by:
getElseFlowRule
in interfaceConditionalBlock
- Returns:
- the flow rule for information flowing from this block to its else successor
-
setThenFlowRule
Description copied from interface:ConditionalBlock
Set the flow rule for information flowing from this block to its then successor.- Specified by:
setThenFlowRule
in interfaceConditionalBlock
- Parameters:
rule
- the new flow rule for information flowing from this block to its then successor
-
setElseFlowRule
Description copied from interface:ConditionalBlock
Set the flow rule for information flowing from this block to its else successor.- Specified by:
setElseFlowRule
in interfaceConditionalBlock
- Parameters:
rule
- the new flow rule for information flowing from this block to its else successor
-
getNodes
Returns the nodes contained within this basic block. The list may be empty.The following invariant holds.
forall n in getNodes() :: n.getBlock() == this
This implementation returns an empty list.
-
getLastNode
Description copied from interface:Block
Returns the last node of this block, or null if none.- Specified by:
getLastNode
in interfaceBlock
- Returns:
- the last node of this block or
null
-
toString
-