Safe Haskell | None |
---|---|
Language | Haskell98 |
- type SMTAction b r = b -> SMTMonad b (r, b)
- class (Typeable b, Functor (SMTMonad b), Monad (SMTMonad b), GetType (Expr b), GetType (Var b), GetType (QVar b), GetFunType (Fun b), GetConType (Constr b), GetFieldType (Field b), GetType (FunArg b), GetType (LVar b), Typeable (Expr b), Typeable (Var b), Typeable (QVar b), Typeable (Fun b), Typeable (Constr b), Typeable (Field 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 (Constr b), GShow (Constr b), GCompare (Field b), GShow (Field 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
- type SMTMonad b :: * -> *
- type Expr b :: Type -> *
- type Var b :: Type -> *
- type QVar b :: Type -> *
- type Fun b :: ([Type], Type) -> *
- type Constr b :: ([Type], *) -> *
- type Field b :: (*, Type) -> *
- type FunArg b :: Type -> *
- type LVar b :: Type -> *
- type ClauseId b :: *
- type Model b :: *
- type Proof b :: *
- setOption :: SMTOption -> SMTAction b ()
- getInfo :: SMTInfo i -> SMTAction b i
- comment :: String -> SMTAction b ()
- push :: SMTAction b ()
- pop :: SMTAction b ()
- declareVar :: Repr t -> Maybe String -> SMTAction b (Var b t)
- createQVar :: Repr t -> Maybe String -> SMTAction b (QVar b t)
- createFunArg :: Repr t -> Maybe String -> SMTAction b (FunArg b t)
- defineVar :: Maybe String -> Expr b t -> SMTAction b (Var b t)
- declareFun :: List Repr arg -> Repr t -> Maybe String -> SMTAction b (Fun b `(arg, t)`)
- defineFun :: Maybe String -> List (FunArg b) arg -> Expr b r -> SMTAction b (Fun b `(arg, r)`)
- assert :: Expr b BoolType -> SMTAction b ()
- assertId :: Expr b BoolType -> SMTAction b (ClauseId b)
- assertPartition :: Expr b BoolType -> Partition -> SMTAction b ()
- checkSat :: Maybe Tactic -> CheckSatLimits -> SMTAction b CheckSatResult
- getUnsatCore :: SMTAction b [ClauseId b]
- getValue :: Expr b t -> SMTAction b (Value (Constr b) t)
- getModel :: SMTAction b (Model b)
- modelEvaluate :: Model b -> Expr b t -> SMTAction b (Value (Constr b) t)
- getProof :: SMTAction b (Proof b)
- analyzeProof :: b -> Proof b -> Proof String (Expr b) (Proof b)
- simplify :: Expr b t -> SMTAction b (Expr b t)
- toBackend :: Expression (Var b) (QVar b) (Fun b) (Constr b) (Field b) (FunArg b) (LVar b) (Expr b) t -> SMTAction b (Expr b t)
- fromBackend :: b -> Expr b t -> Expression (Var b) (QVar b) (Fun b) (Constr b) (Field b) (FunArg b) (LVar b) (Expr b) t
- declareDatatypes :: TypeCollection sigs -> SMTAction b (BackendTypeCollection (Constr b) (Field b) sigs)
- interpolate :: SMTAction b (Expr b BoolType)
- exit :: SMTAction b ()
- type BackendTypeCollection con field sigs = Datatypes (BackendDatatype con field) sigs
- newtype BackendDatatype con field sig = BackendDatatype {
- bconstructors :: Constrs (BackendConstr con field) (Fst sig) (Snd sig)
- data BackendConstr con field sig = BackendConstr {
- bconName :: String
- bconRepr :: con sig
- bconFields :: List (BackendField field (Snd sig)) (Fst sig)
- bconstruct :: List ConcreteValue (Fst sig) -> Snd sig
- bconTest :: Snd sig -> Bool
- data BackendField field dt t = BackendField {
- bfieldName :: String
- bfieldRepr :: field `(dt, t)`
- bfieldType :: Repr t
- bfieldGet :: dt -> ConcreteValue t
- data Partition
- data CheckSatResult
- data CheckSatLimits = CheckSatLimits {}
- newtype AssignmentModel b = AssignmentModel {
- assignments :: [Assignment b]
- data Assignment b
- = forall t . VarAssignment (Var b t) (Expr b t)
- | forall arg 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 UntypedCon v sig where
- UntypedCon :: IsDatatype dt => v -> List Repr arg -> Proxy dt -> UntypedCon v `(arg, dt)`
- data UntypedField v sig where
- UntypedField :: IsDatatype dt => v -> Proxy dt -> Repr t -> UntypedField v `(dt, t)`
- 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), GetConType (Constr b), GetFieldType (Field b), GetType (FunArg b), GetType (LVar b), Typeable (Expr b), Typeable (Var b), Typeable (QVar b), Typeable (Fun b), Typeable (Constr b), Typeable (Field 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 (Constr b), GShow (Constr b), GCompare (Field b), GShow (Field 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
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
type SMTMonad b :: * -> * Source
type Expr b :: Type -> * Source
type Var b :: Type -> * Source
type QVar b :: Type -> * Source
type Fun b :: ([Type], Type) -> * Source
type Constr b :: ([Type], *) -> * Source
type Field b :: (*, Type) -> * Source
type FunArg b :: Type -> * Source
setOption :: SMTOption -> SMTAction b () Source
getInfo :: SMTInfo i -> SMTAction b i Source
comment :: String -> 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 (Constr b) t) Source
getModel :: SMTAction b (Model b) Source
modelEvaluate :: Model b -> Expr b t -> SMTAction b (Value (Constr b) 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) (Constr b) (Field 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) (Constr b) (Field b) (FunArg b) (LVar b) (Expr b) t Source
declareDatatypes :: TypeCollection sigs -> SMTAction b (BackendTypeCollection (Constr b) (Field b) sigs) Source
interpolate :: SMTAction b (Expr b BoolType) Source
type BackendTypeCollection con field sigs = Datatypes (BackendDatatype con field) sigs Source
newtype BackendDatatype con field sig Source
BackendDatatype | |
|
data BackendConstr con field sig Source
BackendConstr | |
|
data BackendField field dt t Source
BackendField | |
|
The interpolation partition
data CheckSatResult Source
The result of a check-sat query
data CheckSatLimits Source
Describe limits on the ressources that an SMT-solver can use
newtype AssignmentModel b Source
AssignmentModel | |
|
data Assignment b Source
forall t . VarAssignment (Var b t) (Expr b t) | |
forall arg t . FunAssignment (Fun b `(arg, t)`) (List (FunArg b) arg) (Expr b t) |
Options controling the behaviour of the SMT solver
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 |
data UntypedVar v t Source
UntypedVar v (Repr t) |
Ord v => GCompare Type (UntypedVar v) Source | |
Eq v => GEq Type (UntypedVar v) Source | |
Show v => GShow Type (UntypedVar v) Source | |
GetType (UntypedVar v) Source | |
Eq v => Eq (UntypedVar v t) Source | |
Ord v => Ord (UntypedVar v t) Source | |
Show v => Show (UntypedVar v t) Source |
data UntypedFun v sig where Source
UntypedFun :: v -> List Repr arg -> Repr ret -> UntypedFun v `(arg, ret)` |
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 UntypedCon v sig where Source
UntypedCon :: IsDatatype dt => v -> List Repr arg -> Proxy dt -> UntypedCon v `(arg, dt)` |
GetConType (UntypedCon v) Source | |
Eq v => Eq (UntypedCon v sig) Source | |
Ord v => Ord (UntypedCon v sig) Source | |
Show v => Show (UntypedCon v sig) Source | |
Ord v => GCompare ((,) [Type] *) (UntypedCon v) Source | |
Eq v => GEq ((,) [Type] *) (UntypedCon v) Source | |
Show v => GShow ((,) [Type] *) (UntypedCon v) Source |
data UntypedField v sig where Source
UntypedField :: IsDatatype dt => v -> Proxy dt -> Repr t -> UntypedField v `(dt, t)` |
GetFieldType (UntypedField v) Source | |
Eq v => Eq (UntypedField v sig) Source | |
Ord v => Ord (UntypedField v sig) Source | |
Show v => Show (UntypedField v sig) Source | |
Ord v => GCompare ((,) * Type) (UntypedField v) Source | |
Eq v => GEq ((,) * Type) (UntypedField v) Source | |
Show v => GShow ((,) * Type) (UntypedField v) Source |