Class Numeric16BitAdd
- java.lang.Object
-
- it.unive.lisa.symbolic.value.operator.binary.Numeric16BitAdd
-
- All Implemented Interfaces:
Operator,AdditionOperator,ArithmeticOperator,BinaryOperator,OverflowingOperator
public class Numeric16BitAdd extends java.lang.Object implements AdditionOperator, OverflowingOperator, BinaryOperator
Given two expressions that both evaluate to numeric values, aBinaryExpressionusing this operator computes the arithmetic addition of those values. Both arguments and results are expected to be 16-bits numbers, and this operation thus can overflow/underflow.
First argument expression type:NumericType(16-bit)
Second argument expression type:NumericType(16-bit)
Computed expression type:NumericType(16-bit)
-
-
Field Summary
Fields Modifier and Type Field Description static Numeric16BitAddINSTANCEThe singleton instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()ExternalSet<Type>typeInference(ExternalSet<Type> left, ExternalSet<Type> right)Computes the runtime types of this expression (i.e., of the result of this expression) assuming that the arguments of this expression have the given types.
-
-
-
Field Detail
-
INSTANCE
public static final Numeric16BitAdd INSTANCE
The singleton instance of this class.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
typeInference
public ExternalSet<Type> typeInference(ExternalSet<Type> left, ExternalSet<Type> right)
Description copied from interface:BinaryOperatorComputes the runtime types of this expression (i.e., of the result of this expression) assuming that the arguments of this expression have the given types.- Specified by:
typeInferencein interfaceBinaryOperator- Parameters:
left- the set of types of the left-most argument of this expressionright- the set of types of the right-most argument of this expression- Returns:
- the runtime types of this expression
-
-