Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
type EmbedExpr m e tp = Expression (EmVar m e) (EmQVar m e) (EmFun m e) (EmConstr m e) (EmField m e) (EmFunArg m e) (EmLVar m e) e tp Source
class (Monad m, GCompare (EmVar m e), GCompare (EmQVar m e), GCompare (EmFun m e), GCompare (EmConstr m e), GCompare (EmField m e), GCompare (EmFunArg m e), GCompare (EmLVar m e), Typeable (EmConstr m e)) => Embed m e where Source
type EmVar m e :: Type -> * Source
type EmQVar m e :: Type -> * Source
type EmFun m e :: ([Type], Type) -> * Source
type EmConstr m e :: ([Type], *) -> * Source
type EmField m e :: (*, Type) -> * Source
embed :: EmbedExpr m e tp -> m (e tp) Source
embedQuantifier :: Quantifier -> List Repr arg -> (forall m e. Embed m e => List (EmQVar m e) arg -> m (e BoolType)) -> m (e BoolType) Source
embedConstrTest :: IsDatatype dt => String -> Proxy dt -> e (DataType dt) -> m (e BoolType) Source
embedGetField :: IsDatatype dt => String -> String -> Proxy dt -> Repr tp -> e (DataType dt) -> m (e tp) Source
embedConst :: ConcreteValue tp -> m (e tp) Source
embedTypeOf :: e tp -> m (Repr tp) Source
(GCompare Type var, GetType var, GCompare Type qvar, GetType qvar, GCompare ((,) [Type] Type) fun, GetFunType fun, GCompare ((,) [Type] *) con, GetConType con, GCompare ((,) * Type) field, GetFieldType field, GCompare Type farg, GetType farg, GCompare Type lvar, GetType lvar, Typeable ((,) [Type] * -> *) con) => Embed Identity (SMTExpr var qvar fun con field farg lvar) Source | |
(Backend b, (~) (Type -> *) e (Expr b)) => Embed (SMT b) e Source |
class (GCompare (ExVar i e), GCompare (ExQVar i e), GCompare (ExFun i e), GCompare (ExConstr i e), GCompare (ExField i e), GCompare (ExFunArg i e), GCompare (ExLVar i e), Typeable (ExConstr 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
type ExConstr i e :: ([Type], *) -> * Source
type ExField i e :: (*, Type) -> * Source
extract :: i -> e tp -> Maybe (Expression (ExVar i e) (ExQVar i e) (ExFun i e) (ExConstr i e) (ExField i e) (ExFunArg i e) (ExLVar i e) e tp) Source
(GCompare Type var, GCompare Type qvar, GCompare ((,) [Type] Type) fun, GCompare ((,) [Type] *) con, GCompare ((,) * Type) field, GCompare Type farg, GCompare Type lvar, Typeable ((,) [Type] * -> *) con) => Extract () (SMTExpr var qvar fun con field farg lvar) Source | |
(Backend b, (~) (Type -> *) e (Expr b)) => Extract (BackendInfo b) e Source |
newtype BackendInfo b Source
(Backend b, (~) (Type -> *) e (Expr b)) => Extract (BackendInfo b) e Source | |
type ExVar (BackendInfo b) e = Var b Source | |
type ExQVar (BackendInfo b) e = QVar b Source | |
type ExFun (BackendInfo b) e = Fun b Source | |
type ExConstr (BackendInfo b) e = Constr b Source | |
type ExField (BackendInfo b) e = Field b Source | |
type ExFunArg (BackendInfo b) e = FunArg b Source | |
type ExLVar (BackendInfo b) e = LVar b Source |
data SMTExpr var qvar fun con field farg lvar tp where Source
SMTExpr :: Expression var qvar fun con field farg lvar (SMTExpr var qvar fun con field farg lvar) tp -> SMTExpr var qvar fun con field farg lvar tp | |
SMTQuant :: Quantifier -> List Repr args -> (List qvar args -> SMTExpr var qvar fun con field farg lvar BoolType) -> SMTExpr var qvar fun con field farg lvar BoolType | |
SMTTestCon :: IsDatatype dt => String -> Proxy dt -> SMTExpr var qvar fun con field farg lvar (DataType dt) -> SMTExpr var qvar fun con field farg lvar BoolType | |
SMTGetField :: IsDatatype dt => String -> String -> Proxy dt -> Repr tp -> SMTExpr var qvar fun con field farg lvar (DataType dt) -> SMTExpr var qvar fun con field farg lvar tp | |
SMTConst :: ConcreteValue tp -> SMTExpr var qvar fun con field farg lvar tp |
(GCompare Type var, GCompare Type qvar, GCompare ((,) [Type] Type) fun, GCompare ((,) [Type] *) con, GCompare ((,) * Type) field, GCompare Type farg, GCompare Type lvar, Typeable ((,) [Type] * -> *) con) => Extract () (SMTExpr var qvar fun con field farg lvar) Source | |
(GCompare Type var, GetType var, GCompare Type qvar, GetType qvar, GCompare ((,) [Type] Type) fun, GetFunType fun, GCompare ((,) [Type] *) con, GetConType con, GCompare ((,) * Type) field, GetFieldType field, GCompare Type farg, GetType farg, GCompare Type lvar, GetType lvar, Typeable ((,) [Type] * -> *) con) => Embed Identity (SMTExpr var qvar fun con field farg lvar) Source | |
(GetType var, GetType qvar, GetFunType fun, GetConType con, GetFieldType field, GetType farg, GetType lvar) => GetType (SMTExpr var qvar fun con field farg lvar) Source | |
type ExVar () (SMTExpr var qvar fun con field farg lvar) = var Source | |
type ExQVar () (SMTExpr var qvar fun con field farg lvar) = qvar Source | |
type ExFun () (SMTExpr var qvar fun con field farg lvar) = fun Source | |
type ExConstr () (SMTExpr var qvar fun con field farg lvar) = con Source | |
type ExField () (SMTExpr var qvar fun con field farg lvar) = field Source | |
type ExFunArg () (SMTExpr var qvar fun con field farg lvar) = farg Source | |
type ExLVar () (SMTExpr var qvar fun con field farg lvar) = lvar Source | |
type EmVar Identity (SMTExpr var qvar fun con field farg lvar) = var Source | |
type EmQVar Identity (SMTExpr var qvar fun con field farg lvar) = qvar Source | |
type EmFun Identity (SMTExpr var qvar fun con field farg lvar) = fun Source | |
type EmConstr Identity (SMTExpr var qvar fun con field farg lvar) = con Source | |
type EmField Identity (SMTExpr var qvar fun con field farg lvar) = field Source | |
type EmFunArg Identity (SMTExpr var qvar fun con field farg lvar) = farg Source | |
type EmLVar Identity (SMTExpr var qvar fun con field farg lvar) = lvar Source |
encodeExpr :: Backend b => SMTExpr (Var b) (QVar b) (Fun b) (Constr b) (Field 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) (Constr b) (Field 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) (ExConstr i e) (ExField 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