java.lang.Object
pascal.taie.analysis.dataflow.analysis.constprop.Value

public class Value extends Object
Represents lattice values in constant propagation. A value can be either UNDEF, a constant, or NAC.
  • Method Details

    • getUndef

      public static Value getUndef()
      Returns:
      the UNDEF.
    • makeConstant

      public static Value makeConstant(int value)
      Makes a constant value.
      Returns:
      the constant for given value.
    • getNAC

      public static Value getNAC()
      Returns:
      the NAC.
    • isUndef

      public boolean isUndef()
      Returns:
      true if this value is UNDEF, otherwise false.
    • isConstant

      public boolean isConstant()
      Returns:
      true if this value represents a constant, otherwise false.
    • isNAC

      public boolean isNAC()
      Returns:
      true if this value is NAC, otherwise false.
    • getConstant

      public int getConstant()
      If this value represents a (integer) constant, then returns the integer. The client code should call isConstant() to check if this Value is constant before calling this method.
      Throws:
      AnalysisException - if this value is not a constant
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object