smtlib2-0.2: 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

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.

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

sortConstraint :: [Sort] -> Bool
 
deriveRetSort :: [Sort] -> Maybe Sort
 
parseOverloaded :: forall a. [Sort] -> Sort -> (forall arg res. (Liftable arg, SMTType res) => SMTFunction arg res -> a) -> Maybe a
 
DefinedParser 

Fields

definedArgSig :: [Sort]
 
definedRetSig :: Sort
 
parseDefined :: forall a. (forall arg res. (Liftable arg, SMTType res) => SMTFunction arg res -> a) -> Maybe a