Safe Haskell | None |
---|---|
Language | Haskell98 |
- type EmbedExpr m e tp = Expression (EmVar m e) (EmQVar m e) (EmFun m e) (EmFunArg m e) (EmLVar m e) e tp
- class (Applicative m, GCompare (EmVar m e), GCompare (EmQVar m e), GCompare (EmFun m e), GCompare (EmFunArg m e), GCompare (EmLVar m e)) => Embed m e where
- class (GCompare (ExVar i e), GCompare (ExQVar i e), GCompare (ExFun i e), GCompare (ExFunArg i e), GCompare (ExLVar i e)) => Extract i e where
- data UserFun m e sig where
- newtype ValueExt m tp = ValueExt {
- valueExt :: EvalResult (UserFun m (ValueExt m)) tp
- newtype BackendInfo b = BackendInfo b
- data SMTExpr var qvar fun farg lvar tp where
- encodeExpr :: Backend b => SMTExpr (Var b) (QVar b) (Fun b) (FunArg b) (LVar b) tp -> SMT b (Expr b tp)
- decodeExpr :: Backend b => Expr b tp -> SMT b (SMTExpr (Var b) (QVar b) (Fun b) (FunArg b) (LVar b) tp)
- data AnalyzedExpr i e tp = AnalyzedExpr (Maybe (Expression (ExVar i e) (ExQVar i e) (ExFun i e) (ExFunArg i e) (ExLVar i e) (AnalyzedExpr i e) tp)) (e tp)
- analyze' :: Extract i e => i -> e tp -> AnalyzedExpr i e tp
- analyze :: Backend b => Expr b tp -> SMT b (AnalyzedExpr (BackendInfo b) (Expr b) tp)
Documentation
type EmbedExpr m e tp = Expression (EmVar m e) (EmQVar m e) (EmFun m e) (EmFunArg m e) (EmLVar m e) e tp Source #
class (Applicative m, GCompare (EmVar m e), GCompare (EmQVar m e), GCompare (EmFun m e), GCompare (EmFunArg m e), GCompare (EmLVar m e)) => Embed m e where Source #
A class of Monad
s that can be used to form SMTLib expressions.
The default instance of this class is the SMT
monad, together with its
associated Expr
type. An interesting instance is the Identity
monad
with the Value
type, which allows evaluation of SMTLib expressions.
type EmVar m e :: Type -> * Source #
type EmQVar m e :: Type -> * Source #
type EmFun m e :: ([Type], Type) -> * Source #
embed :: m (EmbedExpr m e tp) -> m (e tp) Source #
embedQuantifier :: Quantifier -> List Repr arg -> (forall m e. (Embed m e, Monad m) => List (EmQVar m e) arg -> m (e BoolType)) -> m (e BoolType) Source #
embedTypeOf :: m (e tp -> Repr tp) Source #
Embed Identity Repr Source # | |
Embed Identity Value Source # | |
Embed Identity (ValueExt Identity) Source # | |
(GCompare Type var, GetType var, GCompare Type qvar, GetType qvar, GCompare ([Type], Type) fun, GetFunType fun, GCompare Type farg, GetType farg, GCompare Type lvar, GetType lvar) => Embed Identity (SMTExpr var qvar fun farg lvar) Source # | |
Backend b => Embed (SMT b) (Expr b) Source # | |
(Embed m e, Monad m) => Embed (ExceptT err m) e Source # | |
class (GCompare (ExVar i e), GCompare (ExQVar i e), GCompare (ExFun i e), GCompare (ExFunArg i e), GCompare (ExLVar i e)) => Extract i e where Source #
type ExVar i e :: Type -> * Source #
type ExQVar i e :: Type -> * Source #
type ExFun i e :: ([Type], Type) -> * Source #
data UserFun m e sig where Source #
A user-supplied function.
Can be used in embedding Value
s or EvalResult
s.
Since we don't have function equality in haskell, an integer is provided to distinguish functions.
newtype ValueExt m tp Source #
ValueExt | |
|
GCompare Type (ValueExt m) Source # | |
GEq Type (ValueExt m) Source # | |
GShow Type (ValueExt m) Source # | |
Embed Identity (ValueExt Identity) Source # | |
GetType (ValueExt m) Source # | |
type EmVar Identity (ValueExt Identity) Source # | |
type EmQVar Identity (ValueExt Identity) Source # | |
type EmFun Identity (ValueExt Identity) Source # | |
type EmFunArg Identity (ValueExt Identity) Source # | |
type EmLVar Identity (ValueExt Identity) Source # | |
newtype BackendInfo b Source #
data SMTExpr var qvar fun farg lvar tp where Source #
SMTExpr :: Expression var qvar fun farg lvar (SMTExpr var qvar fun farg lvar) tp -> SMTExpr var qvar fun farg lvar tp | |
SMTQuant :: Quantifier -> List Repr args -> (List qvar args -> SMTExpr var qvar fun farg lvar BoolType) -> SMTExpr var qvar fun farg lvar BoolType |
(GCompare Type var, GCompare Type qvar, GCompare ([Type], Type) fun, GCompare Type farg, GCompare Type lvar) => Extract () (SMTExpr var qvar fun farg lvar) Source # | |
(GCompare Type var, GetType var, GCompare Type qvar, GetType qvar, GCompare ([Type], Type) fun, GetFunType fun, GCompare Type farg, GetType farg, GCompare Type lvar, GetType lvar) => Embed Identity (SMTExpr var qvar fun farg lvar) Source # | |
(GetType var, GetType qvar, GetFunType fun, GetType farg, GetType lvar) => GetType (SMTExpr var qvar fun farg lvar) Source # | |
type ExVar () (SMTExpr var qvar fun farg lvar) Source # | |
type ExQVar () (SMTExpr var qvar fun farg lvar) Source # | |
type ExFun () (SMTExpr var qvar fun farg lvar) Source # | |
type ExFunArg () (SMTExpr var qvar fun farg lvar) Source # | |
type ExLVar () (SMTExpr var qvar fun farg lvar) Source # | |
type EmVar Identity (SMTExpr var qvar fun farg lvar) Source # | |
type EmQVar Identity (SMTExpr var qvar fun farg lvar) Source # | |
type EmFun Identity (SMTExpr var qvar fun farg lvar) Source # | |
type EmFunArg Identity (SMTExpr var qvar fun farg lvar) Source # | |
type EmLVar Identity (SMTExpr var qvar fun farg lvar) Source # | |
encodeExpr :: Backend b => SMTExpr (Var b) (QVar b) (Fun b) (FunArg b) (LVar b) tp -> SMT b (Expr b tp) Source #
decodeExpr :: Backend b => Expr b tp -> SMT b (SMTExpr (Var b) (QVar b) (Fun b) (FunArg b) (LVar b) tp) Source #
data AnalyzedExpr i e tp Source #
AnalyzedExpr (Maybe (Expression (ExVar i e) (ExQVar i e) (ExFun i e) (ExFunArg i e) (ExLVar i e) (AnalyzedExpr i e) tp)) (e tp) |
analyze' :: Extract i e => i -> e tp -> AnalyzedExpr i e tp Source #
analyze :: Backend b => Expr b tp -> SMT b (AnalyzedExpr (BackendInfo b) (Expr b) tp) Source #