grisette-0.8.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2021-2023
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Grisette.Internal.Core.Data.Class.SymRotate

Description

 
Synopsis

Documentation

class Bits a => SymRotate a where Source #

The symRotate is similar to rotate, but accepts the type itself instead of Int for the rotate amount. The function works on all inputs, including the rotate amounts that are beyond the bit width of the value.

The symRotateNegated function rotates to the opposite direction of symRotate. This function is introduced to handle the asymmetry of the range of values.

Methods

symRotate :: a -> a -> a Source #

symRotateNegated :: a -> a -> a Source #

Instances

Instances details
SymRotate Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

(Integral a, FiniteBits a) => SymRotate (DefaultFiniteBitsSymRotate a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

(KnownNat n, 1 <= n) => SymRotate (IntN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

symRotate :: IntN n -> IntN n -> IntN n Source #

symRotateNegated :: IntN n -> IntN n -> IntN n Source #

(KnownNat n, 1 <= n) => SymRotate (WordN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

symRotate :: WordN n -> WordN n -> WordN n Source #

symRotateNegated :: WordN n -> WordN n -> WordN n Source #

(forall (n :: Nat). (KnownNat n, 1 <= n) => SymRotate (bv n), forall (n :: Nat). (KnownNat n, 1 <= n) => Num (bv n)) => SymRotate (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

symRotate :: SomeBV bv -> SomeBV bv -> SomeBV bv Source #

symRotateNegated :: SomeBV bv -> SomeBV bv -> SomeBV bv Source #

(KnownNat n, 1 <= n) => SymRotate (SymIntN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

(KnownNat n, 1 <= n) => SymRotate (SymWordN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

newtype DefaultFiniteBitsSymRotate a Source #

A newtype wrapper. Use this to derive SymRotate for types that have FiniteBits instances.

Instances

Instances details
Bits a => Bits (DefaultFiniteBitsSymRotate a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

Methods

(.&.) :: DefaultFiniteBitsSymRotate a -> DefaultFiniteBitsSymRotate a -> DefaultFiniteBitsSymRotate a #

(.|.) :: DefaultFiniteBitsSymRotate a -> DefaultFiniteBitsSymRotate a -> DefaultFiniteBitsSymRotate a #

xor :: DefaultFiniteBitsSymRotate a -> DefaultFiniteBitsSymRotate a -> DefaultFiniteBitsSymRotate a #

complement :: DefaultFiniteBitsSymRotate a -> DefaultFiniteBitsSymRotate a #

shift :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

rotate :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

zeroBits :: DefaultFiniteBitsSymRotate a #

bit :: Int -> DefaultFiniteBitsSymRotate a #

setBit :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

clearBit :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

complementBit :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

testBit :: DefaultFiniteBitsSymRotate a -> Int -> Bool #

bitSizeMaybe :: DefaultFiniteBitsSymRotate a -> Maybe Int #

bitSize :: DefaultFiniteBitsSymRotate a -> Int #

isSigned :: DefaultFiniteBitsSymRotate a -> Bool #

shiftL :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

unsafeShiftL :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

shiftR :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

unsafeShiftR :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

rotateL :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

rotateR :: DefaultFiniteBitsSymRotate a -> Int -> DefaultFiniteBitsSymRotate a #

popCount :: DefaultFiniteBitsSymRotate a -> Int #

Eq a => Eq (DefaultFiniteBitsSymRotate a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

(Integral a, FiniteBits a) => SymRotate (DefaultFiniteBitsSymRotate a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate