Module dev.civl.abc

Enum Class OperatorNode.Operator

java.lang.Object
java.lang.Enum<OperatorNode.Operator>
dev.civl.abc.ast.node.IF.expression.OperatorNode.Operator
All Implemented Interfaces:
Serializable, Comparable<OperatorNode.Operator>, Constable
Enclosing interface:
OperatorNode

public static enum OperatorNode.Operator extends Enum<OperatorNode.Operator>
An enumerated type for all the different operators that can occur in an OperatorNode. Some operators are not included here because they have their own class. In particular, any operator that results in a left-hand-side expression has its own class.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The unary address-of operator invalid input: '&', as in invalid input: '&e', which returns a pointer to the object specified by its argument e.
    The CIVL-C "APPLY" operator which applies a single argument to a lambda expression
    The standard binary assignment operator =, as in lhs=rhs.
    The CIVL-C "big-O" operator $O, as in $O(h*h), which is used to specify the asymptotic complexity of an expression as a parameter approaches zero.
    The bitwise and binary operator invalid input: '&', as in einvalid input: '&f', which performs the bit-wise and operation on the corresponding bits of the two integer values.
    The bit-wise and assignment operator invalid input: '&'=, as in lhsinvalid input: '&'=rhs, which performs the bit-wise and operation on the two arguments and stores the result in the lhs.
    The bit-wise complement operator ~, as in ~e, which negates each bit in an integer value.
    The bit-wise equivalent operator invalid input: '<'--> of ACSL extension, as in a invalid input: '<'--> b.
    The bit-wise implies operator --> of ACSL extension, as in a --> b.
    The bit-wise inclusive or operator |, as in e|f, which performs the logical or operation on the corresponding bits of two integer values.
    The bit-wise inclusive or assignment operator |=, as in lhs|=rhs, which performs bit-wise or on the two arguments and stores the result in the lhs.
    The bit-wise exclusive or operator ^, as in e^f, which performs the exclusive-or operation on the respective bits of two integer values.
    The bit-wise exclusive or assignment operator ^=, which performs the bit-wise exclusive or operation on the two arguments and stores the result in the left-hand-side argument.
    The comma operator ,, as in e,f which evaluates e and then f, and returns the result of evaluating f.
    The ternary if-then-else operator ?, as in e1 ? e2 : e3.
    The pointer dereference unary operator *, as in *e, which returns the value stored in the memory location pointed to by e.
    The numeric division operator /, as in e/f, used for integer or floating-point division.
    The numeric division assignment operator /=, as in lhs/=rhs, which evaluates lhs/rhs and stores the result in lhs.
    The equality operator ==, as in e==f, which returns the integer 1 if the two arguments are equal, else returns the integer 0.
    The greater-than relational operator, as in e>f, which returns the integer 1 if e is greater than f, else returns 0.
    The greater-than-or-equal-to relational operator, as in e>=f, which returns the integer 1 if e is greater than or equal to f, else returns 0.
    The CIVL-C "remote" operator #, as in expr0 # expr.
    The CIVL-C logical implication operator =>, as in e=>f which is equivalent to (!e)||f.
    The logical and operator invalid input: '&'invalid input: '&', as in einvalid input: '&'invalid input: '&f', which returns the integer 1 if e and f are both true (not 0), else returns 1.
    The logical equivalent operator invalid input: '<'==> of ACSL extension, as in einvalid input: '<'==>f, which returns the integer 1 if e and f are logically equivalent.
    The logical or operator ||, as in e||f, which returns the integer 1 if e or f is true (not 0), else returns 1.
    The less-than relational operator, as in e<f, which returns the integer 1 if e is less than f, else returns 0.
    The less-than-or-equal-to relational operator, as in e invalid input: '<'= f, which returns the integer 1 if e is less than or equal to f, else returns 0.
    The logical xor operator ^^ of ACSL extension, as in e^^f, which returns the integer 1 if e and f are not equivalent.
    The binary subtraction operator -, as in e-f.
    The subtraction assignment operator -=, as in e-=f, which performs subtraction e-f and stores the result in e.
    The integer modulus operator %, as in e%f.
    The integer modulus assignment operator %=, which stores the result of e%f in e.
    The not-equals operator !=, as in e!=f, which returns the integer 1 if the two arguments are not equal, else returns the integer 0.
    The logical not operator !, as in !e which returns the integer 1 if e is zero, else returns 0.
    The ACSL \old operator.
    The binary addition operator +, as in e+f.
    The addition assignment operator += as in lhs+=rhs.
    The post-decrement operator --, as in e--, which subtracts one from e, storing the result in e, and returns the original value of e.
    The post-increment operator ++, as in e++, which adds one to e, storing the result in e, and returns the original value of e.
    The pre-decrement operator --, as in --e, which subtracts one from e, storing the result in e, and returns the decremented result.
    The pre-increment operator ++, as in ++e, which adds one to e, storing the result in e, and returns the incremented result.
    The shift-left operator invalid input: '<'invalid input: '<' , as in e invalid input: '<'invalid input: '<' f, which returns the integer obtained by shifting the bits comprising integer e f units to the left.
    The shift left assignment operator invalid input: '<'invalid input: '<'= , as in e invalid input: '<'invalid input: '<'= f, which stores in e the result of e invalid input: '<'invalid input: '<' f.
    The shift-right operator >> , as in e >> f , which returns the integer obtained by shifting the bits comprising integer e f units to the right.
    The shift right assignment operator >>= , as in e >>= f, which stores in e the result of e >> f.
    The array subscript operator [], as in a[i] , which returns the element in position i of array a.
    The multiplication operator *, as in e*f.
    The multiplication assignment operator *=, as in e*=f, which stores in e the result of e*f.
    The unary minus operator -, as in -e, which return the numeric negation of the number e.
    The unary plus operator +, as in +e, which returns e.
    ACSL Valid operator
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ADDRESSOF

      public static final OperatorNode.Operator ADDRESSOF
      The unary address-of operator invalid input: '&', as in invalid input: '&e', which returns a pointer to the object specified by its argument e.
    • APPLY

      public static final OperatorNode.Operator APPLY
      The CIVL-C "APPLY" operator which applies a single argument to a lambda expression
    • ASSIGN

      public static final OperatorNode.Operator ASSIGN
      The standard binary assignment operator =, as in lhs=rhs.
    • BIG_O

      public static final OperatorNode.Operator BIG_O
      The CIVL-C "big-O" operator $O, as in $O(h*h), which is used to specify the asymptotic complexity of an expression as a parameter approaches zero.
    • BITAND

      public static final OperatorNode.Operator BITAND
      The bitwise and binary operator invalid input: '&', as in einvalid input: '&f', which performs the bit-wise and operation on the corresponding bits of the two integer values.
    • BITANDEQ

      public static final OperatorNode.Operator BITANDEQ
      The bit-wise and assignment operator invalid input: '&'=, as in lhsinvalid input: '&'=rhs, which performs the bit-wise and operation on the two arguments and stores the result in the lhs.
    • BITCOMPLEMENT

      public static final OperatorNode.Operator BITCOMPLEMENT
      The bit-wise complement operator ~, as in ~e, which negates each bit in an integer value.
    • BITEQUIV

      public static final OperatorNode.Operator BITEQUIV
      The bit-wise equivalent operator invalid input: '<'--> of ACSL extension, as in a invalid input: '<'--> b.
    • BITIMPLIES

      public static final OperatorNode.Operator BITIMPLIES
      The bit-wise implies operator --> of ACSL extension, as in a --> b.
    • BITOR

      public static final OperatorNode.Operator BITOR
      The bit-wise inclusive or operator |, as in e|f, which performs the logical or operation on the corresponding bits of two integer values.
    • BITOREQ

      public static final OperatorNode.Operator BITOREQ
      The bit-wise inclusive or assignment operator |=, as in lhs|=rhs, which performs bit-wise or on the two arguments and stores the result in the lhs.
    • BITXOR

      public static final OperatorNode.Operator BITXOR
      The bit-wise exclusive or operator ^, as in e^f, which performs the exclusive-or operation on the respective bits of two integer values.
    • BITXOREQ

      public static final OperatorNode.Operator BITXOREQ
      The bit-wise exclusive or assignment operator ^=, which performs the bit-wise exclusive or operation on the two arguments and stores the result in the left-hand-side argument.
    • COMMA

      public static final OperatorNode.Operator COMMA
      The comma operator ,, as in e,f which evaluates e and then f, and returns the result of evaluating f. Useful only if e has side-effects.
    • CONDITIONAL

      public static final OperatorNode.Operator CONDITIONAL
      The ternary if-then-else operator ?, as in e1 ? e2 : e3. Evaluates e1 and converts to boolean; if result is true, evaluates and returns e2, else evaluates and returns e2.
    • DEREFERENCE

      public static final OperatorNode.Operator DEREFERENCE
      The pointer dereference unary operator *, as in *e, which returns the value stored in the memory location pointed to by e.
    • DIV

      public static final OperatorNode.Operator DIV
      The numeric division operator /, as in e/f, used for integer or floating-point division.
    • DIVEQ

      public static final OperatorNode.Operator DIVEQ
      The numeric division assignment operator /=, as in lhs/=rhs, which evaluates lhs/rhs and stores the result in lhs.
    • EQUALS

      public static final OperatorNode.Operator EQUALS
      The equality operator ==, as in e==f, which returns the integer 1 if the two arguments are equal, else returns the integer 0. The arguments must have scalar type.
    • GT

      public static final OperatorNode.Operator GT
      The greater-than relational operator, as in e>f, which returns the integer 1 if e is greater than f, else returns 0.
    • GTE

      public static final OperatorNode.Operator GTE
      The greater-than-or-equal-to relational operator, as in e>=f, which returns the integer 1 if e is greater than or equal to f, else returns 0.
    • HASH

      public static final OperatorNode.Operator HASH
      The CIVL-C "remote" operator #, as in expr0 # expr.
    • IMPLIES

      public static final OperatorNode.Operator IMPLIES
      The CIVL-C logical implication operator =>, as in e=>f which is equivalent to (!e)||f.
    • LAND

      public static final OperatorNode.Operator LAND
      The logical and operator invalid input: '&'invalid input: '&', as in einvalid input: '&'invalid input: '&f', which returns the integer 1 if e and f are both true (not 0), else returns 1. This is a short-circuit operator, so if e is false, f is not evaluated.
    • LEQ

      public static final OperatorNode.Operator LEQ
      The logical equivalent operator invalid input: '<'==> of ACSL extension, as in einvalid input: '<'==>f, which returns the integer 1 if e and f are logically equivalent.
    • LOR

      public static final OperatorNode.Operator LOR
      The logical or operator ||, as in e||f, which returns the integer 1 if e or f is true (not 0), else returns 1. This is a short-circuit operator, so if e is true, f is not evaluated.
    • LXOR

      public static final OperatorNode.Operator LXOR
      The logical xor operator ^^ of ACSL extension, as in e^^f, which returns the integer 1 if e and f are not equivalent.
    • LT

      public static final OperatorNode.Operator LT
      The less-than relational operator, as in e<f, which returns the integer 1 if e is less than f, else returns 0.
    • LTE

      public static final OperatorNode.Operator LTE
      The less-than-or-equal-to relational operator, as in e invalid input: '<'= f, which returns the integer 1 if e is less than or equal to f, else returns 0.
    • MINUS

      public static final OperatorNode.Operator MINUS
      The binary subtraction operator -, as in e-f. If both operands are numeric, returns the numeric difference. Also used in the case where e has pointer type and f is an integer (in which case the result is a pointer of the same type as e), and in the case where e and f are both pointers of the same type, in which case the result is an integer.
    • MINUSEQ

      public static final OperatorNode.Operator MINUSEQ
      The subtraction assignment operator -=, as in e-=f, which performs subtraction e-f and stores the result in e.
    • MOD

      public static final OperatorNode.Operator MOD
      The integer modulus operator %, as in e%f.
    • MODEQ

      public static final OperatorNode.Operator MODEQ
      The integer modulus assignment operator %=, which stores the result of e%f in e.
    • NEQ

      public static final OperatorNode.Operator NEQ
      The not-equals operator !=, as in e!=f, which returns the integer 1 if the two arguments are not equal, else returns the integer 0. The arguments must have scalar type.
    • NOT

      public static final OperatorNode.Operator NOT
      The logical not operator !, as in !e which returns the integer 1 if e is zero, else returns 0.
    • OLD

      public static final OperatorNode.Operator OLD
      The ACSL \old operator.
    • PLUS

      public static final OperatorNode.Operator PLUS
      The binary addition operator +, as in e+f. If both arguments are numeric, the result is the numeric sum; if one argument is a pointer and the other an integer, the result is a pointer of the same type as the pointer operand.
    • PLUSEQ

      public static final OperatorNode.Operator PLUSEQ
      The addition assignment operator += as in lhs+=rhs. Stores the result of lhs+rhs in lhs.
    • POSTDECREMENT

      public static final OperatorNode.Operator POSTDECREMENT
      The post-decrement operator --, as in e--, which subtracts one from e, storing the result in e, and returns the original value of e.
    • POSTINCREMENT

      public static final OperatorNode.Operator POSTINCREMENT
      The post-increment operator ++, as in e++, which adds one to e, storing the result in e, and returns the original value of e.
    • PREDECREMENT

      public static final OperatorNode.Operator PREDECREMENT
      The pre-decrement operator --, as in --e, which subtracts one from e, storing the result in e, and returns the decremented result.
    • PREINCREMENT

      public static final OperatorNode.Operator PREINCREMENT
      The pre-increment operator ++, as in ++e, which adds one to e, storing the result in e, and returns the incremented result.
    • SHIFTLEFT

      public static final OperatorNode.Operator SHIFTLEFT
      The shift-left operator invalid input: '<'invalid input: '<' , as in e invalid input: '<'invalid input: '<' f, which returns the integer obtained by shifting the bits comprising integer e f units to the left.
    • SHIFTLEFTEQ

      public static final OperatorNode.Operator SHIFTLEFTEQ
      The shift left assignment operator invalid input: '<'invalid input: '<'= , as in e invalid input: '<'invalid input: '<'= f, which stores in e the result of e invalid input: '<'invalid input: '<' f.
    • SHIFTRIGHT

      public static final OperatorNode.Operator SHIFTRIGHT
      The shift-right operator >> , as in e >> f , which returns the integer obtained by shifting the bits comprising integer e f units to the right.
    • SHIFTRIGHTEQ

      public static final OperatorNode.Operator SHIFTRIGHTEQ
      The shift right assignment operator >>= , as in e >>= f, which stores in e the result of e >> f.
    • SUBSCRIPT

      public static final OperatorNode.Operator SUBSCRIPT
      The array subscript operator [], as in a[i] , which returns the element in position i of array a.
    • TIMES

      public static final OperatorNode.Operator TIMES
      The multiplication operator *, as in e*f.
    • TIMESEQ

      public static final OperatorNode.Operator TIMESEQ
      The multiplication assignment operator *=, as in e*=f, which stores in e the result of e*f.
    • UNARYMINUS

      public static final OperatorNode.Operator UNARYMINUS
      The unary minus operator -, as in -e, which return the numeric negation of the number e.
    • UNARYPLUS

      public static final OperatorNode.Operator UNARYPLUS
      The unary plus operator +, as in +e, which returns e.
    • VALID

      public static final OperatorNode.Operator VALID
      ACSL Valid operator
  • Method Details

    • values

      public static OperatorNode.Operator[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OperatorNode.Operator valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null