{-# OPTIONS_GHC -Wall -Werror #-}
module Data.SBV.Dynamic
(
SVal
, HasKind(..), Kind(..), CV(..), CVal(..), cvToBool
, SArr, readSArr, writeSArr, mergeSArr, newSArr, eqSArr
, SFunArr, readSFunArr, writeSFunArr, mergeSFunArr, newSFunArr
, Symbolic
, Quantifier(..)
, svMkSymVar
, sWordN, sWordN_, sIntN, sIntN_
, svTrue, svFalse, svBool, svAsBool
, svInteger, svAsInteger
, svFloat, svDouble
, svReal, svNumerator, svDenominator
, svEqual, svNotEqual
, svEnumFromThenTo
, svLessThan, svGreaterThan, svLessEq, svGreaterEq, svStructuralLessThan
, svPlus, svTimes, svMinus, svUNeg, svAbs
, svDivide, svQuot, svRem, svQuotRem, svExp
, svAddConstant, svIncrement, svDecrement
, svAnd, svOr, svXOr, svNot
, svShl, svShr, svRol, svRor
, svExtract, svJoin
, svSign, svUnsign
, svFromIntegral
, svSelect
, svToWord1, svFromWord1, svTestBit, svSetBit
, svShiftLeft, svShiftRight
, svRotateLeft, svRotateRight
, svBarrelRotateLeft, svBarrelRotateRight
, svWordFromBE, svWordFromLE
, svBlastLE, svBlastBE
, svIte, svLazyIte, svSymbolicMerge
, svUninterpreted
, proveWith
, satWith, allSatWith
, safeWith
, proveWithAll, proveWithAny, satWithAll, satWithAny
, proveConcurrentWithAll, proveConcurrentWithAny
, satConcurrentWithAny, satConcurrentWithAll
, svQuickCheck
, ThmResult(..), SatResult(..), AllSatResult(..), SafeResult(..), OptimizeResult(..), SMTResult(..)
, genParse, getModelAssignment, getModelDictionary
, SMTConfig(..), SMTLibVersion(..), Solver(..), SMTSolver(..), boolector, cvc4, yices, z3, mathSAT, abc, defaultSolverConfig, defaultSMTCfg, sbvCheckSolverInstallation, sbvAvailableSolvers
, outputSVal
, SBVCodeGen
, cgPerformRTCs, cgSetDriverValues, cgGenerateDriver, cgGenerateMakefile
, svCgInput, svCgInputArr
, svCgOutput, svCgOutputArr
, svCgReturn, svCgReturnArr
, cgAddPrototype, cgAddDecl, cgAddLDFlags, cgIgnoreSAssert
, cgIntegerSize, cgSRealType, CgSRealType(..)
, compileToC, compileToCLib
, generateSMTBenchmark
) where
import Data.Map.Strict (Map)
import Data.SBV.Core.Kind
import Data.SBV.Core.Concrete
import Data.SBV.Core.Symbolic
import Data.SBV.Core.Operations
import Data.SBV.Compilers.CodeGen ( SBVCodeGen
, svCgInput, svCgInputArr
, svCgOutput, svCgOutputArr
, svCgReturn, svCgReturnArr
, cgPerformRTCs, cgSetDriverValues, cgGenerateDriver, cgGenerateMakefile
, cgAddPrototype, cgAddDecl, cgAddLDFlags, cgIgnoreSAssert
, cgIntegerSize, cgSRealType, CgSRealType(..)
)
import Data.SBV.Compilers.C (compileToC, compileToCLib)
import Data.SBV.Provers.Prover (boolector, cvc4, yices, z3, mathSAT, abc, defaultSMTCfg)
import Data.SBV.SMT.SMT (ThmResult(..), SatResult(..), SafeResult(..), OptimizeResult(..), AllSatResult(..), genParse)
import Data.SBV (sbvCheckSolverInstallation, defaultSolverConfig, sbvAvailableSolvers)
import qualified Data.SBV as SBV (SBool, proveWithAll, proveWithAny, satWithAll, satWithAny
, proveConcurrentWithAll, proveConcurrentWithAny
, satConcurrentWithAny, satConcurrentWithAll
)
import qualified Data.SBV.Core.Data as SBV (SBV(..))
import qualified Data.SBV.Core.Model as SBV (sbvQuickCheck)
import qualified Data.SBV.Provers.Prover as SBV (proveWith, satWith, safeWith, allSatWith, generateSMTBenchmark)
import qualified Data.SBV.SMT.SMT as SBV (Modelable(getModelAssignment, getModelDictionary))
import Data.Time (NominalDiffTime)
svQuickCheck :: Symbolic SVal -> IO Bool
svQuickCheck = SBV.sbvQuickCheck . fmap toSBool
toSBool :: SVal -> SBV.SBool
toSBool = SBV.SBV
generateSMTBenchmark :: Bool -> Symbolic SVal -> IO String
generateSMTBenchmark isSat s = SBV.generateSMTBenchmark isSat (fmap toSBool s)
proveWith :: SMTConfig -> Symbolic SVal -> IO ThmResult
proveWith cfg s = SBV.proveWith cfg (fmap toSBool s)
satWith :: SMTConfig -> Symbolic SVal -> IO SatResult
satWith cfg s = SBV.satWith cfg (fmap toSBool s)
safeWith :: SMTConfig -> Symbolic SVal -> IO [SafeResult]
safeWith cfg s = SBV.safeWith cfg (fmap toSBool s)
allSatWith :: SMTConfig -> Symbolic SVal -> IO AllSatResult
allSatWith cfg s = SBV.allSatWith cfg (fmap toSBool s)
proveWithAll :: [SMTConfig] -> Symbolic SVal -> IO [(Solver, NominalDiffTime, ThmResult)]
proveWithAll cfgs s = SBV.proveWithAll cfgs (fmap toSBool s)
proveWithAny :: [SMTConfig] -> Symbolic SVal -> IO (Solver, NominalDiffTime, ThmResult)
proveWithAny cfgs s = SBV.proveWithAny cfgs (fmap toSBool s)
proveConcurrentWithAll :: SMTConfig -> Symbolic SVal -> [Query SVal] -> IO [(Solver, NominalDiffTime, ThmResult)]
proveConcurrentWithAll cfg s queries = SBV.proveConcurrentWithAll cfg queries (fmap toSBool s)
proveConcurrentWithAny :: SMTConfig -> Symbolic SVal -> [Query SVal] -> IO (Solver, NominalDiffTime, ThmResult)
proveConcurrentWithAny cfg s queries = SBV.proveConcurrentWithAny cfg queries (fmap toSBool s)
satWithAll :: [SMTConfig] -> Symbolic SVal -> IO [(Solver, NominalDiffTime, SatResult)]
satWithAll cfgs s = SBV.satWithAll cfgs (fmap toSBool s)
satWithAny :: [SMTConfig] -> Symbolic SVal -> IO (Solver, NominalDiffTime, SatResult)
satWithAny cfgs s = SBV.satWithAny cfgs (fmap toSBool s)
satConcurrentWithAny :: SMTConfig -> [Query b] -> Symbolic SVal -> IO (Solver, NominalDiffTime, SatResult)
satConcurrentWithAny cfg qs s = SBV.satConcurrentWithAny cfg qs (fmap toSBool s)
satConcurrentWithAll :: SMTConfig -> [Query b] -> Symbolic SVal -> IO [(Solver, NominalDiffTime, SatResult)]
satConcurrentWithAll cfg qs s = SBV.satConcurrentWithAll cfg qs (fmap toSBool s)
getModelAssignment :: SMTResult -> Either String (Bool, [CV])
getModelAssignment = SBV.getModelAssignment
getModelDictionary :: SMTResult -> Map String CV
getModelDictionary = SBV.getModelDictionary