Class DualFlowInfo


public class DualFlowInfo extends ConditionalFlowInfo
A wrapper for two flow infos being co-maintained side-by-side. All inherited methods that dispatch to the individual flow infos ConditionalFlowInfo.initsWhenTrue and ConditionalFlowInfo.initsWhenFalse are re-used as-is. Any operations involving some kind of copying need to be overridden.
  • Constructor Details

    • DualFlowInfo

      public DualFlowInfo(FlowInfo mainInfo, FlowInfo companionInfo)
  • Method Details

    • asNegatedCondition

      public FlowInfo asNegatedCondition()
      Overrides:
      asNegatedCondition in class ConditionalFlowInfo
    • copy

      public FlowInfo copy()
      Description copied from class: FlowInfo
      Return a deep copy of the current instance.
      Overrides:
      copy in class ConditionalFlowInfo
      Returns:
      a deep copy of this flow info
    • mergedWith

      public UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits)
      Description copied from class: FlowInfo
      Return the intersection of this and otherInits, that is one of:
      • the receiver updated in the following way:
        • intersection of definitely assigned variables,
        • union of potentially assigned variables,
        • similar operations for null,
      • or the receiver or otherInits if the other one is non reachable.
      otherInits is not affected, and is not returned either (no need to protect the result).
      Overrides:
      mergedWith in class ConditionalFlowInfo
      Parameters:
      otherInits - the flow info to merge with this
      Returns:
      the intersection of this and otherInits.
    • mergeDefiniteInitsWith

      public UnconditionalFlowInfo mergeDefiniteInitsWith(UnconditionalFlowInfo otherInits)
      Overrides:
      mergeDefiniteInitsWith in class ConditionalFlowInfo
    • unconditionalCopy

      public UnconditionalFlowInfo unconditionalCopy()
      Description copied from class: FlowInfo
      Return a new flow info that holds the same information as this would after a call to unconditionalInits, but leaving this info unaffected. Moreover, the result can be modified without affecting this.
      Overrides:
      unconditionalCopy in class ConditionalFlowInfo
      Returns:
      a new flow info carrying this unconditional flow info
    • unconditionalFieldLessCopy

      public UnconditionalFlowInfo unconditionalFieldLessCopy()
      Description copied from class: FlowInfo
      Return a new flow info that holds the same information as this would after a call to unconditionalInits followed by the erasure of fields specific information, but leaving this flow info unaffected.
      Overrides:
      unconditionalFieldLessCopy in class ConditionalFlowInfo
      Returns:
      a new flow info carrying the unconditional flow info for local variables
    • unconditionalInits

      public UnconditionalFlowInfo unconditionalInits()
      Description copied from class: FlowInfo
      Return a flow info that merges the possible paths of execution described by this flow info. In case of an unconditional flow info, return this. In case of a conditional flow info, merge branches recursively. Caveat: this may be affected, and modifying the result may affect this.
      Overrides:
      unconditionalInits in class ConditionalFlowInfo
      Returns:
      a flow info that merges the possible paths of execution described by this
    • unconditionalInitsWithoutSideEffect

      public UnconditionalFlowInfo unconditionalInitsWithoutSideEffect()
      Description copied from class: FlowInfo
      Return a new flow info that holds the same information as this would after a call to unconditionalInits, but leaving this info unaffected. Side effects on the result might affect this though (consider it as read only).
      Overrides:
      unconditionalInitsWithoutSideEffect in class ConditionalFlowInfo
      Returns:
      a flow info carrying this unconditional flow info
    • toString

      public String toString()
      Overrides:
      toString in class ConditionalFlowInfo