Class ArithmeticExp

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

public class ArithmeticExp extends Object
Representation of arithmetic expression, e.g., a + b.
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 ArithmeticExp.Op getOperator()
      Returns:
      the operator.
    • getType

      public PrimitiveType 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