Safe Haskell | None |
---|---|
Language | Haskell98 |
- data PipeDatatype = IsDatatype a => PipeDatatype (Proxy a)
- data SMTPipe = SMTPipe {}
- data RevVar
- data InterpolationMode
- type PipeVar = UntypedVar Text
- type PipeFun = UntypedFun Text
- newtype PipeClauseId = PipeClauseId Text
- type PipeProofNode = Proof Lisp (Expr SMTPipe) Int
- data PipeProof = PipeProof {}
- renderDeclareFun :: Map String Int -> List Repr arg -> Repr ret -> Maybe String -> (Text, Lisp, Map String Int)
- renderDefineFun :: (GetType e, GetType fv) => (forall t. fv t -> Lisp) -> (forall t. e t -> Lisp) -> Map String Int -> Maybe String -> List fv arg -> e ret -> (Text, Lisp, Map String Int)
- renderCheckSat :: Maybe Tactic -> CheckSatLimits -> Lisp
- renderDeclareDatatype' :: Integer -> [(Text, [(Text, [(Text, Lisp)])])] -> Lisp
- renderDeclareDatatype :: Map String Int -> TypeRegistry Text Text Text -> [AnyDatatype] -> (Lisp, Map String Int, TypeRegistry Text Text Text)
- renderSetOption :: SMTOption -> Lisp
- renderGetInfo :: SMTInfo i -> Lisp
- renderDeclareVar :: Map String Int -> Repr tp -> Maybe String -> (Text, Lisp, Map String Int)
- renderDefineVar :: Map String Int -> Repr t -> Maybe String -> Lisp -> (Text, Lisp, Map String Int)
- renderGetValue :: SMTPipe -> Expr SMTPipe t -> Lisp
- parseGetValue :: SMTPipe -> Repr t -> Lisp -> Value t
- renderGetProof :: Lisp
- parseGetProof :: SMTPipe -> Lisp -> PipeProof
- parseProof :: SMTPipe -> Map Text (Expr SMTPipe BoolType) -> Map Text Int -> Map Int PipeProofNode -> Lisp -> LispParse PipeProof
- parseGetModel :: SMTPipe -> Lisp -> LispParse (Model SMTPipe)
- data Sort = Sort (Repr t)
- data Sorts = Sorts (List Repr t)
- data ParsedFunction fun = ParsedFunction {
- argumentTypeRequired :: Integer -> Bool
- getParsedFunction :: [Maybe Sort] -> LispParse (AnyFunction fun)
- data AnyExpr e = AnyExpr (e t)
- data LispParser v qv fun fv lv e = LispParser {
- parseFunction :: forall a. Maybe Sort -> Text -> (forall args res. fun '(args, res) -> LispParse a) -> (forall args res. IsDatatype res => Datatype res -> Constr res args -> LispParse a) -> (forall args res. IsDatatype res => Datatype res -> Constr res args -> LispParse a) -> (forall t args res. IsDatatype t => Datatype t -> Field t res -> LispParse a) -> LispParse a
- parseDatatype :: forall a. Text -> (forall dt. IsDatatype dt => Datatype dt -> LispParse a) -> LispParse a
- parseVar :: forall a. Maybe Sort -> Text -> (forall t. v t -> LispParse a) -> (forall t. qv t -> LispParse a) -> (forall t. fv t -> LispParse a) -> (forall t. lv t -> LispParse a) -> LispParse a
- parseRecursive :: forall a. LispParser v qv fun fv lv e -> Maybe Sort -> Lisp -> (forall t. e t -> LispParse a) -> LispParse a
- registerQVar :: forall t. Text -> Repr t -> (qv t, LispParser v qv fun fv lv e)
- registerLetVar :: forall t. Text -> Repr t -> (lv t, LispParser v qv fun fv lv e)
- type LispParse = Except String
- createPipe :: String -> [String] -> IO SMTPipe
- createPipeFromHandle :: Handle -> Handle -> IO SMTPipe
- lispToExprUntyped :: SMTPipe -> Lisp -> (forall t. Expr SMTPipe t -> LispParse a) -> LispParse a
- lispToExprTyped :: SMTPipe -> Repr t -> Lisp -> LispParse (Expr SMTPipe t)
- pipeParser :: SMTPipe -> LispParser PipeVar PipeVar PipeFun PipeVar PipeVar (Expr SMTPipe)
- lispToExprWith :: (GShow fun, GShow e, GetFunType fun, GetType e) => LispParser v qv fun fv lv e -> Maybe Sort -> Lisp -> (forall t. Expression v qv fun fv lv e t -> LispParse a) -> LispParse a
- mkQuant :: LispParser v qv fun fv lv e -> [Lisp] -> (forall arg. LispParser v qv fun fv lv e -> List qv arg -> LispParse a) -> LispParse a
- mkLet :: GetType e => LispParser v qv fun fv lv e -> [Lisp] -> (forall arg. LispParser v qv fun fv lv e -> List (LetBinding lv e) arg -> LispParse a) -> LispParse a
- withEq :: Repr t -> [b] -> (forall n. Natural n -> List Repr (AllEq t n) -> a) -> a
- lispToFunction :: LispParser v qv fun fv lv e -> Maybe Sort -> Lisp -> LispParse (ParsedFunction fun)
- fullArgs :: Int -> [(Int, Sort)] -> Natural len -> (forall tps. Length tps ~ len => List Repr tps -> a) -> Maybe a
- lispToOrdFunction :: OrdOp -> LispParse (ParsedFunction fun)
- lispToArithFunction :: Maybe Sort -> ArithOp -> LispParse (ParsedFunction fun)
- lispToLogicFunction :: LogicOp -> ParsedFunction fun
- lispToBVCompFunction :: BVCompOp -> ParsedFunction fun
- lispToBVBinFunction :: Maybe Sort -> BVBinOp -> LispParse (ParsedFunction fun)
- lispToBVUnFunction :: Maybe Sort -> BVUnOp -> LispParse (ParsedFunction fun)
- mkMap :: List Repr idx -> AnyFunction fun -> AnyFunction fun
- asArraySort :: Sort -> Maybe (Sorts, Sort)
- lispToList :: Lisp -> Maybe [Lisp]
- lispToSort :: LispParser v qv fun fv lv e -> Lisp -> LispParse Sort
- lispToSorts :: LispParser v qv fun fv lv e -> [Lisp] -> (forall arg. List Repr arg -> LispParse a) -> LispParse a
- lispToValue :: SMTPipe -> Maybe Sort -> Lisp -> LispParse AnyValue
- lispToConstant :: Lisp -> LispParse AnyValue
- lispToConstrConstant :: SMTPipe -> Maybe Sort -> Lisp -> LispParse AnyValue
- lispToNumber :: Lisp -> Maybe Integer
- lispToReal :: Lisp -> Maybe Rational
- lispToBitVec :: Lisp -> Maybe (Integer, Integer)
- exprToLisp :: TypeRegistry Text Text Text -> Expression PipeVar PipeVar PipeFun PipeVar PipeVar (Expr SMTPipe) t -> Lisp
- exprToLispWith :: (Monad m, GetType v, GetType qv, GetType fv, GetType lv, GetFunType fun, GetType e) => (forall t'. v t' -> m Lisp) -> (forall t'. qv t' -> m Lisp) -> (forall arg res. fun '(arg, res) -> m Lisp) -> (forall arg dt. IsDatatype dt => Datatype dt -> Constr dt arg -> m Lisp) -> (forall arg dt. IsDatatype dt => Datatype dt -> Constr dt arg -> m Lisp) -> (forall dt res. IsDatatype dt => Datatype dt -> Field dt res -> m Lisp) -> (forall t. fv t -> m Lisp) -> (forall t. lv t -> m Lisp) -> (forall t'. e t' -> m Lisp) -> Expression v qv fun fv lv e t -> m Lisp
- valueToLisp :: Monad m => (forall arg tp. IsDatatype tp => Datatype tp -> Constr tp arg -> m Lisp) -> Value t -> m Lisp
- isOverloaded :: Function fun sig -> Bool
- functionSymbol :: (Monad m, GetFunType fun) => (forall arg' res'. fun '(arg', res') -> m Lisp) -> (forall arg' dt. IsDatatype dt => Datatype dt -> Constr dt arg' -> m Lisp) -> (forall arg' dt. IsDatatype dt => Datatype dt -> Constr dt arg' -> m Lisp) -> (forall dt res'. IsDatatype dt => Datatype dt -> Field dt res' -> m Lisp) -> Function fun '(arg, res) -> m Lisp
- functionSymbolWithSig :: (Monad m, GetFunType fun) => (forall arg' res'. fun '(arg', res') -> m Lisp) -> (forall arg' dt. IsDatatype dt => Datatype dt -> Constr dt arg' -> m Lisp) -> (forall arg' dt. IsDatatype dt => Datatype dt -> Constr dt arg' -> m Lisp) -> (forall dt res'. IsDatatype dt => Datatype dt -> Field dt res' -> m Lisp) -> Function fun '(arg, res) -> m Lisp
- typeSymbol :: Set String -> Repr t -> Lisp
- typeList :: List Repr t -> Lisp
- ordSymbol :: OrdOp -> Lisp
- arithSymbol :: ArithOp -> Lisp
- numToLisp :: Integer -> Lisp
- clearInput :: SMTPipe -> IO ()
- putRequest :: SMTPipe -> Lisp -> IO ()
- parseResponse :: SMTPipe -> IO Lisp
- genName :: SMTPipe -> String -> (Text, SMTPipe)
- genName' :: Map String Int -> String -> (Text, Map String Int)
- tacticToLisp :: Tactic -> Lisp
- probeToLisp :: Probe a -> Lisp
Documentation
data PipeDatatype Source #
IsDatatype a => PipeDatatype (Proxy a) |
SMTPipe | |
|
Backend SMTPipe Source # | |
GCompare Type (Expr SMTPipe) Source # | |
GEq Type (Expr SMTPipe) Source # | |
GShow Type (Expr SMTPipe) Source # | |
GetType (Expr SMTPipe) Source # | |
Show (Expr SMTPipe t) Source # | |
type Proof SMTPipe Source # | |
type Model SMTPipe Source # | |
type ClauseId SMTPipe Source # | |
type LVar SMTPipe Source # | |
type FunArg SMTPipe Source # | |
type Fun SMTPipe Source # | |
type QVar SMTPipe Source # | |
type Var SMTPipe Source # | |
data Expr SMTPipe Source # | |
type SMTMonad SMTPipe Source # | |
type PipeVar = UntypedVar Text Source #
type PipeFun = UntypedFun Text Source #
newtype PipeClauseId Source #
renderDeclareFun :: Map String Int -> List Repr arg -> Repr ret -> Maybe String -> (Text, Lisp, Map String Int) Source #
renderDefineFun :: (GetType e, GetType fv) => (forall t. fv t -> Lisp) -> (forall t. e t -> Lisp) -> Map String Int -> Maybe String -> List fv arg -> e ret -> (Text, Lisp, Map String Int) Source #
renderCheckSat :: Maybe Tactic -> CheckSatLimits -> Lisp Source #
renderDeclareDatatype :: Map String Int -> TypeRegistry Text Text Text -> [AnyDatatype] -> (Lisp, Map String Int, TypeRegistry Text Text Text) Source #
renderSetOption :: SMTOption -> Lisp Source #
renderGetInfo :: SMTInfo i -> Lisp Source #
renderDeclareVar :: Map String Int -> Repr tp -> Maybe String -> (Text, Lisp, Map String Int) Source #
renderDefineVar :: Map String Int -> Repr t -> Maybe String -> Lisp -> (Text, Lisp, Map String Int) Source #
parseProof :: SMTPipe -> Map Text (Expr SMTPipe BoolType) -> Map Text Int -> Map Int PipeProofNode -> Lisp -> LispParse PipeProof Source #
data ParsedFunction fun Source #
ParsedFunction | |
|
data LispParser v qv fun fv lv e Source #
LispParser | |
|
:: String | Path to the binary of the SMT solver |
-> [String] | Command line arguments to be passed to the SMT solver |
-> IO SMTPipe |
Spawn a new SMT solver process and create a pipe to communicate with it.
Create a SMT pipe by giving the input and output handle.
lispToExprUntyped :: SMTPipe -> Lisp -> (forall t. Expr SMTPipe t -> LispParse a) -> LispParse a Source #
lispToExprWith :: (GShow fun, GShow e, GetFunType fun, GetType e) => LispParser v qv fun fv lv e -> Maybe Sort -> Lisp -> (forall t. Expression v qv fun fv lv e t -> LispParse a) -> LispParse a Source #
mkQuant :: LispParser v qv fun fv lv e -> [Lisp] -> (forall arg. LispParser v qv fun fv lv e -> List qv arg -> LispParse a) -> LispParse a Source #
mkLet :: GetType e => LispParser v qv fun fv lv e -> [Lisp] -> (forall arg. LispParser v qv fun fv lv e -> List (LetBinding lv e) arg -> LispParse a) -> LispParse a Source #
lispToFunction :: LispParser v qv fun fv lv e -> Maybe Sort -> Lisp -> LispParse (ParsedFunction fun) Source #
fullArgs :: Int -> [(Int, Sort)] -> Natural len -> (forall tps. Length tps ~ len => List Repr tps -> a) -> Maybe a Source #
lispToOrdFunction :: OrdOp -> LispParse (ParsedFunction fun) Source #
lispToArithFunction :: Maybe Sort -> ArithOp -> LispParse (ParsedFunction fun) Source #
lispToLogicFunction :: LogicOp -> ParsedFunction fun Source #
lispToBVCompFunction :: BVCompOp -> ParsedFunction fun Source #
lispToBVBinFunction :: Maybe Sort -> BVBinOp -> LispParse (ParsedFunction fun) Source #
lispToBVUnFunction :: Maybe Sort -> BVUnOp -> LispParse (ParsedFunction fun) Source #
mkMap :: List Repr idx -> AnyFunction fun -> AnyFunction fun Source #
lispToSort :: LispParser v qv fun fv lv e -> Lisp -> LispParse Sort Source #
lispToSorts :: LispParser v qv fun fv lv e -> [Lisp] -> (forall arg. List Repr arg -> LispParse a) -> LispParse a Source #
exprToLisp :: TypeRegistry Text Text Text -> Expression PipeVar PipeVar PipeFun PipeVar PipeVar (Expr SMTPipe) t -> Lisp Source #
:: (Monad m, GetType v, GetType qv, GetType fv, GetType lv, GetFunType fun, GetType e) | |
=> (forall t'. v t' -> m Lisp) | variables |
-> (forall t'. qv t' -> m Lisp) | quantified variables |
-> (forall arg res. fun '(arg, res) -> m Lisp) | functions |
-> (forall arg dt. IsDatatype dt => Datatype dt -> Constr dt arg -> m Lisp) | constructor |
-> (forall arg dt. IsDatatype dt => Datatype dt -> Constr dt arg -> m Lisp) | constructor tests |
-> (forall dt res. IsDatatype dt => Datatype dt -> Field dt res -> m Lisp) | field accesses |
-> (forall t. fv t -> m Lisp) | function variables |
-> (forall t. lv t -> m Lisp) | let variables |
-> (forall t'. e t' -> m Lisp) | sub expressions |
-> Expression v qv fun fv lv e t | |
-> m Lisp |
valueToLisp :: Monad m => (forall arg tp. IsDatatype tp => Datatype tp -> Constr tp arg -> m Lisp) -> Value t -> m Lisp Source #
isOverloaded :: Function fun sig -> Bool Source #
:: (Monad m, GetFunType fun) | |
=> (forall arg' res'. fun '(arg', res') -> m Lisp) | How to render user functions |
-> (forall arg' dt. IsDatatype dt => Datatype dt -> Constr dt arg' -> m Lisp) | How to render constructor applications |
-> (forall arg' dt. IsDatatype dt => Datatype dt -> Constr dt arg' -> m Lisp) | How to render constructor tests |
-> (forall dt res'. IsDatatype dt => Datatype dt -> Field dt res' -> m Lisp) | How to render field acceses |
-> Function fun '(arg, res) | |
-> m Lisp |
functionSymbolWithSig Source #
:: (Monad m, GetFunType fun) | |
=> (forall arg' res'. fun '(arg', res') -> m Lisp) | How to render user functions |
-> (forall arg' dt. IsDatatype dt => Datatype dt -> Constr dt arg' -> m Lisp) | How to render constructor applications |
-> (forall arg' dt. IsDatatype dt => Datatype dt -> Constr dt arg' -> m Lisp) | How to render constructor tests |
-> (forall dt res'. IsDatatype dt => Datatype dt -> Field dt res' -> m Lisp) | How to render field acceses |
-> Function fun '(arg, res) | |
-> m Lisp |
arithSymbol :: ArithOp -> Lisp Source #
clearInput :: SMTPipe -> IO () Source #
tacticToLisp :: Tactic -> Lisp Source #
probeToLisp :: Probe a -> Lisp Source #