| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Z3.Tagged.Eval
Synopsis
- type EvalAst s a = AST s -> Eval s a
- eval :: EvalAst s (AST s)
- evalT :: Traversable t => t (AST s) -> Eval s (t (AST s))
- mapEval :: Traversable t => EvalAst s a -> t (AST s) -> Eval s (t a)
- evalBool :: EvalAst s Bool
- evalInt :: EvalAst s Integer
- evalReal :: EvalAst s Rational
- evalBv :: Bool -> EvalAst s Integer
- evalFunc :: FuncDecl s -> Eval s FuncModel
- runWithModel :: Eval s a -> Z3 s (Maybe a)
Documentation
type EvalAst s a = AST s -> Eval s a Source #
Type of an evaluation function for '(AST s)'.
Evaluation may fail (i.e. return Nothing) for a few
reasons, see modelEval.
evalT :: Traversable t => t (AST s) -> Eval s (t (AST s)) Source #
Evaluate a collection of (AST s) nodes in the given model.
mapEval :: Traversable t => EvalAst s a -> t (AST s) -> Eval s (t a) Source #
Run a evaluation function on a Traversable data structure of '(AST s)'s
(e.g. [(AST s)], Vector (AST s), Maybe (AST s), etc).
This a generic version of evalT which can be used in combination with
other helpers. For instance, mapEval evalInt can be used to obtain
the Integer interpretation of a list of '(AST s)' of sort int.
evalBool :: EvalAst s Bool Source #
Evaluate an (AST s) node of sort bool in the given model.
See modelEval and getBool.
evalInt :: EvalAst s Integer Source #
Evaluate an (AST s) node of sort int in the given model.
See modelEval and getInt.
evalReal :: EvalAst s Rational Source #
Evaluate an (AST s) node of sort real in the given model.
See modelEval and getReal.
Evaluate an (AST s) node of sort bit-vector in the given model.
The flag signed decides whether the bit-vector value is interpreted as a signed or unsigned integer.
See modelEval and getBv.
runWithModel :: Eval s a -> Z3 s (Maybe a) Source #