cryptol-2.2.1: Cryptol: The Language of Cryptography

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

Cryptol.Prims.Eval

Description

 

Synopsis

Documentation

ecDemoteV :: Value Source

Make a numeric constant.

modExp Source

Arguments

:: Integer

bit size of the resulting word

-> Integer

base

-> Integer

exponent

-> Integer 

Create a packed word

doubleAndAdd Source

Arguments

:: Integer

base

-> Integer

exponent mask

-> Integer

modulus

-> Integer 

type GenBinary b w = TValue -> GenValue b w -> GenValue b w -> GenValue b w Source

type GenUnary b w = TValue -> GenValue b w -> GenValue b w Source

liftBinArith :: (Integer -> Integer -> Integer) -> BinArith Source

Turn a normal binop on Integers into one that can also deal with a bitsize.

divWrap :: Integral a => a -> a -> a Source

modWrap :: Integral a => a -> a -> a Source

lexCompare :: TValue -> Value -> Value -> Ordering Source

Lexicographic ordering on two values.

cmpOrder :: (Ordering -> Bool) -> Binary Source

Process two elements based on their lexicographic ordering.

joinV :: TValue -> TValue -> 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 :: (forall a. Bits a => a -> a -> a) -> Binary Source

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

logicUnary :: (forall a. Bits a => a -> a) -> Unary Source

logicShift Source

Arguments

:: (Integer -> Integer -> Int -> Integer)

the Integer value (argument 2) may contain junk bits, but the Int (argument 3) will always be clean

-> (TValue -> TValue -> [Value] -> Int -> [Value]) 
-> Value 

indexPrimOne :: (Maybe Integer -> [Value] -> Integer -> Value) -> Value Source

Indexing operations that return one element.

indexPrimMany :: (Maybe Integer -> [Value] -> [Integer] -> [Value]) -> Value Source

Indexing operations that return many elements.

randomV :: TValue -> Integer -> Value Source

Produce a random value with the given seed. If we do not support making values of the given type, return zero of that type. TODO: do better than returning zero

tlamN :: (Nat' -> GenValue b w) -> GenValue b w Source