Class NumericOperation
- java.lang.Object
-
- it.unive.lisa.symbolic.value.operator.binary.NumericOperation
-
- All Implemented Interfaces:
Operator
,BinaryOperator
- Direct Known Subclasses:
BitwiseAnd
,BitwiseOr
,BitwiseShiftLeft
,BitwiseShiftRight
,BitwiseUnsignedShiftRight
,BitwiseXor
,Numeric16BitAdd
,Numeric16BitDiv
,Numeric16BitMod
,Numeric16BitMul
,Numeric16BitSub
,Numeric32BitAdd
,Numeric32BitDiv
,Numeric32BitMod
,Numeric32BitMul
,Numeric32BitSub
,Numeric64BitAdd
,Numeric64BitDiv
,Numeric64BitMod
,Numeric64BitMul
,Numeric64BitSub
,Numeric8BitAdd
,Numeric8BitDiv
,Numeric8BitMod
,Numeric8BitMul
,Numeric8BitSub
,NumericNonOverflowingAdd
,NumericNonOverflowingDiv
,NumericNonOverflowingMod
,NumericNonOverflowingMul
,NumericNonOverflowingSub
public abstract class NumericOperation extends java.lang.Object implements BinaryOperator
A common implementation for classes implementingBinaryOperator
, providing atypeInference(TypeSystem, Set, Set)
implementation that returns an empty set if noNumericType
, and the result ofNumericType.commonNumericalType(Set, Set)
otherwise.
-
-
Constructor Summary
Constructors Constructor Description NumericOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Type>
typeInference(TypeSystem types, java.util.Set<Type> left, java.util.Set<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.
-
-
-
Method Detail
-
typeInference
public java.util.Set<Type> typeInference(TypeSystem types, java.util.Set<Type> left, java.util.Set<Type> right)
Description copied from interface:BinaryOperator
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.- Specified by:
typeInference
in interfaceBinaryOperator
- Parameters:
types
- the type system knowing about the types of the current programleft
- 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
-
-