smtlib2-0.3.1: A type-safe interface to communicate with an SMT solver.

Safe HaskellNone
LanguageHaskell98

Language.SMTLib2.Pipe

Synopsis

Documentation

data SMTPipe Source #

An SMT backend which uses process pipes to communicate with an SMT solver process.

Instances

MonadIO m => SMTBackend SMTPipe m Source # 

Methods

smtHandle :: Typeable * response => SMTPipe -> SMTRequest response -> m (response, SMTPipe) Source #

smtGetNames :: SMTPipe -> m (Integer -> String) Source #

smtNextName :: SMTPipe -> m (Maybe String -> String) Source #

createSMTPipe Source #

Arguments

:: 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.

withPipe :: MonadIO m => String -> [String] -> SMT' m a -> m a Source #

exprToLispWith :: (forall a. (Typeable a, Ord a, Show a) => a -> Lisp) -> SMTExpr t -> (Integer -> String) -> DataTypeInfo -> Lisp Source #

lispToExpr Source #

Arguments

:: FunctionParser

The parser to use for function symbols

-> (Text -> Maybe (SMTExpr Untyped))

How to handle variable names

-> DataTypeInfo

Information about declared data types

-> (forall a. SMTType a => SMTExpr a -> b)

A function to apply to the resulting SMT expression

-> Maybe Sort

If you know the sort of the expression, you can pass it here.

-> Integer

The current quantification level

-> Lisp

The lisp expression to parse

-> Maybe b 

Parse a lisp expression into an SMT expression. Since we cannot know what type the expression might have, we pass a general function which may take any SMT expression and produce the desired result.

lispToExprWith Source #

Arguments

:: (forall b. FunctionParser -> (Text -> Maybe (SMTExpr Untyped)) -> DataTypeInfo -> (forall a. SMTType a => SMTExpr a -> b) -> Maybe Sort -> Integer -> Lisp -> Maybe b)

Recursive descend function

-> FunctionParser

The parser to use for function symbols

-> (Text -> Maybe (SMTExpr Untyped))

How to handle variable names

-> DataTypeInfo

Information about declared data types

-> (forall a. SMTType a => SMTExpr a -> b)

A function to apply to the resulting SMT expression

-> Maybe Sort

If you know the sort of the expression, you can pass it here.

-> Integer

The current quantification level

-> Lisp

The lisp expression to parse

-> Maybe b 

lispToSort :: Lisp -> Maybe Sort Source #

Parse a lisp expression into an SMT sort.

commonFunctions :: FunctionParser Source #

A parser for all available SMT logics.

commonTheorems :: FunctionParser Source #

A map which contains signatures for a few common theorems which can be used in the proofs which getProof returns.

data FunctionParser' Source #

Constructors

OverloadedParser 

Fields

DefinedParser 

Fields