úÎCª>@D      !"#$%&'()*+,-./0123456789:;<=>?@ABCIago Abal <iago.abal@gmail.com>NoneD An alias for .  Big-endian pseudo size-polymorphic bit-vectors. The size of a bit-vector. 0The value of a bit-vector, as a natural number.  An alias for .  An alias for . 2'$s complement value of a bit-vector. 7Create a bit-vector given a size and an integer value.  bitVec 4 3[4]3,This function also handles negative values.  bitVec 4 (-1)[4]15Create a mask of ones. Create a mask of zeros. Fixed-size equality. In contrast with D , which is size-polymorphic, this equality 0 requires both bit-vectors to be of equal size.  [n]k ==. [m]kFalse [n]k ==. [n]kTrue Fixed-size inequality. The negated version of  .  Fixed-size  less-than.  Fixed-size less-than-or-equals.  Fixed-size  greater-than.  Fixed-size greater-than-or-equals. Fixed-size signed  less-than. Fixed-size signed less-than-or-equals. Fixed-size signed  greater-than. Fixed-size signed greater-than-or-equals. Bit indexing. u @. i stands for the i -th bit of u.  [4]2 @. 0False [4]2 @. 1True index i a == a @. iBit-string extraction.  u @@ (j,i) == fromBits (map (u @ .) [j,j-1..i]) [4]7 @@ (3,1)[3]3 extract j i a == a @@ (j,i)Reverse bit-indexing. .Index starting from the most significant bit.   u !. i == u @. (size u - i - 1) [3]3 !. 0FalseTake least significant bits. least m u == u @@ (m-1,0)Take most significant bits. most m u == u @@ (n-1,n-m)Most significant bit. msb u == u !. 0Least significant bit.  lsb u == u @. 0Most significant 1-bit. Pre: input must be non-zero.  msb1 [4]21 msb1 [4]422's complement signed division. 2'7s complement signed remainder (sign follows dividend). 2'6s complement signed remainder (sign follows divisor). !Ceiling logarithm base 2. Pre%: input bit-vector must be non-zero. ""Concatenation of two bit-vectors. #"Concatenation of two bit-vectors. $Logical extension. zeroExtend 3 [1]1[4]1%Arithmetic extension. signExtend 2 [2]1[4]1signExtend 2 [2]3[4]15& %foldl_ f z (fromBits [un, ..., u1, u0] ) == ((((z `f` un) `f` ...) `f` u1) `f` u0) *foldl_ f e = fromBits . foldl f e . toBits' %foldr_ f z (fromBits [un, ..., u1, u0]) == un `f` (... `f` (u1 `f` (u0 `f` z))) *foldr_ f e = fromBits . foldr f e . toBits( 'reverse_ == fromBits . reverse . toBits)Pre: if replicate_ n u then n > 0 must hold. 8replicate_ n == fromBits . concat . replicate n . toBits* Conjunction. and_ == foldr1 (.&.)+ Disjunction. or_ == foldr1 (.|.),Split a bit-vector k times.  split 3 [4]15[[2]0,[2]3,[2]3]-Split a bit-vector into n-wide pieces. group_ 3 [4]15 [[3]1,[3]7].#Concatenate a list of bit-vectors. join [[2]3,[2]2][4]14/ An alias for E. 0Negated F. 1Negated G. 2Negated H. 3 Left shift. 4 Left shift. 5Logical right shift. 6Logical right shift. 7Arithmetic right shift 8 Rotate left. 9 Rotate left. :Rotate right. ;Rotate right. <'Create a bit-vector from a single bit. =4Create a bit-vector from a big-endian list of bits. fromBits [False, False, True][3]1>4Create a big-endian list of bits from a bit-vector.  toBits [4]11[True, False, True, True]?"Show a bit-vector in binary form. @!Show a bit-vector in octal form. A'Show a bit-vector in hexadecimal form. B+Greatest natural number representable with n bits. CCMinimum width of a bit-vector to represent a given integer number.  integerWith 43integerWith (-4)4QI  !"#$%&'()*+,-J./0123456789:;<=>?K@ABCLMNOPQRSTU\VWXYZ[\]^_`abcdefghEHGFi  !"#$%&'()*+,-./0123456789:;<=>?@ABCF  !"#$%&'()*+,-./0123456789:;<=>?@ABCNI  !"#$%&'()*+,-J./0123456789:;<=>?K@ABCLMNOPQRSTUj      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKIJLIJMIJNOPQRSTUVWXYZIJ[IJ\IJ]IJ^IJ_IJ`IJaIJbIJcIJdIJeIJfIJgIJhIJiIJjIJkIJlIJmIJnobv-0.2.1Data.BitVector BitVectorBVsizenatwidthuintintbitVeconeszeros==./=.<.<=.>.>=.sltslesgtsge@.index@@extract!.leastmostmsblsbmsb1sdivsremsmodlg2#cat zeroExtend signExtendfoldl_foldr_reverse_ replicate_and_or_splitgroup_joinnot_nandnorxnor<<.shl>>.shrashr<<<.rol>>>.rorfromBoolfromBitstoBitsshowBinshowOctshowHexmaxNat integerWidthghc-prim GHC.Classes==base Data.Bits complement.&..|.xor splitIntegerhexChar$fBitsBV $fIntegralBV$fEnumBV$fRealBV$fNumBV$fOrdBV$fEqBV$fDataBV $fTypeableBV$fShowBVpopCountDefaulttestBitDefault bitDefaultpopCountrotateRrotateL unsafeShiftRshiftR unsafeShiftLshiftLisSignedbitSizetestBit complementBitclearBitsetBitbitrotateshiftBits