Class ComparisonExp

java.lang.Object
pascal.taie.ir.exp.ComparisonExp
All Implemented Interfaces:
Serializable, BinaryExp, Exp, RValue

public class ComparisonExp extends Object
Representation of comparison expression, e.g., cmp.
See Also:
  • Field Details

    • operand1

      protected final Var operand1
    • operand2

      protected final Var operand2
  • Constructor Details

  • Method Details

    • validate

      protected void validate()
      Validates type correctness of the two values of this expression.
    • getOperator

      public ComparisonExp.Op getOperator()
      Returns:
      the operator.
    • getType

      public IntType getType()
      Returns:
      type of this expression.
    • accept

      public <T> T accept(ExpVisitor<T> visitor)
    • getOperand1

      public Var getOperand1()
      Specified by:
      getOperand1 in interface BinaryExp
      Returns:
      the first operand.
    • getOperand2

      public Var getOperand2()
      Specified by:
      getOperand2 in interface BinaryExp
      Returns:
      the second operand.
    • getUses

      public Set<RValue> getUses()
      Specified by:
      getUses in interface Exp
      Returns:
      a list of expressions which are used by (contained in) this Exp.
    • toString

      public String toString()
      Overrides:
      toString in class Object