Class ConditionalJump

java.lang.Object
org.checkerframework.dataflow.cfg.builder.ConditionalJump

public class ConditionalJump extends Object
An extended node of type ExtendedNode.ExtendedNodeType.CONDITIONAL_JUMP.

Important: In the list of extended nodes, there should not be any labels that point to a conditional jump. Furthermore, the node directly ahead of any conditional jump has to be a NodeWithExceptionsHolder or NodeHolder, and the node held by that extended node is required to be of boolean type.

  • Field Details

    • trueSucc

      protected final org.checkerframework.dataflow.cfg.builder.Label trueSucc
      The true successor label.
    • falseSucc

      protected final org.checkerframework.dataflow.cfg.builder.Label falseSucc
      The false successor label.
    • trueFlowRule

      protected Store.FlowRule trueFlowRule
      The true branch flow rule.
    • falseFlowRule

      protected Store.FlowRule falseFlowRule
      The false branch flow rule.
    • block

      protected BlockImpl block
      The basic block this extended node belongs to (as determined in phase two).
    • type

      protected final org.checkerframework.dataflow.cfg.builder.ExtendedNode.ExtendedNodeType type
      Type of this node.
    • terminatesExecution

      protected boolean terminatesExecution
      Does this node terminate the execution? (e.g., "System.exit()")
  • Constructor Details

    • ConditionalJump

      public ConditionalJump(org.checkerframework.dataflow.cfg.builder.Label trueSucc, org.checkerframework.dataflow.cfg.builder.Label falseSucc)
      Construct a ConditionalJump.
      Parameters:
      trueSucc - true successor label
      falseSucc - false successor label
  • Method Details

    • getThenLabel

      public org.checkerframework.dataflow.cfg.builder.Label getThenLabel()
    • getElseLabel

      public org.checkerframework.dataflow.cfg.builder.Label getElseLabel()
    • getTrueFlowRule

      public Store.FlowRule getTrueFlowRule()
      Returns the true branch flow rule.
      Returns:
      the true branch flow rule
    • getFalseFlowRule

      public Store.FlowRule getFalseFlowRule()
      Returns the false branch flow rule.
      Returns:
      the false branch flow rule
    • setTrueFlowRule

      public void setTrueFlowRule(Store.FlowRule rule)
      Sets the true branch flow rule.
      Parameters:
      rule - the new true branch flow rule
    • setFalseFlowRule

      public void setFalseFlowRule(Store.FlowRule rule)
      Sets the false branch flow rule.
      Parameters:
      rule - the new false branch flow rule
    • toString

      public String toString()
      Produce a string representation.
      Returns:
      a string representation
      See Also:
    • toStringDebug

      public String toStringDebug()
      Returns a verbose string representation of this, useful for debugging.
      Returns:
      a string representation of this
    • getType

      public org.checkerframework.dataflow.cfg.builder.ExtendedNode.ExtendedNodeType getType()
    • getTerminatesExecution

      public boolean getTerminatesExecution()
    • setTerminatesExecution

      public void setTerminatesExecution(boolean terminatesExecution)
    • getNode

      public Node getNode()
      Returns the node contained in this extended node (only applicable if the type is NODE or EXCEPTION_NODE).
      Returns:
      the node contained in this extended node (only applicable if the type is NODE or EXCEPTION_NODE)
    • getLabel

      public org.checkerframework.dataflow.cfg.builder.Label getLabel()
      Returns the label associated with this extended node (only applicable if type is ExtendedNode.ExtendedNodeType.CONDITIONAL_JUMP or ExtendedNode.ExtendedNodeType.UNCONDITIONAL_JUMP).
      Returns:
      the label associated with this extended node (only applicable if type is ExtendedNode.ExtendedNodeType.CONDITIONAL_JUMP or ExtendedNode.ExtendedNodeType.UNCONDITIONAL_JUMP)
    • getBlock

      public BlockImpl getBlock()
    • setBlock

      public void setBlock(BlockImpl b)