Safe Haskell | None |
---|---|
Language | Haskell98 |
Language.SMTLib2.Internals.Backend
- type SMTAction b r = b -> SMTMonad b (r, b)
- mapAction :: Backend b => (r -> r') -> SMTAction b r -> SMTAction b r'
- class (Typeable b, Functor (SMTMonad b), Monad (SMTMonad b), GetType (Expr b), GetType (Var b), GetType (QVar b), GetFunType (Fun b), GetType (FunArg b), GetType (LVar b), Typeable (Expr b), Typeable (Var b), Typeable (QVar b), Typeable (Fun b), Typeable (FunArg b), Typeable (LVar b), Typeable (ClauseId b), GCompare (Expr b), GShow (Expr b), GCompare (Var b), GShow (Var b), GCompare (QVar b), GShow (QVar b), GCompare (Fun b), GShow (Fun b), GCompare (FunArg b), GShow (FunArg b), GCompare (LVar b), GShow (LVar b), Ord (ClauseId b), Show (ClauseId b), Ord (Proof b), Show (Proof b), Show (Model b)) => Backend b where
- data Partition
- data CheckSatResult
- data CheckSatLimits = CheckSatLimits {}
- newtype AssignmentModel b = AssignmentModel {
- assignments :: [Assignment b]
- data Assignment b
- = VarAssignment (Var b t) (Expr b t)
- | FunAssignment (Fun b '(arg, t)) (List (FunArg b) arg) (Expr b t)
- data SMTOption
- data SMTInfo i where
- data UntypedVar v t = UntypedVar v (Repr t)
- data UntypedFun v sig where
- UntypedFun :: v -> List Repr arg -> Repr ret -> UntypedFun v '(arg, ret)
- data RenderedSubExpr t = RenderedSubExpr (Int -> ShowS)
- showsBackendExpr :: Backend b => b -> Int -> Expr b t -> ShowS
Documentation
class (Typeable b, Functor (SMTMonad b), Monad (SMTMonad b), GetType (Expr b), GetType (Var b), GetType (QVar b), GetFunType (Fun b), GetType (FunArg b), GetType (LVar b), Typeable (Expr b), Typeable (Var b), Typeable (QVar b), Typeable (Fun b), Typeable (FunArg b), Typeable (LVar b), Typeable (ClauseId b), GCompare (Expr b), GShow (Expr b), GCompare (Var b), GShow (Var b), GCompare (QVar b), GShow (QVar b), GCompare (Fun b), GShow (Fun b), GCompare (FunArg b), GShow (FunArg b), GCompare (LVar b), GShow (LVar b), Ord (ClauseId b), Show (ClauseId b), Ord (Proof b), Show (Proof b), Show (Model b)) => Backend b where Source #
A backend represents a specific type of SMT solver.
Minimal complete definition
setOption, getInfo, push, pop, declareVar, createQVar, createFunArg, defineVar, declareFun, defineFun, assert, assertId, assertPartition, checkSat, getUnsatCore, getValue, getModel, modelEvaluate, getProof, analyzeProof, simplify, toBackend, fromBackend, declareDatatypes, interpolate, exit
Associated Types
type SMTMonad b :: * -> * Source #
The monad in which the backend executes queries.
data Expr b :: Type -> * Source #
The internal type of expressions.
type Var b :: Type -> * Source #
The internal type of variables.
type QVar b :: Type -> * Source #
The internal type of quantified variables.
type Fun b :: ([Type], Type) -> * Source #
The internal type of user-defined functions.
type FunArg b :: Type -> * Source #
Methods
setOption :: SMTOption -> SMTAction b () Source #
getInfo :: SMTInfo i -> SMTAction b i Source #
comment :: String -> SMTAction b () Source #
push :: SMTAction b () Source #
pop :: SMTAction b () Source #
declareVar :: Repr t -> Maybe String -> SMTAction b (Var b t) Source #
createQVar :: Repr t -> Maybe String -> SMTAction b (QVar b t) Source #
createFunArg :: Repr t -> Maybe String -> SMTAction b (FunArg b t) Source #
defineVar :: Maybe String -> Expr b t -> SMTAction b (Var b t) Source #
declareFun :: List Repr arg -> Repr t -> Maybe String -> SMTAction b (Fun b '(arg, t)) Source #
defineFun :: Maybe String -> List (FunArg b) arg -> Expr b r -> SMTAction b (Fun b '(arg, r)) Source #
assert :: Expr b BoolType -> SMTAction b () Source #
assertId :: Expr b BoolType -> SMTAction b (ClauseId b) Source #
assertPartition :: Expr b BoolType -> Partition -> SMTAction b () Source #
checkSat :: Maybe Tactic -> CheckSatLimits -> SMTAction b CheckSatResult Source #
getUnsatCore :: SMTAction b [ClauseId b] Source #
getValue :: Expr b t -> SMTAction b (Value t) Source #
getModel :: SMTAction b (Model b) Source #
modelEvaluate :: Model b -> Expr b t -> SMTAction b (Value t) Source #
getProof :: SMTAction b (Proof b) Source #
analyzeProof :: b -> Proof b -> Proof String (Expr b) (Proof b) Source #
simplify :: Expr b t -> SMTAction b (Expr b t) Source #
toBackend :: Expression (Var b) (QVar b) (Fun b) (FunArg b) (LVar b) (Expr b) t -> SMTAction b (Expr b t) Source #
fromBackend :: b -> Expr b t -> Expression (Var b) (QVar b) (Fun b) (FunArg b) (LVar b) (Expr b) t Source #
declareDatatypes :: [AnyDatatype] -> SMTAction b () Source #
The interpolation partition
Constructors
PartitionA | |
PartitionB |
data CheckSatResult Source #
The result of a check-sat query
Constructors
Sat | The formula is satisfiable |
Unsat | The formula is unsatisfiable |
Unknown | The solver cannot determine the satisfiability of a formula |
Instances
data CheckSatLimits Source #
Describe limits on the ressources that an SMT-solver can use
Constructors
CheckSatLimits | |
Instances
newtype AssignmentModel b Source #
Constructors
AssignmentModel | |
Fields
|
data Assignment b Source #
Constructors
VarAssignment (Var b t) (Expr b t) | |
FunAssignment (Fun b '(arg, t)) (List (FunArg b) arg) (Expr b t) |
Options controling the behaviour of the SMT solver
Constructors
PrintSuccess Bool | Whether or not to print "success" after each operation |
ProduceModels Bool | Produce a satisfying assignment after each successful checkSat |
ProduceProofs Bool | Produce a proof of unsatisfiability after each failed checkSat |
ProduceUnsatCores Bool | Enable the querying of unsatisfiable cores after a failed checkSat |
ProduceInterpolants Bool | Enable the generation of craig interpolants |
SMTLogic String |
Solver information query type. Used with getInfo
.
Constructors
SMTSolverName :: SMTInfo String | |
SMTSolverVersion :: SMTInfo String |
data UntypedVar v t Source #
Constructors
UntypedVar v (Repr t) |
data UntypedFun v sig where Source #
Constructors
UntypedFun :: v -> List Repr arg -> Repr ret -> UntypedFun v '(arg, ret) |
Instances
GetFunType (UntypedFun v) Source # | |
Eq v => Eq (UntypedFun v sig) Source # | |
Ord v => Ord (UntypedFun v sig) Source # | |
Show v => Show (UntypedFun v sig) Source # | |
Ord v => GCompare ([Type], Type) (UntypedFun v) Source # | |
Eq v => GEq ([Type], Type) (UntypedFun v) Source # | |
Show v => GShow ([Type], Type) (UntypedFun v) Source # | |
data RenderedSubExpr t Source #
Constructors
RenderedSubExpr (Int -> ShowS) |
Instances
GShow k (RenderedSubExpr k) Source # | |