cryptol-2.4.0: Cryptol: The Language of Cryptography

Copyright(c) 2013-2016 Galois, Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Cryptol.Symbolic.Prims

Description

 

Synopsis

Documentation

traverseSnd :: Functor f => (a -> f b) -> (t, a) -> f (t, b) Source #

atV :: Bool -> Value -> [Value] -> Value -> Value Source #

replicateV Source #

Arguments

:: Integer

number of elements

-> TValue

type of element

-> Value

element

-> Value 

nth :: a -> [a] -> Int -> a Source #

mapV :: Bool -> (Value -> Value) -> Value -> Value Source #

ecDemoteV :: Value Source #

Make a numeric constant. { val, bits } (fin val, fin bits, bits >= width val) => [bits]

arithBinary :: (SWord -> SWord -> SWord) -> Binary Source #

Models functions of type `{a} (Arith a) => a -> a -> a`

arithUnary :: (SWord -> SWord) -> Unary Source #

Models functions of type `{a} (Arith a) => a -> a`

sLg2 :: SWord -> SWord Source #

Ceiling (log_2 x)

cmpValue :: (SBool -> SBool -> a -> a) -> (SWord -> SWord -> a -> a) -> Value -> Value -> a -> a Source #

cmpBinary :: (SBool -> SBool -> SBool -> SBool) -> (SWord -> SWord -> SBool -> SBool) -> SBool -> Binary Source #

joinV :: Nat' -> Nat' -> TValue -> Value -> Value Source #

Join a sequence of sequences into a single sequence.

ecSplitV :: Value Source #

Split implementation.

infChunksOf :: Integer -> [a] -> [[a]] Source #

Split into infinitely many chunks

finChunksOf :: Integer -> Integer -> [a] -> [[a]] Source #

Split into finitely many chunks

logicBinary :: (SBool -> SBool -> SBool) -> (SWord -> SWord -> SWord) -> Binary Source #

Merge two values given a binop. This is used for and, or and xor.

addPoly :: [SBool] -> [SBool] -> [SBool] Source #

Add two polynomials

ites :: SBool -> [SBool] -> [SBool] -> [SBool] Source #

mdp :: [SBool] -> [SBool] -> ([SBool], [SBool]) Source #

idx :: [SBool] -> Int -> SBool Source #

divx :: Int -> Int -> [SBool] -> [SBool] -> ([SBool], [SBool]) Source #