Copyright | (c) 2013-2016 Galois Inc. |
---|---|
License | BSD3 |
Maintainer | cryptol@galois.com |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
- type SBool = SVal
- type SWord = SVal
- literalSWord :: Int -> Integer -> SWord
- fromBitsLE :: [SBool] -> SWord
- forallBV_ :: Int -> Symbolic SWord
- existsBV_ :: Int -> Symbolic SWord
- forallSBool_ :: Symbolic SBool
- existsSBool_ :: Symbolic SBool
- type Value = GenValue SBool SWord
- data TValue
- isTBit :: TValue -> Bool
- tvSeq :: Nat' -> TValue -> TValue
- data GenValue b w
- = VRecord ![(Ident, Eval (GenValue b w))]
- | VTuple ![Eval (GenValue b w)]
- | VBit !b
- | VSeq !Integer !(SeqMap b w)
- | VWord !Integer !(Eval (WordValue b w))
- | VStream !(SeqMap b w)
- | VFun (Eval (GenValue b w) -> Eval (GenValue b w))
- | VPoly (TValue -> Eval (GenValue b w))
- | VNumPoly (Nat' -> Eval (GenValue b w))
- lam :: (Eval (GenValue b w) -> Eval (GenValue b w)) -> GenValue b w
- tlam :: (TValue -> GenValue b w) -> GenValue b w
- toStream :: [GenValue b w] -> Eval (GenValue b w)
- toFinSeq :: BitWord b w => Integer -> TValue -> [GenValue b w] -> GenValue b w
- toSeq :: BitWord b w => Nat' -> TValue -> [GenValue b w] -> Eval (GenValue b w)
- fromVBit :: GenValue b w -> b
- fromVFun :: GenValue b w -> Eval (GenValue b w) -> Eval (GenValue b w)
- fromVPoly :: GenValue b w -> TValue -> Eval (GenValue b w)
- fromVTuple :: GenValue b w -> [Eval (GenValue b w)]
- fromVRecord :: GenValue b w -> [(Ident, Eval (GenValue b w))]
- lookupRecord :: Ident -> GenValue b w -> Eval (GenValue b w)
- fromSeq :: forall b w. BitWord b w => String -> GenValue b w -> Eval (SeqMap b w)
- fromVWord :: BitWord b w => String -> GenValue b w -> Eval w
- evalPanic :: String -> [String] -> a
- iteSValue :: SBool -> Value -> Value -> Value
- mergeValue :: Bool -> SBool -> Value -> Value -> Value
- mergeWord :: Bool -> SBool -> WordValue SBool SWord -> WordValue SBool SWord -> WordValue SBool SWord
- mergeBit :: Bool -> SBool -> SBool -> SBool -> SBool
- mergeBits :: Bool -> SBool -> Seq (Eval SBool) -> Seq (Eval SBool) -> Seq (Eval SBool)
- mergeSeqMap :: Bool -> SBool -> SeqMap SBool SWord -> SeqMap SBool SWord -> SeqMap SBool SWord
Documentation
fromBitsLE :: [SBool] -> SWord Source #
An evaluated type of kind *. These types do not contain type variables, type synonyms, or type functions.
Generic value type, parameterized by bit and word types.
NOTE: we maintain an important invariant regarding sequence types.
VSeq
must never be used for finite sequences of bits.
Always use the VWord
constructor instead! Infinite sequences of bits
are handled by the VStream
constructor, just as for other types.
VRecord ![(Ident, Eval (GenValue b w))] | { .. } |
VTuple ![Eval (GenValue b w)] | ( .. ) |
VBit !b | Bit |
VSeq !Integer !(SeqMap b w) |
|
VWord !Integer !(Eval (WordValue b w)) | [n]Bit |
VStream !(SeqMap b w) | [inf]a |
VFun (Eval (GenValue b w) -> Eval (GenValue b w)) | functions |
VPoly (TValue -> Eval (GenValue b w)) | polymorphic values (kind *) |
VNumPoly (Nat' -> Eval (GenValue b w)) | polymorphic values (kind #) |
toSeq :: BitWord b w => Nat' -> TValue -> [GenValue b w] -> Eval (GenValue b w) Source #
Construct either a finite sequence, or a stream. In the finite case, record whether or not the elements were bits, to aid pretty-printing.
fromVFun :: GenValue b w -> Eval (GenValue b w) -> Eval (GenValue b w) Source #
Extract a function from a value.
fromVPoly :: GenValue b w -> TValue -> Eval (GenValue b w) Source #
Extract a polymorphic function from a value.
fromVRecord :: GenValue b w -> [(Ident, Eval (GenValue b w))] Source #
Extract a record from a value.
fromSeq :: forall b w. BitWord b w => String -> GenValue b w -> Eval (SeqMap b w) Source #
Extract a sequence.
mergeWord :: Bool -> SBool -> WordValue SBool SWord -> WordValue SBool SWord -> WordValue SBool SWord Source #
mergeSeqMap :: Bool -> SBool -> SeqMap SBool SWord -> SeqMap SBool SWord -> SeqMap SBool SWord Source #