java.lang.Object
java.lang.Enum<SymbolicExpression.SymbolicOperator>
dev.civl.sarl.IF.expr.SymbolicExpression.SymbolicOperator
- All Implemented Interfaces:
Serializable,Comparable<SymbolicExpression.SymbolicOperator>,Constable
- Enclosing interface:
SymbolicExpression
public static enum SymbolicExpression.SymbolicOperator
extends Enum<SymbolicExpression.SymbolicOperator>
An enumerated type for the different kinds of symbolic expressions.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOperator for an expression representing the sum of its arguments.Operator for an expression representing the conjunction of symbolic expressions of boolean type.Operator for an expression representing the application of a function to some arguments.A concrete array.Operator for an array expression of type T[] formed by providing a function f from integers to T.Operator for an expression representing the result of reading an element from an array.Operator for an expression representing the array resulting from modifying a single element of an array.Operator for an expression representing the result of applying bit-wise and operation on two given unsigned integers.Operator for an expression representing the result of applying bit-wise not operation on the given unsigned integers.Operator for an expression representing the result of applying bit-wise or operation on two given unsigned integers.Operator for an expression representing the result of applying bit-wise left shifting operation on two given values.Operator for an expression representing the result of applying bit-wise right shifting operation on two given values.Operator for an expression representing the result of applying bit-wise exclusive-or operation on two given unsigned integers.Operator for an expression representing the result of converting a value from one type to another.TODO: this will go away in the refactoring.Operator for a conditional expression, also known as "if-then-else", as in C's ternary expressionarg0 ? arg1 : arg2.Operator for expression that represents the result of multiple writes to distinct concrete positions in an array.Operator representing the result of multiple writes to different components of a tuple.The (partial) derivative operator.A predicate which declares a real-valued function to have some number of continuous derivatives over a bounded, rectangular, closed interval in R^n.Operator for real number division.Operator for comparison of two values for equality.Operator for for existential quantification: ∃ x .Operator for for universal quantification: ∀ x .Operator for integer division.Operator for a lambda expression, as in the lambda calculus: λ x .Operator for getting the length of an array.Operator for a less-than expression: x < y.Operator for a less-than-or-equals expression: x ≤ y .The integer modulus operator.Operator for an expression representing the numerical product of symbolic expressions.Operator for numerical negation, i.e., - x.Operator for comparison of two values for inequality.Operator for logical negation ("not").Operator used to represent no symbolic expression in cases where Java'snullis not acceptable.Operator for an expression representing the disjunction of symbolic expressions of boolean type.Operator for exponentiation, i.e., the raising of some number to some power: x y.Operator for numerical subtraction: x − y.Operator used to represent a symbolic constant.A concrete tuple.Operator for an expression representing the result of reading a component of a tuple.Operator for an expression representing the result of modifying a single component of a tuple.Operator for extracting an element of aSymbolicUnionTypeto an element of a member type.Operator for injecting an element of a member type into aSymbolicUnionTypethat includes that member type.Operator to determine whether an expression in aSymbolicUnionTypeis in the image of injection from a specified member type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static SymbolicExpression.SymbolicOperator[]values()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
-
Enum Constant Details
-
ADD
Operator for an expression representing the sum of its arguments. The arguments and the expression are all instances ofNumericExpression. The arguments must all have the same numeric (integer or real) type, which is also the type of the expression. There can be any number of arguments (including 0). The sum with 0 arguments is equivalent to the 0 of the type of the expression. -
AND
Operator for an expression representing the conjunction of symbolic expressions of boolean type. The arguments and the expression are all instances ofBooleanExpression. The arguments and the expression itself all have boolean type. There can be any number of arguments (including 0). The conjunction with 0 arguments is equivalent to the "true" expression.- See Also:
-
APPLY
Operator for an expression representing the application of a function to some arguments. Takes 2 arguments. Arg0 is aSymbolicExpressionofSymbolicFunctionType. Arg1 is ancontaining the ordered sequence of arguments to the function.Iterable<? extendsSymbolicExpression> -
ARRAY
A concrete array. The arguments are the elements of the array. -
ARRAY_LAMBDA
Operator for an array expression of type T[] formed by providing a function f from integers to T. Has one argument: a symbolic expression f ofSymbolicFunctionType. Note that the length of the array may (or may not) be specified in the type of the resulting expression. -
ARRAY_READ
Operator for an expression representing the result of reading an element from an array. 2 arguments. Arg0 is the array expression (a symbolic expression ofSymbolicArrayType), Arg1 is the index expression (aSymbolicExpressionof integer type).- See Also:
-
ARRAY_WRITE
Operator for an expression representing the array resulting from modifying a single element of an array. 3 Arguments. Arg0 is the original array expression, arg1 is the index expression, arg2 is the new value being assigned to that position in the array.- See Also:
-
BIT_AND
Operator for an expression representing the result of applying bit-wise and operation on two given unsigned integers. 2 arguments: Both Arg0 and Arg1 are unsigned integers. -
BIT_NOT
Operator for an expression representing the result of applying bit-wise not operation on the given unsigned integers. a arguments: Arg0 is an unsigned integer. -
BIT_OR
Operator for an expression representing the result of applying bit-wise or operation on two given unsigned integers. 2 arguments: Both Arg0 and Arg1 are unsigned integers. -
BIT_XOR
Operator for an expression representing the result of applying bit-wise exclusive-or operation on two given unsigned integers. 2 arguments: Both Arg0 and Arg1 are unsigned integers. -
BIT_SHIFT_LEFT
Operator for an expression representing the result of applying bit-wise left shifting operation on two given values. 2 arguments: Both Arg0 and Arg1 are integers or unsigned integers. -
BIT_SHIFT_RIGHT
Operator for an expression representing the result of applying bit-wise right shifting operation on two given values. 2 arguments: Both Arg0 and Arg1 are integers or unsigned integers. -
CAST
Operator for an expression representing the result of converting a value from one type to another. 1 argument: the value being cast. TheSymbolicExpression.type()method in this expression yields the new type to which the element is being cast. -
CONCRETE
TODO: this will go away in the refactoring. Operator for a concrete value acting as a symbolic expression. One argument, which is the concrete value. Argument may beBooleanObject,NumberObject,CharObject, or an. The last case is used to represent concrete values for arrays or tuples.Iterable<? extendsSymbolicExpression> -
COND
Operator for a conditional expression, also known as "if-then-else", as in C's ternary expressionarg0 ? arg1 : arg2. 3 arguments. Arg0 is the boolean predicate expression (an instance ofBooleanExpression), arg1 is the expression which is the result if arg0 evaluates totrue, arg2 the expression which is the result if arg0 evaluates tofalse. arg1 and arg2 must have the same type, which is the type of the conditional expression. -
DENSE_ARRAY_WRITE
Operator for expression that represents the result of multiple writes to distinct concrete positions in an array. 2 arguments. Arg0 is an expression ofSymbolicArrayTypeT[]. Arg1 is an. Say the elements of the iterable object are v0 ,...,vn-1. Each element of the sequence is either NULL (i.e., the expression with operatorIterable<? extendsSymbolicExpression>NULL) or an expression of type T. The dense array write expression represents the result of starting with arg0 and then for each i for which vi is non-NULL, setting the array element in position i to vi. It is thus equivalent to a sequence of array write operations (which can be performed in any order since they are to distinct positions). It is included here to allow a dense representation of the array, which can have performance benefits, in particular constant-time lookup and modification (just like for regular concrete arrays).- See Also:
-
DENSE_TUPLE_WRITE
Operator representing the result of multiple writes to different components of a tuple. Similar toDENSE_ARRAY_WRITE. Arg0 is an expression ofSymbolicTupleType. Arg1 is an. The writes to the components of the tuple are taken from arg1 in order. Entries which are NULL are ignored (as with arrays). The number of elements in arg1 may be less than the number of components in the tuple, in which case only those elements are used. If the length of arg1 is greater, the extra elements are ignored.Iterable<? extendsSymbolicExpression>- See Also:
-
DERIV
The (partial) derivative operator. Arg0 is an expression of type function from R^n to R, for some positive integer n. Arg1 is anIntObjectwhich is a concrete integer in [0,n); it is the index of the independent variable with respect to which the derivative is being taken. Arg2 is anIntObjectwhich is a natural number and is the degree of the derivative (i.e., the number of compositions of the derivative operator). -
DIFFERENTIABLE
A predicate which declares a real-valued function to have some number of continuous derivatives over a bounded, rectangular, closed interval in R^n. Arg0 is a function from R^n to R for some positive integer n. Arg1 is the degree, a nonnegative integerIntObjectwhich tells the number of partial derivatives (of any combination) that exist and are continuous. Arg2 is a sequence of real-value expressions which are the lower bounds of the intervals in the domain; the length is n. Arg3 is a similar sequence of upper bounds. Degree 0 means the function is continuous on the domain. -
DIVIDE
Operator for real number division. 2 arguments: arg0 the numerator, arg1 the denominator. Both must be symbolic expressions ofSymbolicRealType. Result also hasSymbolicRealType.- See Also:
-
EQUALS
Operator for comparison of two values for equality. Two arguments of any type or kind, not necessarily onlyNumericExpressions. Result is aBooleanExpression.- See Also:
-
EXISTS
Operator for for existential quantification: ∃ x . e. 2 arguments. arg0 is aSymbolicConstantx, the bound variable. Arg1 is e, aBooleanExpressionwhich may involve x. Result has boolean type.- See Also:
-
FORALL
Operator for for universal quantification: ∀ x . e. 2 arguments. arg0 is aSymbolicConstantx, the bound variable. Arg1 is e, aBooleanExpressionwhich may involve x. Result has boolean type.- See Also:
-
INT_DIVIDE
Operator for integer division. Two arguments, bothSymbolicExpressions ofSymbolicIntegerType. Arg0 is the numerator, arg1 the denominator. Result hasSymbolicIntegerType. Result is obtained by rounding towards 0. Undefined behavior if denominator is not positive.- See Also:
-
LAMBDA
Operator for a lambda expression, as in the lambda calculus: λ x . e. Two arguments. Arg0 is aSymbolicConstantx, the bound variable. Arg1 is e, aSymbolicExpressionpossibly involving x. The result hasSymbolicFunctionTypeand represents the function of one variable which, given x returns e. -
LENGTH
Operator for getting the length of an array. Has 1 argument, arg0, which is the array expression, aSymbolicExpressionof typeSymbolicArrayType. Result hasSymbolicIntegerType. -
LESS_THAN
Operator for a less-than expression: x < y. Two arguments, both instances ofNumericExpressionwith the same numeric type. Arg0 is x, arg1 is y. Result has boolean type.- See Also:
-
LESS_THAN_EQUALS
Operator for a less-than-or-equals expression: x ≤ y . Two arguments, both instances ofNumericExpressionwith the same numeric type. Arg0 is x, arg1 is y. Result has boolean type.- See Also:
-
MODULO
The integer modulus operator. Takes 2 arguments, result represents x mod y (orx%yin C). Arg0 is x, arg1 is y. Both arguments and the result areNumericExpressions ofSymbolicIntegerType. Undefined behavior if y is not positive.- See Also:
-
MULTIPLY
Operator for an expression representing the numerical product of symbolic expressions. Can have any number of arguments, all of same numeric type. Result is also aNumericExpression.- See Also:
-
NEGATIVE
Operator for numerical negation, i.e., - x. 1 argument, which is aNumericExpression. The result is aNumericExpressionof the same type as that of the argument. -
NEQ
Operator for comparison of two values for inequality. Two arguments, both symbolic expressions of the same type. Result is aBooleanExpression.- See Also:
-
NOT
Operator for logical negation ("not"). Takes one argument, aBooleanExpression. Result is aBooleanExpression.- See Also:
-
NULL
Operator used to represent no symbolic expression in cases where Java'snullis not acceptable. This is the only kind ofSymbolicExpressionthat has anulltype! Takes no arguments. -
OR
Operator for an expression representing the disjunction of symbolic expressions of boolean type. Has any number of arguments, all of boolean type. Result is also aBooleanExpression.- See Also:
-
POWER
Operator for exponentiation, i.e., the raising of some number to some power: x y. Takes two arguments: arg0 is the base x, arg1 is the exponent y. The exponent can be either aNumericExpressionor anIntObject. In the latter case, the int must be non-negative. -
SUBTRACT
Operator for numerical subtraction: x − y. Two arguments, bothNumericExpressions of the same type: arg0 is x, arg1 is y. Result is also aNumericExpressionof the same type. -
SYMBOLIC_CONSTANT
Operator used to represent a symbolic constant. Takes one argument, aStringObject, which gives the name of the symbolic constant. Note that a symbolic constant can have anySymbolicType, including aSymbolicFunctionType. -
TUPLE
A concrete tuple. The arguments are the components of the tuple. -
TUPLE_READ
Operator for an expression representing the result of reading a component of a tuple. Takes two arguments: arg0 is the tuple expression, arg1 is anIntObjectgiving the index into the tuple.- See Also:
-
TUPLE_WRITE
Operator for an expression representing the result of modifying a single component of a tuple. Takes three arguments: arg0 is the original expression ofSymbolicTupleType, arg1 is anIntObjectspecifying the index into the tuple, and arg2 is the expression that will be the new value for specified component. The result represents the tuple that is the same as arg0, except in component arg1, where the value is arg2.- See Also:
-
UNION_EXTRACT
Operator for extracting an element of aSymbolicUnionTypeto an element of a member type. Takes 2 arguments: arg0 is anIntObjectgiving the index of a member type of a union type; arg1 is aSymbolicExpressionwhose type is the union type. The resulting expression has type the specified member type. This essentially pulls the expression out of the union and casts it to the member type. If arg1 does not belong to the member type (as determined by aUNION_TESTexpression), the value of this expression is undefined. -
UNION_INJECT
Operator for injecting an element of a member type into aSymbolicUnionTypethat includes that member type. Takes 2 arguments: arg0 is anIntObjectgiving the index of the member type of the union type; arg1 is aSymbolicExpressionwhose type is the member type. The union type itself is the type of theUNION_INJECTexpression. -
UNION_TEST
Operator to determine whether an expression in aSymbolicUnionTypeis in the image of injection from a specified member type. Takes 2 arguments: arg0 is anIntObjectgiving the index of a member type of the union type; arg1 is aSymbolicExpressionwhose type is the union type. This is a boolean-valued expression whose value istrueiff arg1 belongs to the specified member type of the union type.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-