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
FieldsModifier and TypeFieldDescriptionprotected Store.FlowRuleThe 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.FlowRuleThe 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
ConstructorsConstructorDescriptionInitialize 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.voidSet the flow rule for information flowing from this block to its else successor.voidSet the else branch successor.voidSet the flow rule for information flowing from this block to its then successor.voidSet the then branch successor.toString()Methods inherited from class org.checkerframework.dataflow.cfg.block.BlockImpl
addPredecessor, getPredecessors, getType, getUid, removePredecessorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.checkerframework.dataflow.cfg.block.Block
getPredecessors, getTypeMethods 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:ConditionalBlockReturns the entry block of the then branch.- Specified by:
getThenSuccessorin interfaceConditionalBlock- Returns:
- the entry block of the then branch
-
getElseSuccessor
Description copied from interface:ConditionalBlockReturns the entry block of the else branch.- Specified by:
getElseSuccessorin interfaceConditionalBlock- Returns:
- the entry block of the else branch
-
getSuccessors
Description copied from interface:BlockReturns the successors of this basic block.- Specified by:
getSuccessorsin interfaceBlock- Returns:
- the successors of this basic block
-
getThenFlowRule
Description copied from interface:ConditionalBlockReturns the flow rule for information flowing from this block to its then successor.- Specified by:
getThenFlowRulein interfaceConditionalBlock- Returns:
- the flow rule for information flowing from this block to its then successor
-
getElseFlowRule
Description copied from interface:ConditionalBlockReturns the flow rule for information flowing from this block to its else successor.- Specified by:
getElseFlowRulein interfaceConditionalBlock- Returns:
- the flow rule for information flowing from this block to its else successor
-
setThenFlowRule
Description copied from interface:ConditionalBlockSet the flow rule for information flowing from this block to its then successor.- Specified by:
setThenFlowRulein interfaceConditionalBlock- Parameters:
rule- the new flow rule for information flowing from this block to its then successor
-
setElseFlowRule
Description copied from interface:ConditionalBlockSet the flow rule for information flowing from this block to its else successor.- Specified by:
setElseFlowRulein 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:BlockReturns the last node of this block, or null if none.- Specified by:
getLastNodein interfaceBlock- Returns:
- the last node of this block or
null
-
toString
-