{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -Wall -Werror #-}
module Data.SBV.Provers.MathSAT(mathSAT) where
import Data.SBV.Core.Data
import Data.SBV.SMT.SMT
import Data.SBV.Control.Types
mathSAT :: SMTSolver
mathSAT :: SMTSolver
mathSAT = SMTSolver {
name :: Solver
name = Solver
MathSAT
, executable :: String
executable = String
"mathsat"
, preprocess :: String -> String
preprocess = forall a. a -> a
id
, options :: SMTConfig -> [String]
options = [String] -> SMTConfig -> [String]
modConfig [String
"-input=smt2", String
"-theory.fp.minmax_zero_mode=4"]
, engine :: SMTEngine
engine = String -> String -> SMTEngine
standardEngine String
"SBV_MATHSAT" String
"SBV_MATHSAT_OPTIONS"
, capabilities :: SolverCapabilities
capabilities = SolverCapabilities {
supportsQuantifiers :: Bool
supportsQuantifiers = Bool
True
, supportsDefineFun :: Bool
supportsDefineFun = Bool
True
, supportsDistinct :: Bool
supportsDistinct = Bool
True
, supportsBitVectors :: Bool
supportsBitVectors = Bool
True
, supportsUninterpretedSorts :: Bool
supportsUninterpretedSorts = Bool
True
, supportsUnboundedInts :: Bool
supportsUnboundedInts = Bool
True
, supportsInt2bv :: Bool
supportsInt2bv = Bool
False
, supportsReals :: Bool
supportsReals = Bool
True
, supportsApproxReals :: Bool
supportsApproxReals = Bool
False
, supportsDeltaSat :: Maybe String
supportsDeltaSat = forall a. Maybe a
Nothing
, supportsIEEE754 :: Bool
supportsIEEE754 = Bool
True
, supportsSets :: Bool
supportsSets = Bool
False
, supportsOptimization :: Bool
supportsOptimization = Bool
False
, supportsPseudoBooleans :: Bool
supportsPseudoBooleans = Bool
False
, supportsCustomQueries :: Bool
supportsCustomQueries = Bool
True
, supportsGlobalDecls :: Bool
supportsGlobalDecls = Bool
True
, supportsDataTypes :: Bool
supportsDataTypes = Bool
True
, supportsDirectAccessors :: Bool
supportsDirectAccessors = Bool
True
, supportsFlattenedModels :: Maybe [String]
supportsFlattenedModels = forall a. Maybe a
Nothing
}
}
where
modConfig :: [String] -> SMTConfig -> [String]
modConfig :: [String] -> SMTConfig -> [String]
modConfig [String]
opts SMTConfig
cfg
| forall (t :: * -> *). Foldable t => t Bool -> Bool
or [Bool
b | ProduceUnsatCores Bool
b <- SMTConfig -> [SMTOption]
solverSetOptions SMTConfig
cfg]
= [String]
opts forall a. [a] -> [a] -> [a]
++ [String
"-unsat_core_generation=3"]
| Bool
True
= [String]
opts