Class BitwiseShiftRight
- java.lang.Object
-
- it.unive.lisa.symbolic.value.operator.binary.NumericOperation
-
- it.unive.lisa.symbolic.value.operator.binary.BitwiseShiftRight
-
- All Implemented Interfaces:
Operator
,BinaryOperator
,BitwiseOperator
public class BitwiseShiftRight extends NumericOperation implements BitwiseOperator
Given two expressions that both evaluate to numeric values, aBinaryExpression
using this operator computes a new number built with the bits of the first argument's value shifted to the right by an amount specified by the second argument's value. Excess bits on the right are dropped, while new bits on the left preserve the sign of the original first argument's value: if it was negative, bits are set to1
, otherwise they are set to0
.
First argument expression type: anyNumericType
Second argument expression type: anyNumericType
Computed expression type:NumericType
-
-
Field Summary
Fields Modifier and Type Field Description static BitwiseShiftRight
INSTANCE
The singleton instance of this class.
-
Constructor Summary
Constructors Modifier Constructor Description protected
BitwiseShiftRight()
Builds the operator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
-
Methods inherited from class it.unive.lisa.symbolic.value.operator.binary.NumericOperation
typeInference
-
-
-
-
Field Detail
-
INSTANCE
public static final BitwiseShiftRight INSTANCE
The singleton instance of this class.
-
-
Constructor Detail
-
BitwiseShiftRight
protected BitwiseShiftRight()
Builds the operator. This constructor is visible to allow subclassing: instances of this class should be unique, and the singleton can be retrieved through fieldINSTANCE
.
-
-