Copyright | (c) 2013-2016 Galois Inc. |
---|---|
License | BSD3 |
Maintainer | cryptol@galois.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
- moduleEnv :: EvalPrims b w => Module -> GenEvalEnv b w -> Eval (GenEvalEnv b w)
- runEval :: Eval a -> IO a
- data Eval a
- type EvalEnv = GenEvalEnv Bool BV
- emptyEnv :: GenEvalEnv b w
- evalExpr :: EvalPrims b w => GenEvalEnv b w -> Expr -> Eval (GenValue b w)
- evalDecls :: EvalPrims b w => [DeclGroup] -> GenEvalEnv b w -> Eval (GenEvalEnv b w)
- data EvalError
- forceValue :: GenValue b w -> Eval ()
Documentation
:: EvalPrims b w | |
=> Module | Module containing declarations to evaluate |
-> GenEvalEnv b w | Environment to extend |
-> Eval (GenEvalEnv b w) |
Extend the given evaluation environment with all the declarations contained in the given module.
The monad for Cryptol evaluation.
emptyEnv :: GenEvalEnv b w Source #
Evaluation environment with no bindings
:: EvalPrims b w | |
=> GenEvalEnv b w | Evaluation environment |
-> Expr | Expression to evaluate |
-> Eval (GenValue b w) |
Evaluate a Cryptol expression to a value. This evaluator is parameterized
by the EvalPrims
class, which defines the behavior of bits and words, in
addition to providing implementations for all the primitives.
:: EvalPrims b w | |
=> [DeclGroup] | Declaration groups to evaluate |
-> GenEvalEnv b w | Environment to extend |
-> Eval (GenEvalEnv b w) |
Extend the given evaluation environment with the result of evaluating the given collection of declaration groups.
Data type describing errors that can occur during evaluation.
InvalidIndex Integer | Out-of-bounds index |
TypeCannotBeDemoted Type | Non-numeric type passed to demote function |
DivideByZero | Division or modulus by 0 |
WordTooWide Integer | Bitvector too large |
UserError String | Call to the Cryptol |
LoopError String | Detectable nontermination |
forceValue :: GenValue b w -> Eval () Source #
Force the evaluation of a value