| Copyright | Galois Inc. 2016 |
|---|---|
| License | BSD3 |
| Maintainer | huffman@galois.com |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.RME.Vector
Description
Operations on big-endian vectors of RME formulas.
Synopsis
- type RMEV = Vector RME
- eq :: RMEV -> RMEV -> RME
- ule :: RMEV -> RMEV -> RME
- ult :: RMEV -> RMEV -> RME
- sle :: RMEV -> RMEV -> RME
- slt :: RMEV -> RMEV -> RME
- neg :: RMEV -> RMEV
- add :: RMEV -> RMEV -> RMEV
- sub :: RMEV -> RMEV -> RMEV
- mul :: RMEV -> RMEV -> RMEV
- udiv :: RMEV -> RMEV -> RMEV
- urem :: RMEV -> RMEV -> RMEV
- sdiv :: RMEV -> RMEV -> RMEV
- srem :: RMEV -> RMEV -> RMEV
- pmul :: RMEV -> RMEV -> RMEV
- pmod :: RMEV -> RMEV -> RMEV
- pdiv :: RMEV -> RMEV -> RMEV
- shl :: RMEV -> RMEV -> RMEV
- ashr :: RMEV -> RMEV -> RMEV
- lshr :: RMEV -> RMEV -> RMEV
- ror :: RMEV -> RMEV -> RMEV
- rol :: RMEV -> RMEV -> RMEV
- integer :: Int -> Integer -> RMEV
- popcount :: RMEV -> RMEV
- countLeadingZeros :: RMEV -> RMEV
- countTrailingZeros :: RMEV -> RMEV
Documentation
pmul :: RMEV -> RMEV -> RMEV Source #
Polynomial multiplication. Note that the algorithm works the same
no matter which endianness convention is used. Result length is
max 0 (m+n-1), where m and n are the lengths of the inputs.
pmod :: RMEV -> RMEV -> RMEV Source #
Polynomial mod with symbolic modulus. Return value has length one less than the length of the modulus. This implementation is optimized for the (common) case where the modulus is concrete.
pdiv :: RMEV -> RMEV -> RMEV Source #
Polynomial division. Return value has length equal to the first argument.
shl :: RMEV -> RMEV -> RMEV Source #
Bitwise logical left shift. Shifts the bits in the first bit-vector by the unsigned, arithmetic value in the second bit-vector filling in with false bits.
ashr :: RMEV -> RMEV -> RMEV Source #
Arithmetic logical right shift. Shifts the bits in the first bit-vector by the unsigned, arithmetic value in the second bit-vector filling in with bits matching the first bit (which is treated as a sign bit).
lshr :: RMEV -> RMEV -> RMEV Source #
Bitwise logical right shift. Shifts the bits in the first bit-vector by the unsigned, arithmetic value in the second bit-vector filling in with false bits.
ror :: RMEV -> RMEV -> RMEV Source #
Bitwise right rotation. Rotates the bits in the first bit-vector by the unsigned, arithmetic value in the second bit-vector.
rol :: RMEV -> RMEV -> RMEV Source #
Bitwise left rotation. Rotates the bits in the first bit-vector by the unsigned, arithmetic value in the second bit-vector.
countLeadingZeros :: RMEV -> RMEV Source #
countTrailingZeros :: RMEV -> RMEV Source #