{- | Gives interfaces to some common SMT solvers. -} module Language.SMTLib2.Solver where import Language.SMTLib2 import Language.SMTLib2.Pipe import Control.Monad.Trans (MonadIO) -- | Z3 is a solver by Microsoft . withZ3 :: MonadIO m => SMT' m a -> m a withZ3 = withPipe "z3" ["-smt2","-in"] -- | MathSAT . withMathSat :: MonadIO m => SMT' m a -> m a withMathSat = withPipe "mathsat" [] -- | CVC4 is an open-source SMT solver withCVC4 :: MonadIO m => SMT' m a -> m a withCVC4 = withPipe "cvc4" ["--lang smt2"] -- | SMTInterpol is an experimental interpolating SMT solver withSMTInterpol :: MonadIO m => SMT' m a -> m a withSMTInterpol = withPipe "java" ["-jar","/usr/local/share/java/smtinterpol.jar","-q"]