sbv-10.2: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.

Copyright | (c) Brian Schroeder Levent Erkok
License | BSD3
Maintainer | erkokl@gmail.com
Stability | experimental
Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.SBV.Trans

Contents

- Symbolic types
  - Booleans
    - Boolean values and functions
    - Logical functions
  - Bit-vectors
    - Unsigned bit-vectors
    - Signed bit-vectors
    - Converting between fixed-size and arbitrary bitvectors
  - Unbounded integers
  - Floating point numbers
  - Algebraic reals
  - Characters, Strings and Regular Expressions
  - Symbolic lists
- Arrays of symbolic values
- Creating symbolic values
  - Single value
  - List of values
- Symbolic Equality and Comparisons
- Conditionals: Mergeable values
- Symbolic integral numbers
- Division and Modulus
- Bit-vector operations
  - Conversions
  - Shifts and rotates
  - Finite bit-vector operations
  - Splitting, joining, and extending bit-vectors
  - Exponentiation
- IEEE-floating point numbers
  - Rounding modes
  - Conversion to/from floats
  - Bit-pattern conversions
  - Extracting bit patterns from floats
- Enumerations
- Uninterpreted sorts, axioms, constants, and functions
- Properties, proofs, and satisfiability
- Constraints
  - General constraints
  - Constraint Vacuity
  - Named constraints and attributes
  - Unsat cores
  - Cardinality constraints
- Checking safety
- Quick-checking
- Optimization
  - Multiple optimization goals
  - Objectives
  - Soft assumptions
  - Field extensions
- Model extraction
  - Inspecting proof results
  - Observing expressions
  - Programmable model extraction
- SMT Interface
  - Controlling verbosity
  - Solvers
  - Configurations
  - SBV exceptions
- Abstract SBV type
- Module exports

Description

More generalized alternative to `Data.SBV` for advanced client use

Synopsis

- type SBool = SBV Bool
- sTrue :: SBool
- sFalse :: SBool
- sNot :: SBool -> SBool
- (.&&) :: SBool -> SBool -> SBool
- (.||) :: SBool -> SBool -> SBool
- (.<+>) :: SBool -> SBool -> SBool
- (.~&) :: SBool -> SBool -> SBool
- (.~|) :: SBool -> SBool -> SBool
- (.=>) :: SBool -> SBool -> SBool
- (.<=>) :: SBool -> SBool -> SBool
- fromBool :: Bool -> SBool
- oneIf :: (Ord a, Num a, SymVal a) => SBool -> SBV a
- sAnd :: [SBool] -> SBool
- sOr :: [SBool] -> SBool
- sAny :: (a -> SBool) -> [a] -> SBool
- sAll :: (a -> SBool) -> [a] -> SBool
- type SWord8 = SBV Word8
- type SWord16 = SBV Word16
- type SWord32 = SBV Word32
- type SWord64 = SBV Word64
- type SWord (n :: Nat) = SBV (WordN n)
- data WordN (n :: Nat)
- type SInt8 = SBV Int8
- type SInt16 = SBV Int16
- type SInt32 = SBV Int32
- type SInt64 = SBV Int64
- type SInt (n :: Nat) = SBV (IntN n)
- data IntN (n :: Nat)
- type family BVIsNonZero (arg :: Nat) :: Constraint where ...
- type family FromSized (t :: Type) :: Type where ...
- type family ToSized (t :: Type) :: Type where ...
- fromSized :: FromSizedBV a => a -> FromSized a
- toSized :: ToSizedBV a => a -> ToSized a
- type SInteger = SBV Integer
- type SFloat = SBV Float
- type SDouble = SBV Double
- type SFloatingPoint (eb :: Nat) (sb :: Nat) = SBV (FloatingPoint eb sb)
- type SReal = SBV AlgReal
- data AlgReal
- sRealToSInteger :: SReal -> SInteger
- type SChar = SBV Char
- type SString = SBV String
- type SList a = SBV [a]
- class SymArray array where
  - newArray_ :: (MonadSymbolic m, HasKind a, HasKind b) => Maybe (SBV b) -> m (array a b)
  - newArray :: (MonadSymbolic m, HasKind a, HasKind b) => String -> Maybe (SBV b) -> m (array a b)
  - readArray :: array a b -> SBV a -> SBV b
  - writeArray :: SymVal b => array a b -> SBV a -> SBV b -> array a b
  - mergeArrays :: SymVal b => SBV Bool -> array a b -> array a b -> array a b
- data SArray a b
- sBool :: MonadSymbolic m => String -> m SBool
- sWord8 :: MonadSymbolic m => String -> m SWord8
- sWord16 :: MonadSymbolic m => String -> m SWord16
- sWord32 :: MonadSymbolic m => String -> m SWord32
- sWord64 :: MonadSymbolic m => String -> m SWord64
- sWord :: (KnownNat n, BVIsNonZero n) => MonadSymbolic m => String -> m (SWord n)
- sInt8 :: MonadSymbolic m => String -> m SInt8
- sInt16 :: MonadSymbolic m => String -> m SInt16
- sInt32 :: MonadSymbolic m => String -> m SInt32
- sInt64 :: MonadSymbolic m => String -> m SInt64
- sInt :: (KnownNat n, BVIsNonZero n) => MonadSymbolic m => String -> m (SInt n)
- sInteger :: MonadSymbolic m => String -> m SInteger
- sReal :: MonadSymbolic m => String -> m SReal
- sFloat :: MonadSymbolic m => String -> m SFloat
- sDouble :: MonadSymbolic m => String -> m SDouble
- sChar :: MonadSymbolic m => String -> m SChar
- sString :: MonadSymbolic m => String -> m SString
- sList :: (SymVal a, MonadSymbolic m) => String -> m (SList a)
- sBools :: MonadSymbolic m => [String] -> m [SBool]
- sWord8s :: MonadSymbolic m => [String] -> m [SWord8]
- sWord16s :: MonadSymbolic m => [String] -> m [SWord16]
- sWord32s :: MonadSymbolic m => [String] -> m [SWord32]
- sWord64s :: MonadSymbolic m => [String] -> m [SWord64]
- sWords :: (KnownNat n, BVIsNonZero n) => MonadSymbolic m => [String] -> m [SWord n]
- sInt8s :: MonadSymbolic m => [String] -> m [SInt8]
- sInt16s :: MonadSymbolic m => [String] -> m [SInt16]
- sInt32s :: MonadSymbolic m => [String] -> m [SInt32]
- sInt64s :: MonadSymbolic m => [String] -> m [SInt64]
- sInts :: (KnownNat n, BVIsNonZero n) => MonadSymbolic m => [String] -> m [SInt n]
- sIntegers :: MonadSymbolic m => [String] -> m [SInteger]
- sReals :: MonadSymbolic m => [String] -> m [SReal]
- sFloats :: MonadSymbolic m => [String] -> m [SFloat]
- sDoubles :: MonadSymbolic m => [String] -> m [SDouble]
- sChars :: MonadSymbolic m => [String] -> m [SChar]
- sStrings :: MonadSymbolic m => [String] -> m [SString]
- sLists :: (SymVal a, MonadSymbolic m) => [String] -> m [SList a]
- class EqSymbolic a where
  - (.==) :: a -> a -> SBool
  - (./=) :: a -> a -> SBool
  - (.===) :: a -> a -> SBool
  - (./==) :: a -> a -> SBool
  - distinct :: [a] -> SBool
  - distinctExcept :: [a] -> [a] -> SBool
  - allEqual :: [a] -> SBool
  - sElem :: a -> [a] -> SBool
  - sNotElem :: a -> [a] -> SBool
- class (Mergeable a, EqSymbolic a) => OrdSymbolic a where
  - (.<) :: a -> a -> SBool
  - (.<=) :: a -> a -> SBool
  - (.>) :: a -> a -> SBool
  - (.>=) :: a -> a -> SBool
  - smin :: a -> a -> a
  - smax :: a -> a -> a
  - inRange :: a -> (a, a) -> SBool
- class Equality a where
  - (===) :: a -> a -> IO ThmResult
- class Mergeable a where
  - symbolicMerge :: Bool -> SBool -> a -> a -> a
  - select :: (Ord b, SymVal b, Num b) => [a] -> a -> SBV b -> a
- ite :: Mergeable a => SBool -> a -> a -> a
- iteLazy :: Mergeable a => SBool -> a -> a -> a
- class (SymVal a, Num a, Bits a, Integral a) => SIntegral a
- class SDivisible a where
  - sQuotRem :: a -> a -> (a, a)
  - sDivMod :: a -> a -> (a, a)
  - sQuot :: a -> a -> a
  - sRem :: a -> a -> a
  - sDiv :: a -> a -> a
  - sMod :: a -> a -> a
- sFromIntegral :: forall a b. (Integral a, HasKind a, Num a, SymVal a, HasKind b, Num b, SymVal b) => SBV a -> SBV b
- sShiftLeft :: (SIntegral a, SIntegral b) => SBV a -> SBV b -> SBV a
- sShiftRight :: (SIntegral a, SIntegral b) => SBV a -> SBV b -> SBV a
- sRotateLeft :: (SIntegral a, SIntegral b) => SBV a -> SBV b -> SBV a
- sBarrelRotateLeft :: (SFiniteBits a, SFiniteBits b) => SBV a -> SBV b -> SBV a
- sRotateRight :: (SIntegral a, SIntegral b) => SBV a -> SBV b -> SBV a
- sBarrelRotateRight :: (SFiniteBits a, SFiniteBits b) => SBV a -> SBV b -> SBV a
- sSignedShiftArithRight :: (SFiniteBits a, SIntegral b) => SBV a -> SBV b -> SBV a
- class (Ord a, SymVal a, Num a, Bits a) => SFiniteBits a where
  - sFiniteBitSize :: SBV a -> Int
  - lsb :: SBV a -> SBool
  - msb :: SBV a -> SBool
  - blastBE :: SBV a -> [SBool]
  - blastLE :: SBV a -> [SBool]
  - fromBitsBE :: [SBool] -> SBV a
  - fromBitsLE :: [SBool] -> SBV a
  - sTestBit :: SBV a -> Int -> SBool
  - sExtractBits :: SBV a -> [Int] -> [SBool]
  - sPopCount :: SBV a -> SWord8
  - setBitTo :: SBV a -> Int -> SBool -> SBV a
  - fullAdder :: SBV a -> SBV a -> (SBool, SBV a)
  - fullMultiplier :: SBV a -> SBV a -> (SBV a, SBV a)
  - sCountLeadingZeros :: SBV a -> SWord8
  - sCountTrailingZeros :: SBV a -> SWord8
- bvExtract :: forall i j n bv proxy. (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat i, KnownNat j, (i + 1) <= n, j <= i, BVIsNonZero ((i - j) + 1)) => proxy i -> proxy j -> SBV (bv n) -> SBV (bv ((i - j) + 1))
- (#) :: (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat m, BVIsNonZero m, SymVal (bv m)) => SBV (bv n) -> SBV (bv m) -> SBV (bv (n + m))
- zeroExtend :: forall n m bv. (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat m, BVIsNonZero m, SymVal (bv m), (n + 1) <= m, SIntegral (bv (m - n)), BVIsNonZero (m - n)) => SBV (bv n) -> SBV (bv m)
- signExtend :: forall n m bv. (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat m, BVIsNonZero m, SymVal (bv m), (n + 1) <= m, SFiniteBits (bv n), SIntegral (bv (m - n)), BVIsNonZero (m - n)) => SBV (bv n) -> SBV (bv m)
- bvDrop :: forall i n m bv proxy. (KnownNat n, BVIsNonZero n, KnownNat i, (i + 1) <= n, ((i + m) - n) <= 0, BVIsNonZero (n - i)) => proxy i -> SBV (bv n) -> SBV (bv m)
- bvTake :: forall i n bv proxy. (KnownNat n, BVIsNonZero n, KnownNat i, BVIsNonZero i, i <= n) => proxy i -> SBV (bv n) -> SBV (bv i)
- (.^) :: (Mergeable b, Num b, SIntegral e) => b -> SBV e -> b
- class (SymVal a, RealFloat a) => IEEEFloating a where
  - fpAbs :: SBV a -> SBV a
  - fpNeg :: SBV a -> SBV a
  - fpAdd :: SRoundingMode -> SBV a -> SBV a -> SBV a
  - fpSub :: SRoundingMode -> SBV a -> SBV a -> SBV a
  - fpMul :: SRoundingMode -> SBV a -> SBV a -> SBV a
  - fpDiv :: SRoundingMode -> SBV a -> SBV a -> SBV a
  - fpFMA :: SRoundingMode -> SBV a -> SBV a -> SBV a -> SBV a
  - fpSqrt :: SRoundingMode -> SBV a -> SBV a
  - fpRem :: SBV a -> SBV a -> SBV a
  - fpRoundToIntegral :: SRoundingMode -> SBV a -> SBV a
  - fpMin :: SBV a -> SBV a -> SBV a
  - fpMax :: SBV a -> SBV a -> SBV a
  - fpIsEqualObject :: SBV a -> SBV a -> SBool
  - fpIsNormal :: SBV a -> SBool
  - fpIsSubnormal :: SBV a -> SBool
  - fpIsZero :: SBV a -> SBool
  - fpIsInfinite :: SBV a -> SBool
  - fpIsNaN :: SBV a -> SBool
  - fpIsNegative :: SBV a -> SBool
  - fpIsPositive :: SBV a -> SBool
  - fpIsNegativeZero :: SBV a -> SBool
  - fpIsPositiveZero :: SBV a -> SBool
  - fpIsPoint :: SBV a -> SBool
- data RoundingMode
  - = RoundNearestTiesToEven
  - | RoundNearestTiesToAway
  - | RoundTowardPositive
  - | RoundTowardNegative
  - | RoundTowardZero
- type SRoundingMode = SBV RoundingMode
- nan :: Floating a => a
- infinity :: Floating a => a
- sNaN :: (Floating a, SymVal a) => SBV a
- sInfinity :: (Floating a, SymVal a) => SBV a
- sRoundNearestTiesToEven :: SRoundingMode
- sRoundNearestTiesToAway :: SRoundingMode
- sRoundTowardPositive :: SRoundingMode
- sRoundTowardNegative :: SRoundingMode
- sRoundTowardZero :: SRoundingMode
- sRNE :: SRoundingMode
- sRNA :: SRoundingMode
- sRTP :: SRoundingMode
- sRTN :: SRoundingMode
- sRTZ :: SRoundingMode
- class SymVal a => IEEEFloatConvertible a where
  - fromSFloat :: SRoundingMode -> SFloat -> SBV a
  - toSFloat :: SRoundingMode -> SBV a -> SFloat
  - fromSDouble :: SRoundingMode -> SDouble -> SBV a
  - toSDouble :: SRoundingMode -> SBV a -> SDouble
  - fromSFloatingPoint :: ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV a
  - toSFloatingPoint :: ValidFloat eb sb => SRoundingMode -> SBV a -> SFloatingPoint eb sb
- sFloatAsSWord32 :: SFloat -> SWord32
- sWord32AsSFloat :: SWord32 -> SFloat
- sDoubleAsSWord64 :: SDouble -> SWord64
- sWord64AsSDouble :: SWord64 -> SDouble
- sFloatingPointAsSWord :: forall eb sb. (ValidFloat eb sb, KnownNat (eb + sb), BVIsNonZero (eb + sb)) => SFloatingPoint eb sb -> SWord (eb + sb)
- sWordAsSFloatingPoint :: forall eb sb. (KnownNat (eb + sb), BVIsNonZero (eb + sb), ValidFloat eb sb) => SWord (eb + sb) -> SFloatingPoint eb sb
- blastSFloat :: SFloat -> (SBool, [SBool], [SBool])
- blastSDouble :: SDouble -> (SBool, [SBool], [SBool])
- blastSFloatingPoint :: forall eb sb. (ValidFloat eb sb, KnownNat (eb + sb), BVIsNonZero (eb + sb)) => SFloatingPoint eb sb -> (SBool, [SBool], [SBool])
- mkSymbolicEnumeration :: Name -> Q [Dec]
- mkUninterpretedSort :: Name -> Q [Dec]
- class SMTDefinable a where
  - smtFunction :: Lambda Symbolic a => String -> a -> a
  - uninterpret :: String -> a
  - cgUninterpret :: String -> [String] -> a -> a
  - sbvDefineValue :: String -> UIKind a -> a
  - sym :: String -> a
- type Predicate = Symbolic SBool
- type ConstraintSet = Symbolic ()
- class ExtractIO m => ProvableM m a where
  - proofArgReduce :: a -> SymbolicT m SBool
  - prove :: a -> m ThmResult
  - proveWith :: SMTConfig -> a -> m ThmResult
  - dprove :: a -> m ThmResult
  - dproveWith :: SMTConfig -> a -> m ThmResult
  - isVacuousProof :: a -> m Bool
  - isVacuousProofWith :: SMTConfig -> a -> m Bool
  - isTheorem :: a -> m Bool
  - isTheoremWith :: SMTConfig -> a -> m Bool
- type Provable = ProvableM IO
- class ExtractIO m => SatisfiableM m a where
  - satArgReduce :: a -> SymbolicT m SBool
  - sat :: a -> m SatResult
  - satWith :: SMTConfig -> a -> m SatResult
  - dsat :: a -> m SatResult
  - dsatWith :: SMTConfig -> a -> m SatResult
  - allSat :: a -> m AllSatResult
  - allSatWith :: SMTConfig -> a -> m AllSatResult
  - isSatisfiable :: a -> m Bool
  - isSatisfiableWith :: SMTConfig -> a -> m Bool
  - optimize :: OptimizeStyle -> a -> m OptimizeResult
  - optimizeWith :: SMTConfig -> OptimizeStyle -> a -> m OptimizeResult
- type Satisfiable = SatisfiableM IO
- generateSMTBenchmarkSat :: SatisfiableM m a => a -> m String
- generateSMTBenchmarkProof :: ProvableM m a => a -> m String
- solve :: MonadSymbolic m => [SBool] -> m SBool
- constrain :: (SolverContext m, QuantifiedBool a) => a -> m ()
- softConstrain :: (SolverContext m, QuantifiedBool a) => a -> m ()
- namedConstraint :: (SolverContext m, QuantifiedBool a) => String -> a -> m ()
- constrainWithAttribute :: (SolverContext m, QuantifiedBool a) => [(String, String)] -> a -> m ()
- pbAtMost :: [SBool] -> Int -> SBool
- pbAtLeast :: [SBool] -> Int -> SBool
- pbExactly :: [SBool] -> Int -> SBool
- pbLe :: [(Int, SBool)] -> Int -> SBool
- pbGe :: [(Int, SBool)] -> Int -> SBool
- pbEq :: [(Int, SBool)] -> Int -> SBool
- pbMutexed :: [SBool] -> SBool
- pbStronglyMutexed :: [SBool] -> SBool
- sAssert :: HasKind a => Maybe CallStack -> String -> SBool -> SBV a -> SBV a
- isSafe :: SafeResult -> Bool
- class ExtractIO m => SExecutable m a where
  - sName :: a -> SymbolicT m ()
  - safe :: a -> m [SafeResult]
  - safeWith :: SMTConfig -> a -> m [SafeResult]
- sbvQuickCheck :: Symbolic SBool -> IO Bool
- data OptimizeStyle
  - = Lexicographic
  - | Independent
  - | Pareto (Maybe Int)
- data Objective a
  - = Minimize String a
  - | Maximize String a
  - | AssertWithPenalty String a Penalty
- assertWithPenalty :: MonadSymbolic m => String -> SBool -> Penalty -> m ()
- data Penalty
  - = DefaultPenalty
  - | Penalty Rational (Maybe String)
- data ExtCV
  - = Infinite Kind
  - | Epsilon Kind
  - | Interval ExtCV ExtCV
  - | BoundedCV CV
  - | AddExtCV ExtCV ExtCV
  - | MulExtCV ExtCV ExtCV
- data GeneralizedCV
  - = ExtendedCV ExtCV
  - | RegularCV CV
- newtype ThmResult = ThmResult SMTResult
- newtype SatResult = SatResult SMTResult
- data AllSatResult = AllSatResult {
  - allSatMaxModelCountReached :: Bool
  - allSatSolverReturnedUnknown :: Bool
  - allSatSolverReturnedDSat :: Bool
  - allSatResults :: [SMTResult]
  }
- newtype SafeResult = SafeResult (Maybe String, String, SMTResult)
- data OptimizeResult
  - = LexicographicResult SMTResult
  - | ParetoResult (Bool, [SMTResult])
  - | IndependentResult [(String, SMTResult)]
- data SMTResult
  - = Unsatisfiable SMTConfig (Maybe [String])
  - | Satisfiable SMTConfig SMTModel
  - | DeltaSat SMTConfig (Maybe String) SMTModel
  - | SatExtField SMTConfig SMTModel
  - | Unknown SMTConfig SMTReasonUnknown
  - | ProofError SMTConfig [String] (Maybe SMTResult)
- data SMTReasonUnknown
  - = UnknownMemOut
  - | UnknownIncomplete
  - | UnknownTimeOut
  - | UnknownOther String
- observe :: SymVal a => String -> SBV a -> SBV a
- class SatModel a where
  - parseCVs :: [CV] -> Maybe (a, [CV])
  - cvtModel :: (a -> Maybe b) -> Maybe (a, [CV]) -> Maybe (b, [CV])
- class Modelable a where
  - modelExists :: a -> Bool
  - getModelAssignment :: SatModel b => a -> Either String (Bool, b)
  - getModelDictionary :: a -> Map String CV
  - getModelValue :: SymVal b => String -> a -> Maybe b
  - getModelUninterpretedValue :: String -> a -> Maybe String
  - extractModel :: SatModel b => a -> Maybe b
  - getModelObjectives :: a -> Map String GeneralizedCV
  - getModelObjectiveValue :: String -> a -> Maybe GeneralizedCV
  - getModelUIFuns :: a -> Map String (SBVType, Either String ([([CV], CV)], CV))
  - getModelUIFunValue :: String -> a -> Maybe (SBVType, Either String ([([CV], CV)], CV))
- displayModels :: SatModel a => ([(Bool, a)] -> [(Bool, a)]) -> (Int -> (Bool, a) -> IO ()) -> AllSatResult -> IO Int
- extractModels :: SatModel a => AllSatResult -> [a]
- getModelDictionaries :: AllSatResult -> [Map String CV]
- getModelValues :: SymVal b => String -> AllSatResult -> [Maybe b]
- getModelUninterpretedValues :: String -> AllSatResult -> [Maybe String]
- data SMTConfig = SMTConfig {
  - verbose :: Bool
  - timing :: Timing
  - printBase :: Int
  - printRealPrec :: Int
  - crackNum :: Bool
  - satCmd :: String
  - allSatMaxModelCount :: Maybe Int
  - allSatPrintAlong :: Bool
  - allSatTrackUFs :: Bool
  - isNonModelVar :: String -> Bool
  - validateModel :: Bool
  - optimizeValidateConstraints :: Bool
  - transcript :: Maybe FilePath
  - smtLibVersion :: SMTLibVersion
  - dsatPrecision :: Maybe Double
  - solver :: SMTSolver
  - extraArgs :: [String]
  - roundingMode :: RoundingMode
  - solverSetOptions :: [SMTOption]
  - ignoreExitCode :: Bool
  - redirectVerbose :: Maybe FilePath
  }
- data Timing
  - = NoTiming
  - | PrintTiming
  - | SaveTiming (IORef NominalDiffTime)
- data SMTLibVersion = SMTLib2
- data Solver
  - = ABC
  - | Boolector
  - | Bitwuzla
  - | CVC4
  - | CVC5
  - | DReal
  - | MathSAT
  - | Yices
  - | Z3
- data SMTSolver = SMTSolver {
  - name :: Solver
  - executable :: String
  - preprocess :: String -> String
  - options :: SMTConfig -> [String]
  - engine :: SMTEngine
  - capabilities :: SolverCapabilities
  }
- boolector :: SMTConfig
- bitwuzla :: SMTConfig
- cvc4 :: SMTConfig
- cvc5 :: SMTConfig
- dReal :: SMTConfig
- yices :: SMTConfig
- z3 :: SMTConfig
- mathSAT :: SMTConfig
- abc :: SMTConfig
- defaultSolverConfig :: Solver -> SMTConfig
- defaultSMTCfg :: SMTConfig
- sbvCheckSolverInstallation :: SMTConfig -> IO Bool
- getAvailableSolvers :: IO [SMTConfig]
- setLogic :: SolverContext m => Logic -> m ()
- data Logic
  - = AUFLIA
  - | AUFLIRA
  - | AUFNIRA
  - | LRA
  - | QF_ABV
  - | QF_AUFBV
  - | QF_AUFLIA
  - | QF_AX
  - | QF_BV
  - | QF_IDL
  - | QF_LIA
  - | QF_LRA
  - | QF_NIA
  - | QF_NRA
  - | QF_RDL
  - | QF_UF
  - | QF_UFBV
  - | QF_UFIDL
  - | QF_UFLIA
  - | QF_UFLRA
  - | QF_UFNRA
  - | QF_UFNIRA
  - | UFLRA
  - | UFNIA
  - | QF_FPBV
  - | QF_FP
  - | QF_FD
  - | QF_S
  - | Logic_ALL
  - | Logic_NONE
  - | CustomLogic String
- setOption :: SolverContext m => SMTOption -> m ()
- setInfo :: SolverContext m => String -> [String] -> m ()
- setTimeOut :: SolverContext m => Integer -> m ()
- data SBVException = SBVException {
  - sbvExceptionDescription :: String
  - sbvExceptionSent :: Maybe String
  - sbvExceptionExpected :: Maybe String
  - sbvExceptionReceived :: Maybe String
  - sbvExceptionStdOut :: Maybe String
  - sbvExceptionStdErr :: Maybe String
  - sbvExceptionExitCode :: Maybe ExitCode
  - sbvExceptionConfig :: SMTConfig
  - sbvExceptionReason :: Maybe [String]
  - sbvExceptionHint :: Maybe [String]
  }
- data SBV a
- class HasKind a where
  - kindOf :: a -> Kind
  - hasSign :: a -> Bool
  - intSizeOf :: a -> Int
  - isBoolean :: a -> Bool
  - isBounded :: a -> Bool
  - isReal :: a -> Bool
  - isFloat :: a -> Bool
  - isDouble :: a -> Bool
  - isRational :: a -> Bool
  - isFP :: a -> Bool
  - isUnbounded :: a -> Bool
  - isUserSort :: a -> Bool
  - isChar :: a -> Bool
  - isString :: a -> Bool
  - isList :: a -> Bool
  - isSet :: a -> Bool
  - isTuple :: a -> Bool
  - isMaybe :: a -> Bool
  - isEither :: a -> Bool
  - showType :: a -> String
- data Kind
  - = KBool
  - | KBounded !Bool !Int
  - | KUnbounded
  - | KReal
  - | KUserSort String (Maybe [String])
  - | KFloat
  - | KDouble
  - | KFP !Int !Int
  - | KChar
  - | KString
  - | KList Kind
  - | KSet Kind
  - | KTuple [Kind]
  - | KMaybe Kind
  - | KRational
  - | KEither Kind Kind
- class (HasKind a, Typeable a) => SymVal a where
  - mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV a)
  - literal :: a -> SBV a
  - fromCV :: CV -> a
  - isConcretely :: SBV a -> (a -> Bool) -> Bool
  - free :: MonadSymbolic m => String -> m (SBV a)
  - free_ :: MonadSymbolic m => m (SBV a)
  - mkFreeVars :: MonadSymbolic m => Int -> m [SBV a]
  - symbolic :: MonadSymbolic m => String -> m (SBV a)
  - symbolics :: MonadSymbolic m => [String] -> m [SBV a]
  - unliteral :: SBV a -> Maybe a
  - isConcrete :: SBV a -> Bool
  - isSymbolic :: SBV a -> Bool
- class MonadIO m => MonadSymbolic m where
  - symbolicEnv :: m State
- type Symbolic = SymbolicT IO
- data SymbolicT m a
- label :: SymVal a => String -> SBV a -> SBV a
- output :: (Outputtable a, MonadSymbolic m) => a -> m a
- runSMT :: MonadIO m => SymbolicT m a -> m a
- runSMTWith :: MonadIO m => SMTConfig -> SymbolicT m a -> m a
- module Data.Bits
- module Data.Word
- module Data.Int
- module Data.Ratio

# Symbolic types

## Booleans

type SBool = SBV Bool Source #

A symbolic boolean/bit

### Boolean values and functions

sTrue :: SBool Source #

Symbolic `True`

sFalse :: SBool Source #

Symbolic `False`

sNot :: SBool -> SBool Source #

Symbolic boolean negation

(.&&) :: SBool -> SBool -> SBool infixr 3 Source #

Symbolic conjunction

(.||) :: SBool -> SBool -> SBool infixr 2 Source #

Symbolic disjunction

(.<+>) :: SBool -> SBool -> SBool infixl 6 Source #

Symbolic logical xor

(.~&) :: SBool -> SBool -> SBool infixr 3 Source #

Symbolic nand

(.~|) :: SBool -> SBool -> SBool infixr 2 Source #

Symbolic nor

(.=>) :: SBool -> SBool -> SBool infixr 1 Source #

Symbolic implication

(.<=>) :: SBool -> SBool -> SBool infixr 1 Source #

Symbolic boolean equivalence

fromBool :: Bool -> SBool Source #

Conversion from `Bool` to `SBool`

oneIf :: (Ord a, Num a, SymVal a) => SBool -> SBV a Source #

Returns 1 if the boolean is `sTrue`, otherwise 0.

### Logical functions

sAnd :: [SBool] -> SBool Source #

Generalization of `and`

sOr :: [SBool] -> SBool Source #

Generalization of `or`

sAny :: (a -> SBool) -> [a] -> SBool Source #

Generalization of `any`

sAll :: (a -> SBool) -> [a] -> SBool Source #

Generalization of `all`

## Bit-vectors

### Unsigned bit-vectors

type SWord8 = SBV Word8 Source #

8-bit unsigned symbolic value

type SWord16 = SBV Word16 Source #

16-bit unsigned symbolic value

type SWord32 = SBV Word32 Source #

32-bit unsigned symbolic value

type SWord64 = SBV Word64 Source #

64-bit unsigned symbolic value

type SWord (n :: Nat) = SBV (WordN n) Source #

A symbolic unsigned bit-vector carrying its size info

data WordN (n :: Nat) Source #

An unsigned bit-vector carrying its size info

#### Instances

Instances details

KnownNat n => Arbitrary (WordN n) Source # | Quickcheck instance for WordN
Instance details Defined in Data.SBV.Core.Sized Methods arbitrary :: Gen (WordN n) Source # shrink :: WordN n -> [WordN n] Source #
(KnownNat n, BVIsNonZero n) => Bits (WordN n) Source # |

Instance details

Defined in Data.SBV.Core.Sized

Methods

(.&.) :: WordN n -> WordN n -> WordN n Source #

(.|.) :: WordN n -> WordN n -> WordN n Source #

xor :: WordN n -> WordN n -> WordN n Source #

complement :: WordN n -> WordN n Source #

shift :: WordN n -> Int -> WordN n Source #

rotate :: WordN n -> Int -> WordN n Source #

zeroBits :: WordN n Source #

bit :: Int -> WordN n Source #

setBit :: WordN n -> Int -> WordN n Source #

clearBit :: WordN n -> Int -> WordN n Source #

complementBit :: WordN n -> Int -> WordN n Source #

testBit :: WordN n -> Int -> Bool Source #

bitSizeMaybe :: WordN n -> Maybe Int Source #

bitSize :: WordN n -> Int Source #

isSigned :: WordN n -> Bool Source #

shiftL :: WordN n -> Int -> WordN n Source #

unsafeShiftL :: WordN n -> Int -> WordN n Source #

shiftR :: WordN n -> Int -> WordN n Source #

unsafeShiftR :: WordN n -> Int -> WordN n Source #

rotateL :: WordN n -> Int -> WordN n Source #

rotateR :: WordN n -> Int -> WordN n Source #

popCount :: WordN n -> Int Source #

(KnownNat n, BVIsNonZero n) => Bounded (WordN n) Source # | `Bounded` instance for `WordN`
Instance details Defined in Data.SBV.Core.Sized Methods minBound :: WordN n Source # maxBound :: WordN n Source #
(KnownNat n, BVIsNonZero n) => Enum (WordN n) Source # | `Enum` instance for `WordN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

succ :: WordN n -> WordN n Source #

pred :: WordN n -> WordN n Source #

toEnum :: Int -> WordN n Source #

fromEnum :: WordN n -> Int Source #

enumFrom :: WordN n -> [WordN n] Source #

enumFromThen :: WordN n -> WordN n -> [WordN n] Source #

enumFromTo :: WordN n -> WordN n -> [WordN n] Source #

enumFromThenTo :: WordN n -> WordN n -> WordN n -> [WordN n] Source #

(KnownNat n, BVIsNonZero n) => Num (WordN n) Source # | `Num` instance for `WordN`
Instance details Defined in Data.SBV.Core.Sized Methods (+) :: WordN n -> WordN n -> WordN n Source # (-) :: WordN n -> WordN n -> WordN n Source # (*) :: WordN n -> WordN n -> WordN n Source # negate :: WordN n -> WordN n Source # abs :: WordN n -> WordN n Source # signum :: WordN n -> WordN n Source # fromInteger :: Integer -> WordN n Source #
(KnownNat n, BVIsNonZero n) => Integral (WordN n) Source # | `Integral` instance for `WordN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

quot :: WordN n -> WordN n -> WordN n Source #

rem :: WordN n -> WordN n -> WordN n Source #

div :: WordN n -> WordN n -> WordN n Source #

mod :: WordN n -> WordN n -> WordN n Source #

quotRem :: WordN n -> WordN n -> (WordN n, WordN n) Source #

divMod :: WordN n -> WordN n -> (WordN n, WordN n) Source #

toInteger :: WordN n -> Integer Source #

(KnownNat n, BVIsNonZero n) => Real (WordN n) Source # | `Real` instance for `WordN`
Instance details Defined in Data.SBV.Core.Sized Methods toRational :: WordN n -> Rational Source #
Show (WordN n) Source # | Show instance for `WordN`
Instance details Defined in Data.SBV.Core.Sized Methods showsPrec :: Int -> WordN n -> ShowS Source # show :: WordN n -> String Source # showList :: [WordN n] -> ShowS Source #
Eq (WordN n) Source # |
Instance details Defined in Data.SBV.Core.Sized Methods (==) :: WordN n -> WordN n -> Bool Source # (/=) :: WordN n -> WordN n -> Bool Source #
Ord (WordN n) Source # |
Instance details Defined in Data.SBV.Core.Sized Methods compare :: WordN n -> WordN n -> Ordering Source # (<) :: WordN n -> WordN n -> Bool Source # (<=) :: WordN n -> WordN n -> Bool Source # (>) :: WordN n -> WordN n -> Bool Source # (>=) :: WordN n -> WordN n -> Bool Source # max :: WordN n -> WordN n -> WordN n Source # min :: WordN n -> WordN n -> WordN n Source #
ByteConverter (SWord 8) Source # | `SWord` 8 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 8 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 8 Source #
ByteConverter (SWord 16) Source # | `SWord` 16 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 16 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 16 Source #
ByteConverter (SWord 32) Source # | `SWord` 32 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 32 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 32 Source #
ByteConverter (SWord 64) Source # | `SWord` 64 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 64 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 64 Source #
ByteConverter (SWord 128) Source # | `SWord` 128 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 128 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 128 Source #
ByteConverter (SWord 256) Source # | `SWord` 256 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 256 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 256 Source #
ByteConverter (SWord 512) Source # | `SWord` 512 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 512 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 512 Source #
ByteConverter (SWord 1024) Source # | `SWord` 1024 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 1024 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 1024 Source #
(KnownNat n, BVIsNonZero n) => SymVal (WordN n) Source # | `SymVal` instance for `WordN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (WordN n)) Source #

literal :: WordN n -> SBV (WordN n) Source #

fromCV :: CV -> WordN n Source #

isConcretely :: SBV (WordN n) -> (WordN n -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (WordN n)) Source #

free_ :: MonadSymbolic m => m (SBV (WordN n)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (WordN n)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (WordN n)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (WordN n)] Source #

unliteral :: SBV (WordN n) -> Maybe (WordN n) Source #

isConcrete :: SBV (WordN n) -> Bool Source #

isSymbolic :: SBV (WordN n) -> Bool Source #

(KnownNat n, BVIsNonZero n) => HasKind (WordN n) Source # | `WordN` has a kind

Instance details

Defined in Data.SBV.Core.Sized

Methods

kindOf :: WordN n -> Kind Source #

hasSign :: WordN n -> Bool Source #

intSizeOf :: WordN n -> Int Source #

isBoolean :: WordN n -> Bool Source #

isBounded :: WordN n -> Bool Source #

isReal :: WordN n -> Bool Source #

isFloat :: WordN n -> Bool Source #

isDouble :: WordN n -> Bool Source #

isRational :: WordN n -> Bool Source #

isFP :: WordN n -> Bool Source #

isUnbounded :: WordN n -> Bool Source #

isUserSort :: WordN n -> Bool Source #

isChar :: WordN n -> Bool Source #

isString :: WordN n -> Bool Source #

isList :: WordN n -> Bool Source #

isSet :: WordN n -> Bool Source #

isTuple :: WordN n -> Bool Source #

isMaybe :: WordN n -> Bool Source #

isEither :: WordN n -> Bool Source #

showType :: WordN n -> String Source #

(KnownNat n, BVIsNonZero n) => Metric (WordN n) Source # | Optimizing `WordN`

Instance details

Defined in Data.SBV.Core.Sized

Associated Types

type MetricSpace (WordN n) Source #

Methods

toMetricSpace :: SBV (WordN n) -> SBV (MetricSpace (WordN n)) Source #

fromMetricSpace :: SBV (MetricSpace (WordN n)) -> SBV (WordN n) Source #

msMinimize :: (MonadSymbolic m, SolverContext m) => String -> SBV (WordN n) -> m () Source #

msMaximize :: (MonadSymbolic m, SolverContext m) => String -> SBV (WordN n) -> m () Source #

(KnownNat n, BVIsNonZero n) => SDivisible (SWord n) Source # | `SDivisible` instance for `SWord`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: SWord n -> SWord n -> (SWord n, SWord n) Source # sDivMod :: SWord n -> SWord n -> (SWord n, SWord n) Source # sQuot :: SWord n -> SWord n -> SWord n Source # sRem :: SWord n -> SWord n -> SWord n Source # sDiv :: SWord n -> SWord n -> SWord n Source # sMod :: SWord n -> SWord n -> SWord n Source #
(KnownNat n, BVIsNonZero n) => SDivisible (WordN n) Source # | `SDivisible` instance for `WordN`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: WordN n -> WordN n -> (WordN n, WordN n) Source # sDivMod :: WordN n -> WordN n -> (WordN n, WordN n) Source # sQuot :: WordN n -> WordN n -> WordN n Source # sRem :: WordN n -> WordN n -> WordN n Source # sDiv :: WordN n -> WordN n -> WordN n Source # sMod :: WordN n -> WordN n -> WordN n Source #
(KnownNat n, BVIsNonZero n) => SFiniteBits (WordN n) Source # | `SFiniteBits` instance for `WordN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

sFiniteBitSize :: SBV (WordN n) -> Int Source #

lsb :: SBV (WordN n) -> SBool Source #

msb :: SBV (WordN n) -> SBool Source #

blastBE :: SBV (WordN n) -> [SBool] Source #

blastLE :: SBV (WordN n) -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV (WordN n) Source #

fromBitsLE :: [SBool] -> SBV (WordN n) Source #

sTestBit :: SBV (WordN n) -> Int -> SBool Source #

sExtractBits :: SBV (WordN n) -> [Int] -> [SBool] Source #

sPopCount :: SBV (WordN n) -> SWord8 Source #

setBitTo :: SBV (WordN n) -> Int -> SBool -> SBV (WordN n) Source #

fullAdder :: SBV (WordN n) -> SBV (WordN n) -> (SBool, SBV (WordN n)) Source #

fullMultiplier :: SBV (WordN n) -> SBV (WordN n) -> (SBV (WordN n), SBV (WordN n)) Source #

sCountLeadingZeros :: SBV (WordN n) -> SWord8 Source #

sCountTrailingZeros :: SBV (WordN n) -> SWord8 Source #

(KnownNat n, BVIsNonZero n) => SIntegral (WordN n) Source # | `SIntegral` instance for `WordN`
Instance details Defined in Data.SBV.Core.Sized
(KnownNat n, BVIsNonZero n) => SatModel (WordN n) Source # | Constructing models for `WordN`
Instance details Defined in Data.SBV.Core.Sized Methods parseCVs :: [CV] -> Maybe (WordN n, [CV]) Source # cvtModel :: (WordN n -> Maybe b) -> Maybe (WordN n, [CV]) -> Maybe (b, [CV]) Source #
(KnownNat n, BVIsNonZero n) => ArithOverflow (SWord n) Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SWord n -> SWord n -> (SBool, SBool) Source # bvSubO :: SWord n -> SWord n -> (SBool, SBool) Source # bvMulO :: SWord n -> SWord n -> (SBool, SBool) Source # bvMulOFast :: SWord n -> SWord n -> (SBool, SBool) Source # bvDivO :: SWord n -> SWord n -> (SBool, SBool) Source # bvNegO :: SWord n -> (SBool, SBool) Source #
(KnownNat n, BVIsNonZero n) => CheckedArithmetic (WordN n) Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods (+!) :: SBV (WordN n) -> SBV (WordN n) -> SBV (WordN n) Source # (-!) :: SBV (WordN n) -> SBV (WordN n) -> SBV (WordN n) Source # (*!) :: SBV (WordN n) -> SBV (WordN n) -> SBV (WordN n) Source # (/!) :: SBV (WordN n) -> SBV (WordN n) -> SBV (WordN n) Source # negateChecked :: SBV (WordN n) -> SBV (WordN n) Source #
(KnownNat n, BVIsNonZero n) => Polynomial (SWord n) Source # |

Instance details

Defined in Data.SBV.Tools.Polynomial

Methods

polynomial :: [Int] -> SWord n Source #

pAdd :: SWord n -> SWord n -> SWord n Source #

pMult :: (SWord n, SWord n, [Int]) -> SWord n Source #

pDiv :: SWord n -> SWord n -> SWord n Source #

pMod :: SWord n -> SWord n -> SWord n Source #

pDivMod :: SWord n -> SWord n -> (SWord n, SWord n) Source #

showPoly :: SWord n -> String Source #

showPolynomial :: Bool -> SWord n -> String Source #

type MetricSpace (WordN n) Source # |
Instance details Defined in Data.SBV.Core.Sized type MetricSpace (WordN n) = WordN n

### Signed bit-vectors

type SInt8 = SBV Int8 Source #

8-bit signed symbolic value, 2's complement representation

type SInt16 = SBV Int16 Source #

16-bit signed symbolic value, 2's complement representation

type SInt32 = SBV Int32 Source #

32-bit signed symbolic value, 2's complement representation

type SInt64 = SBV Int64 Source #

64-bit signed symbolic value, 2's complement representation

type SInt (n :: Nat) = SBV (IntN n) Source #

A symbolic signed bit-vector carrying its size info

data IntN (n :: Nat) Source #

A signed bit-vector carrying its size info

#### Instances

Instances details

KnownNat n => Arbitrary (IntN n) Source # | Quickcheck instance for IntN
Instance details Defined in Data.SBV.Core.Sized Methods arbitrary :: Gen (IntN n) Source # shrink :: IntN n -> [IntN n] Source #
(KnownNat n, BVIsNonZero n) => Bits (IntN n) Source # |

Instance details

Defined in Data.SBV.Core.Sized

Methods

(.&.) :: IntN n -> IntN n -> IntN n Source #

(.|.) :: IntN n -> IntN n -> IntN n Source #

xor :: IntN n -> IntN n -> IntN n Source #

complement :: IntN n -> IntN n Source #

shift :: IntN n -> Int -> IntN n Source #

rotate :: IntN n -> Int -> IntN n Source #

zeroBits :: IntN n Source #

bit :: Int -> IntN n Source #

setBit :: IntN n -> Int -> IntN n Source #

clearBit :: IntN n -> Int -> IntN n Source #

complementBit :: IntN n -> Int -> IntN n Source #

testBit :: IntN n -> Int -> Bool Source #

bitSizeMaybe :: IntN n -> Maybe Int Source #

bitSize :: IntN n -> Int Source #

isSigned :: IntN n -> Bool Source #

shiftL :: IntN n -> Int -> IntN n Source #

unsafeShiftL :: IntN n -> Int -> IntN n Source #

shiftR :: IntN n -> Int -> IntN n Source #

unsafeShiftR :: IntN n -> Int -> IntN n Source #

rotateL :: IntN n -> Int -> IntN n Source #

rotateR :: IntN n -> Int -> IntN n Source #

popCount :: IntN n -> Int Source #

(KnownNat n, BVIsNonZero n) => Bounded (IntN n) Source # | `Bounded` instance for `IntN`
Instance details Defined in Data.SBV.Core.Sized Methods minBound :: IntN n Source # maxBound :: IntN n Source #
(KnownNat n, BVIsNonZero n) => Enum (IntN n) Source # | `Enum` instance for `IntN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

succ :: IntN n -> IntN n Source #

pred :: IntN n -> IntN n Source #

toEnum :: Int -> IntN n Source #

fromEnum :: IntN n -> Int Source #

enumFrom :: IntN n -> [IntN n] Source #

enumFromThen :: IntN n -> IntN n -> [IntN n] Source #

enumFromTo :: IntN n -> IntN n -> [IntN n] Source #

enumFromThenTo :: IntN n -> IntN n -> IntN n -> [IntN n] Source #

(KnownNat n, BVIsNonZero n) => Num (IntN n) Source # | `Num` instance for `IntN`
Instance details Defined in Data.SBV.Core.Sized Methods (+) :: IntN n -> IntN n -> IntN n Source # (-) :: IntN n -> IntN n -> IntN n Source # (*) :: IntN n -> IntN n -> IntN n Source # negate :: IntN n -> IntN n Source # abs :: IntN n -> IntN n Source # signum :: IntN n -> IntN n Source # fromInteger :: Integer -> IntN n Source #
(KnownNat n, BVIsNonZero n) => Integral (IntN n) Source # | `Integral` instance for `IntN`
Instance details Defined in Data.SBV.Core.Sized Methods quot :: IntN n -> IntN n -> IntN n Source # rem :: IntN n -> IntN n -> IntN n Source # div :: IntN n -> IntN n -> IntN n Source # mod :: IntN n -> IntN n -> IntN n Source # quotRem :: IntN n -> IntN n -> (IntN n, IntN n) Source # divMod :: IntN n -> IntN n -> (IntN n, IntN n) Source # toInteger :: IntN n -> Integer Source #
(KnownNat n, BVIsNonZero n) => Real (IntN n) Source # | `Real` instance for `IntN`
Instance details Defined in Data.SBV.Core.Sized Methods toRational :: IntN n -> Rational Source #
Show (IntN n) Source # | Show instance for `IntN`
Instance details Defined in Data.SBV.Core.Sized Methods showsPrec :: Int -> IntN n -> ShowS Source # show :: IntN n -> String Source # showList :: [IntN n] -> ShowS Source #
Eq (IntN n) Source # |
Instance details Defined in Data.SBV.Core.Sized Methods (==) :: IntN n -> IntN n -> Bool Source # (/=) :: IntN n -> IntN n -> Bool Source #
Ord (IntN n) Source # |
Instance details Defined in Data.SBV.Core.Sized Methods compare :: IntN n -> IntN n -> Ordering Source # (<) :: IntN n -> IntN n -> Bool Source # (<=) :: IntN n -> IntN n -> Bool Source # (>) :: IntN n -> IntN n -> Bool Source # (>=) :: IntN n -> IntN n -> Bool Source # max :: IntN n -> IntN n -> IntN n Source # min :: IntN n -> IntN n -> IntN n Source #
(KnownNat n, BVIsNonZero n) => SymVal (IntN n) Source # | `SymVal` instance for `IntN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (IntN n)) Source #

literal :: IntN n -> SBV (IntN n) Source #

fromCV :: CV -> IntN n Source #

isConcretely :: SBV (IntN n) -> (IntN n -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (IntN n)) Source #

free_ :: MonadSymbolic m => m (SBV (IntN n)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (IntN n)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (IntN n)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (IntN n)] Source #

unliteral :: SBV (IntN n) -> Maybe (IntN n) Source #

isConcrete :: SBV (IntN n) -> Bool Source #

isSymbolic :: SBV (IntN n) -> Bool Source #

(KnownNat n, BVIsNonZero n) => HasKind (IntN n) Source # | `IntN` has a kind

Instance details

Defined in Data.SBV.Core.Sized

Methods

kindOf :: IntN n -> Kind Source #

hasSign :: IntN n -> Bool Source #

intSizeOf :: IntN n -> Int Source #

isBoolean :: IntN n -> Bool Source #

isBounded :: IntN n -> Bool Source #

isReal :: IntN n -> Bool Source #

isFloat :: IntN n -> Bool Source #

isDouble :: IntN n -> Bool Source #

isRational :: IntN n -> Bool Source #

isFP :: IntN n -> Bool Source #

isUnbounded :: IntN n -> Bool Source #

isUserSort :: IntN n -> Bool Source #

isChar :: IntN n -> Bool Source #

isString :: IntN n -> Bool Source #

isList :: IntN n -> Bool Source #

isSet :: IntN n -> Bool Source #

isTuple :: IntN n -> Bool Source #

isMaybe :: IntN n -> Bool Source #

isEither :: IntN n -> Bool Source #

showType :: IntN n -> String Source #

(KnownNat n, BVIsNonZero n) => Metric (IntN n) Source # | Optimizing `IntN`

Instance details

Defined in Data.SBV.Core.Sized

Associated Types

type MetricSpace (IntN n) Source #

Methods

toMetricSpace :: SBV (IntN n) -> SBV (MetricSpace (IntN n)) Source #

fromMetricSpace :: SBV (MetricSpace (IntN n)) -> SBV (IntN n) Source #

msMinimize :: (MonadSymbolic m, SolverContext m) => String -> SBV (IntN n) -> m () Source #

msMaximize :: (MonadSymbolic m, SolverContext m) => String -> SBV (IntN n) -> m () Source #

(KnownNat n, BVIsNonZero n) => SDivisible (IntN n) Source # | `SDivisible` instance for `IntN`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: IntN n -> IntN n -> (IntN n, IntN n) Source # sDivMod :: IntN n -> IntN n -> (IntN n, IntN n) Source # sQuot :: IntN n -> IntN n -> IntN n Source # sRem :: IntN n -> IntN n -> IntN n Source # sDiv :: IntN n -> IntN n -> IntN n Source # sMod :: IntN n -> IntN n -> IntN n Source #
(KnownNat n, BVIsNonZero n) => SDivisible (SInt n) Source # | `SDivisible` instance for `SInt`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: SInt n -> SInt n -> (SInt n, SInt n) Source # sDivMod :: SInt n -> SInt n -> (SInt n, SInt n) Source # sQuot :: SInt n -> SInt n -> SInt n Source # sRem :: SInt n -> SInt n -> SInt n Source # sDiv :: SInt n -> SInt n -> SInt n Source # sMod :: SInt n -> SInt n -> SInt n Source #
(KnownNat n, BVIsNonZero n) => SFiniteBits (IntN n) Source # | `SFiniteBits` instance for `IntN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

sFiniteBitSize :: SBV (IntN n) -> Int Source #

lsb :: SBV (IntN n) -> SBool Source #

msb :: SBV (IntN n) -> SBool Source #

blastBE :: SBV (IntN n) -> [SBool] Source #

blastLE :: SBV (IntN n) -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV (IntN n) Source #

fromBitsLE :: [SBool] -> SBV (IntN n) Source #

sTestBit :: SBV (IntN n) -> Int -> SBool Source #

sExtractBits :: SBV (IntN n) -> [Int] -> [SBool] Source #

sPopCount :: SBV (IntN n) -> SWord8 Source #

setBitTo :: SBV (IntN n) -> Int -> SBool -> SBV (IntN n) Source #

fullAdder :: SBV (IntN n) -> SBV (IntN n) -> (SBool, SBV (IntN n)) Source #

fullMultiplier :: SBV (IntN n) -> SBV (IntN n) -> (SBV (IntN n), SBV (IntN n)) Source #

sCountLeadingZeros :: SBV (IntN n) -> SWord8 Source #

sCountTrailingZeros :: SBV (IntN n) -> SWord8 Source #

(KnownNat n, BVIsNonZero n) => SIntegral (IntN n) Source # | `SIntegral` instance for `IntN`
Instance details Defined in Data.SBV.Core.Sized
(KnownNat n, BVIsNonZero n) => SatModel (IntN n) Source # | Constructing models for `IntN`
Instance details Defined in Data.SBV.Core.Sized Methods parseCVs :: [CV] -> Maybe (IntN n, [CV]) Source # cvtModel :: (IntN n -> Maybe b) -> Maybe (IntN n, [CV]) -> Maybe (b, [CV]) Source #
(KnownNat n, BVIsNonZero n) => ArithOverflow (SInt n) Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SInt n -> SInt n -> (SBool, SBool) Source # bvSubO :: SInt n -> SInt n -> (SBool, SBool) Source # bvMulO :: SInt n -> SInt n -> (SBool, SBool) Source # bvMulOFast :: SInt n -> SInt n -> (SBool, SBool) Source # bvDivO :: SInt n -> SInt n -> (SBool, SBool) Source # bvNegO :: SInt n -> (SBool, SBool) Source #
(KnownNat n, BVIsNonZero n) => CheckedArithmetic (IntN n) Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods (+!) :: SBV (IntN n) -> SBV (IntN n) -> SBV (IntN n) Source # (-!) :: SBV (IntN n) -> SBV (IntN n) -> SBV (IntN n) Source # (*!) :: SBV (IntN n) -> SBV (IntN n) -> SBV (IntN n) Source # (/!) :: SBV (IntN n) -> SBV (IntN n) -> SBV (IntN n) Source # negateChecked :: SBV (IntN n) -> SBV (IntN n) Source #
type MetricSpace (IntN n) Source # |
Instance details Defined in Data.SBV.Core.Sized type MetricSpace (IntN n) = WordN n

### Converting between fixed-size and arbitrary bitvectors

type family BVIsNonZero (arg :: Nat) :: Constraint where ... Source #

Type family to create the appropriate non-zero constraint

Equations

BVIsNonZero 0 = TypeError BVZeroWidth |
BVIsNonZero _ = () |

type family FromSized (t :: Type) :: Type where ... Source #

Capture the correspondence between sized and fixed-sized BVs

Equations

FromSized (WordN 8) = Word8 |
FromSized (WordN 16) = Word16 |
FromSized (WordN 32) = Word32 |
FromSized (WordN 64) = Word64 |
FromSized (IntN 8) = Int8 |
FromSized (IntN 16) = Int16 |
FromSized (IntN 32) = Int32 |
FromSized (IntN 64) = Int64 |
FromSized (SWord 8) = SWord8 |
FromSized (SWord 16) = SWord16 |
FromSized (SWord 32) = SWord32 |
FromSized (SWord 64) = SWord64 |
FromSized (SInt 8) = SInt8 |
FromSized (SInt 16) = SInt16 |
FromSized (SInt 32) = SInt32 |
FromSized (SInt 64) = SInt64 |

type family ToSized (t :: Type) :: Type where ... Source #

Capture the correspondence between fixed-sized and sized BVs

Equations

ToSized Word8 = WordN 8 |
ToSized Word16 = WordN 16 |
ToSized Word32 = WordN 32 |
ToSized Word64 = WordN 64 |
ToSized Int8 = IntN 8 |
ToSized Int16 = IntN 16 |
ToSized Int32 = IntN 32 |
ToSized Int64 = IntN 64 |
ToSized SWord8 = SWord 8 |
ToSized SWord16 = SWord 16 |
ToSized SWord32 = SWord 32 |
ToSized SWord64 = SWord 64 |
ToSized SInt8 = SInt 8 |
ToSized SInt16 = SInt 16 |
ToSized SInt32 = SInt 32 |
ToSized SInt64 = SInt 64 |

fromSized :: FromSizedBV a => a -> FromSized a Source #

Convert a sized bit-vector to the corresponding fixed-sized bit-vector, for instance 'SWord 16' to `SWord16`. See also `toSized`.

toSized :: ToSizedBV a => a -> ToSized a Source #

Convert a fixed-sized bit-vector to the corresponding sized bit-vector, for instance `SWord16` to 'SWord 16'. See also `fromSized`.

## Unbounded integers

type SInteger = SBV Integer Source #

Infinite precision signed symbolic value

## Floating point numbers

type SFloat = SBV Float Source #

IEEE-754 single-precision floating point numbers

type SDouble = SBV Double Source #

IEEE-754 double-precision floating point numbers

type SFloatingPoint (eb :: Nat) (sb :: Nat) = SBV (FloatingPoint eb sb) Source #

A symbolic arbitrary precision floating point value

## Algebraic reals

type SReal = SBV AlgReal Source #

Infinite precision symbolic algebraic real value

data AlgReal Source #

Algebraic reals. Note that the representation is left abstract. We represent rational results explicitly, while the roots-of-polynomials are represented implicitly by their defining equation

#### Instances

Instances details

Arbitrary AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods arbitrary :: Gen AlgReal Source # shrink :: AlgReal -> [AlgReal] Source #
Floating SReal Source # | SReal Floating instance, used in conjunction with the dReal solver for delta-satisfiability. Note that we do not constant fold these values (except for pi), as Haskell doesn't really have any means of computing them for arbitrary rationals.

Instance details

Defined in Data.SBV.Core.Model

Methods

pi :: SReal Source #

exp :: SReal -> SReal Source #

log :: SReal -> SReal Source #

sqrt :: SReal -> SReal Source #

(**) :: SReal -> SReal -> SReal Source #

logBase :: SReal -> SReal -> SReal Source #

sin :: SReal -> SReal Source #

cos :: SReal -> SReal Source #

tan :: SReal -> SReal Source #

asin :: SReal -> SReal Source #

acos :: SReal -> SReal Source #

atan :: SReal -> SReal Source #

sinh :: SReal -> SReal Source #

cosh :: SReal -> SReal Source #

tanh :: SReal -> SReal Source #

asinh :: SReal -> SReal Source #

acosh :: SReal -> SReal Source #

atanh :: SReal -> SReal Source #

log1p :: SReal -> SReal Source #

expm1 :: SReal -> SReal Source #

log1pexp :: SReal -> SReal Source #

log1mexp :: SReal -> SReal Source #

Num AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods (+) :: AlgReal -> AlgReal -> AlgReal Source # (-) :: AlgReal -> AlgReal -> AlgReal Source # (*) :: AlgReal -> AlgReal -> AlgReal Source # negate :: AlgReal -> AlgReal Source # abs :: AlgReal -> AlgReal Source # signum :: AlgReal -> AlgReal Source # fromInteger :: Integer -> AlgReal Source #
Fractional AlgReal Source # | NB: Following the other types we have, we require `a/0` to be `0` for all a.
Instance details Defined in Data.SBV.Core.AlgReals Methods (/) :: AlgReal -> AlgReal -> AlgReal Source # recip :: AlgReal -> AlgReal Source # fromRational :: Rational -> AlgReal Source #
Real AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods toRational :: AlgReal -> Rational Source #
Show AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods showsPrec :: Int -> AlgReal -> ShowS Source # show :: AlgReal -> String Source # showList :: [AlgReal] -> ShowS Source #
Eq AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods (==) :: AlgReal -> AlgReal -> Bool Source # (/=) :: AlgReal -> AlgReal -> Bool Source #
Ord AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods compare :: AlgReal -> AlgReal -> Ordering Source # (<) :: AlgReal -> AlgReal -> Bool Source # (<=) :: AlgReal -> AlgReal -> Bool Source # (>) :: AlgReal -> AlgReal -> Bool Source # (>=) :: AlgReal -> AlgReal -> Bool Source # max :: AlgReal -> AlgReal -> AlgReal Source # min :: AlgReal -> AlgReal -> AlgReal Source #
Random AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods randomR :: RandomGen g => (AlgReal, AlgReal) -> g -> (AlgReal, g) Source # random :: RandomGen g => g -> (AlgReal, g) Source # randomRs :: RandomGen g => (AlgReal, AlgReal) -> g -> [AlgReal] Source # randoms :: RandomGen g => g -> [AlgReal] Source #
SymVal AlgReal Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV AlgReal) Source #

literal :: AlgReal -> SBV AlgReal Source #

fromCV :: CV -> AlgReal Source #

isConcretely :: SBV AlgReal -> (AlgReal -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV AlgReal) Source #

free_ :: MonadSymbolic m => m (SBV AlgReal) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV AlgReal] Source #

symbolic :: MonadSymbolic m => String -> m (SBV AlgReal) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV AlgReal] Source #

unliteral :: SBV AlgReal -> Maybe AlgReal Source #

isConcrete :: SBV AlgReal -> Bool Source #

isSymbolic :: SBV AlgReal -> Bool Source #

IEEEFloatConvertible AlgReal Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV AlgReal Source #

toSFloat :: SRoundingMode -> SBV AlgReal -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV AlgReal Source #

toSDouble :: SRoundingMode -> SBV AlgReal -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV AlgReal Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV AlgReal -> SFloatingPoint eb sb Source #

HasKind AlgReal Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: AlgReal -> Kind Source #

hasSign :: AlgReal -> Bool Source #

intSizeOf :: AlgReal -> Int Source #

isBoolean :: AlgReal -> Bool Source #

isBounded :: AlgReal -> Bool Source #

isReal :: AlgReal -> Bool Source #

isFloat :: AlgReal -> Bool Source #

isDouble :: AlgReal -> Bool Source #

isRational :: AlgReal -> Bool Source #

isFP :: AlgReal -> Bool Source #

isUnbounded :: AlgReal -> Bool Source #

isUserSort :: AlgReal -> Bool Source #

isChar :: AlgReal -> Bool Source #

isString :: AlgReal -> Bool Source #

isList :: AlgReal -> Bool Source #

isSet :: AlgReal -> Bool Source #

isTuple :: AlgReal -> Bool Source #

isMaybe :: AlgReal -> Bool Source #

isEither :: AlgReal -> Bool Source #

showType :: AlgReal -> String Source #

Metric AlgReal Source # |

Instance details

Defined in Data.SBV.Core.Model

Associated Types

type MetricSpace AlgReal Source #

Methods

toMetricSpace :: SBV AlgReal -> SBV (MetricSpace AlgReal) Source #

fromMetricSpace :: SBV (MetricSpace AlgReal) -> SBV AlgReal Source #

msMinimize :: (MonadSymbolic m, SolverContext m) => String -> SBV AlgReal -> m () Source #

msMaximize :: (MonadSymbolic m, SolverContext m) => String -> SBV AlgReal -> m () Source #

SatModel AlgReal Source # | `AlgReal` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (AlgReal, [CV]) Source # cvtModel :: (AlgReal -> Maybe b) -> Maybe (AlgReal, [CV]) -> Maybe (b, [CV]) Source #
type MetricSpace AlgReal Source # |
Instance details Defined in Data.SBV.Core.Model type MetricSpace AlgReal = AlgReal

sRealToSInteger :: SReal -> SInteger Source #

Convert an SReal to an SInteger. That is, it computes the largest integer `n` that satisfies `sIntegerToSReal n <= r` essentially giving us the `floor`.

For instance, `1.3` will be `1`, but `-1.3` will be `-2`.

## Characters, Strings and Regular Expressions

type SChar = SBV Char Source #

A symbolic character. Note that this is the full unicode character set. see: http://smtlib.cs.uiowa.edu/theories-UnicodeStrings.shtml for details.

type SString = SBV String Source #

A symbolic string. Note that a symbolic string is not a list of symbolic characters, that is, it is not the case that `SString = [SChar]`, unlike what one might expect following Haskell strings. An `SString` is a symbolic value of its own, of possibly arbitrary but finite length, and internally processed as one unit as opposed to a fixed-length list of characters.

## Symbolic lists

type SList a = SBV [a] Source #

A symbolic list of items. Note that a symbolic list is not a list of symbolic items, that is, it is not the case that `SList a = [a]`, unlike what one might expect following haskell lists/sequences. An `SList` is a symbolic value of its own, of possibly arbitrary but finite length, and internally processed as one unit as opposed to a fixed-length list of items. Note that lists can be nested, i.e., we do allow lists of lists of ... items.

# Arrays of symbolic values

class SymArray array where Source #

Arrays of symbolic values An `array a b` is an array indexed by the type ``SBV` a`, with elements of type ``SBV` b`.

If a default value is supplied, then all the array elements will be initialized to this value. Otherwise, they will be left unspecified, i.e., a read from an unwritten location will produce an uninterpreted constant.

The reason for this class is rather historic. In the past, SBV provided two different kinds of arrays: an `SArray` abstraction that mapped directly to SMTLib arrays (which is still available today), and a functional notion of arrays that used internal caching, called `SFunArray`. The latter has been removed as the code turned out to be rather tricky and hard to maintain; so we only have one instance of this class. But end users can add their own instances, if needed.

NB. `sListArray` insists on a concrete initializer, because not having one would break referential transparency. See https://github.com/LeventErkok/sbv/issues/553 for details.

Minimal complete definition

readArray, writeArray, mergeArrays, (newArray_, newArray | newArrayInState), sListArray

Methods

newArray_ :: (MonadSymbolic m, HasKind a, HasKind b) => Maybe (SBV b) -> m (array a b) Source #

Generalization of `newArray_`

newArray :: (MonadSymbolic m, HasKind a, HasKind b) => String -> Maybe (SBV b) -> m (array a b) Source #

Generalization of `newArray`

readArray :: array a b -> SBV a -> SBV b Source #

Read the array element at `a`

writeArray :: SymVal b => array a b -> SBV a -> SBV b -> array a b Source #

Update the element at `a` to be `b`

mergeArrays :: SymVal b => SBV Bool -> array a b -> array a b -> array a b Source #

Merge two given arrays on the symbolic condition Intuitively: `mergeArrays cond a b = if cond then a else b`. Merging pushes the if-then-else choice down on to elements

#### Instances

Instances details

SymArray SArray Source # |

Instance details

Defined in Data.SBV.Core.Data

Methods

newArray_ :: (MonadSymbolic m, HasKind a, HasKind b) => Maybe (SBV b) -> m (SArray a b) Source #

newArray :: (MonadSymbolic m, HasKind a, HasKind b) => String -> Maybe (SBV b) -> m (SArray a b) Source #

sListArray :: (HasKind a, SymVal b) => b -> [(SBV a, SBV b)] -> SArray a b Source #

readArray :: SArray a b -> SBV a -> SBV b Source #

writeArray :: SymVal b => SArray a b -> SBV a -> SBV b -> SArray a b Source #

mergeArrays :: SymVal b => SBV Bool -> SArray a b -> SArray a b -> SArray a b Source #

newArrayInState :: (HasKind a, HasKind b) => Maybe String -> Either (Maybe (SBV b)) String -> State -> IO (SArray a b) Source #

data SArray a b Source #

Arrays implemented in terms of SMT-arrays: http://smtlib.cs.uiowa.edu/theories-ArraysEx.shtml

- Maps directly to SMT-lib arrays
- Reading from an uninitialized value is OK. If the default value is given in `newArray`, it will be the result. Otherwise, the read yields an uninterpreted constant.
- Can check for equality of these arrays
- Cannot be used in code-generation (i.e., compilation to C)
- Cannot quick-check theorems using `SArray` values

#### Instances

Instances details

SymArray SArray Source # |

Instance details

Defined in Data.SBV.Core.Data

Methods

newArray_ :: (MonadSymbolic m, HasKind a, HasKind b) => Maybe (SBV b) -> m (SArray a b) Source #

newArray :: (MonadSymbolic m, HasKind a, HasKind b) => String -> Maybe (SBV b) -> m (SArray a b) Source #

sListArray :: (HasKind a, SymVal b) => b -> [(SBV a, SBV b)] -> SArray a b Source #

readArray :: SArray a b -> SBV a -> SBV b Source #

writeArray :: SymVal b => SArray a b -> SBV a -> SBV b -> SArray a b Source #

mergeArrays :: SymVal b => SBV Bool -> SArray a b -> SArray a b -> SArray a b Source #

newArrayInState :: (HasKind a, HasKind b) => Maybe String -> Either (Maybe (SBV b)) String -> State -> IO (SArray a b) Source #

(HasKind a, HasKind b, ProvableM m p) => ProvableM m (SArray a b -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (SArray a b -> p) -> SymbolicT m SBool Source #

prove :: (SArray a b -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> (SArray a b -> p) -> m ThmResult Source #

dprove :: (SArray a b -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> (SArray a b -> p) -> m ThmResult Source #

isVacuousProof :: (SArray a b -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (SArray a b -> p) -> m Bool Source #

isTheorem :: (SArray a b -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> (SArray a b -> p) -> m Bool Source #

(HasKind a, HasKind b, SatisfiableM m p) => SatisfiableM m (SArray a b -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (SArray a b -> p) -> SymbolicT m SBool Source #

sat :: (SArray a b -> p) -> m SatResult Source #

satWith :: SMTConfig -> (SArray a b -> p) -> m SatResult Source #

dsat :: (SArray a b -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> (SArray a b -> p) -> m SatResult Source #

allSat :: (SArray a b -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (SArray a b -> p) -> m AllSatResult Source #

isSatisfiable :: (SArray a b -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (SArray a b -> p) -> m Bool Source #

optimize :: OptimizeStyle -> (SArray a b -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (SArray a b -> p) -> m OptimizeResult Source #

(HasKind a, HasKind b) => Show (SArray a b) Source # |
Instance details Defined in Data.SBV.Core.Data Methods showsPrec :: Int -> SArray a b -> ShowS Source # show :: SArray a b -> String Source # showList :: [SArray a b] -> ShowS Source #
EqSymbolic (SArray a b) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: SArray a b -> SArray a b -> SBool Source #

(./=) :: SArray a b -> SArray a b -> SBool Source #

(.===) :: SArray a b -> SArray a b -> SBool Source #

(./==) :: SArray a b -> SArray a b -> SBool Source #

distinct :: [SArray a b] -> SBool Source #

distinctExcept :: [SArray a b] -> [SArray a b] -> SBool Source #

allEqual :: [SArray a b] -> SBool Source #

sElem :: SArray a b -> [SArray a b] -> SBool Source #

sNotElem :: SArray a b -> [SArray a b] -> SBool Source #

SymVal b => Mergeable (SArray a b) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> SArray a b -> SArray a b -> SArray a b Source # select :: (Ord b0, SymVal b0, Num b0) => [SArray a b] -> SArray a b -> SBV b0 -> SArray a b Source #

# Creating symbolic values

## Single value

sBool :: MonadSymbolic m => String -> m SBool Source #

Generalization of `sBool`

sWord8 :: MonadSymbolic m => String -> m SWord8 Source #

Generalization of `sWord8`

sWord16 :: MonadSymbolic m => String -> m SWord16 Source #

Generalization of `sWord16`

sWord32 :: MonadSymbolic m => String -> m SWord32 Source #

Generalization of `sWord32`

sWord64 :: MonadSymbolic m => String -> m SWord64 Source #

Generalization of `sWord64`

sWord :: (KnownNat n, BVIsNonZero n) => MonadSymbolic m => String -> m (SWord n) Source #

Generalization of `sWord`

sInt8 :: MonadSymbolic m => String -> m SInt8 Source #

Generalization of `sInt8`

sInt16 :: MonadSymbolic m => String -> m SInt16 Source #

Generalization of `sInt16`

sInt32 :: MonadSymbolic m => String -> m SInt32 Source #

Generalization of `sInt32`

sInt64 :: MonadSymbolic m => String -> m SInt64 Source #

Generalization of `sInt64`

sInt :: (KnownNat n, BVIsNonZero n) => MonadSymbolic m => String -> m (SInt n) Source #

Generalization of `sInt`

sInteger :: MonadSymbolic m => String -> m SInteger Source #

Generalization of `sInteger`

sReal :: MonadSymbolic m => String -> m SReal Source #

Generalization of `sReal`

sFloat :: MonadSymbolic m => String -> m SFloat Source #

Generalization of `sFloat`

sDouble :: MonadSymbolic m => String -> m SDouble Source #

Generalization of `sDouble`

sChar :: MonadSymbolic m => String -> m SChar Source #

Generalization of `sChar`

sString :: MonadSymbolic m => String -> m SString Source #

Generalization of `sString`

sList :: (SymVal a, MonadSymbolic m) => String -> m (SList a) Source #

Generalization of `sList`

## List of values

sBools :: MonadSymbolic m => [String] -> m [SBool] Source #

Generalization of `sBools`

sWord8s :: MonadSymbolic m => [String] -> m [SWord8] Source #

Generalization of `sWord8s`

sWord16s :: MonadSymbolic m => [String] -> m [SWord16] Source #

Generalization of `sWord16s`

sWord32s :: MonadSymbolic m => [String] -> m [SWord32] Source #

Generalization of `sWord32s`

sWord64s :: MonadSymbolic m => [String] -> m [SWord64] Source #

Generalization of `sWord64s`

sWords :: (KnownNat n, BVIsNonZero n) => MonadSymbolic m => [String] -> m [SWord n] Source #

Generalization of `sWord64s`

sInt8s :: MonadSymbolic m => [String] -> m [SInt8] Source #

Generalization of `sInt8s`

sInt16s :: MonadSymbolic m => [String] -> m [SInt16] Source #

Generalization of `sInt16s`

sInt32s :: MonadSymbolic m => [String] -> m [SInt32] Source #

Generalization of `sInt32s`

sInt64s :: MonadSymbolic m => [String] -> m [SInt64] Source #

Generalization of `sInt64s`

sInts :: (KnownNat n, BVIsNonZero n) => MonadSymbolic m => [String] -> m [SInt n] Source #

Generalization of `sInts`

sIntegers :: MonadSymbolic m => [String] -> m [SInteger] Source #

Generalization of `sIntegers`

sReals :: MonadSymbolic m => [String] -> m [SReal] Source #

Generalization of `sReals`

sFloats :: MonadSymbolic m => [String] -> m [SFloat] Source #

Generalization of `sFloats`

sDoubles :: MonadSymbolic m => [String] -> m [SDouble] Source #

Generalization of `sDoubles`

sChars :: MonadSymbolic m => [String] -> m [SChar] Source #

Generalization of `sChars`

sStrings :: MonadSymbolic m => [String] -> m [SString] Source #

Generalization of `sStrings`

sLists :: (SymVal a, MonadSymbolic m) => [String] -> m [SList a] Source #

Generalization of `sLists`

# Symbolic Equality and Comparisons

class EqSymbolic a where Source #

Symbolic Equality. Note that we can't use Haskell's `Eq` class since Haskell insists on returning Bool Comparing symbolic values will necessarily return a symbolic value.

Minimal complete definition: None, if the type is instance of `Generic`. Otherwise `(.==)`.

Minimal complete definition

Nothing

Methods

(.==) :: a -> a -> SBool infix 4 Source #

Symbolic equality.

default (.==) :: (Generic a, GEqSymbolic (Rep a)) => a -> a -> SBool Source #

(./=) :: a -> a -> SBool infix 4 Source #

Symbolic inequality.

(.===) :: a -> a -> SBool infix 4 Source #

Strong equality. On floats (`SFloat`/`SDouble`), strong equality is object equality; that is `NaN == NaN` holds, but `+0 == -0` doesn't. On other types, (.===) is simply (.==). Note that (.==) is the right notion of equality for floats per IEEE754 specs, since by definition `+0 == -0` and `NaN` equals no other value including itself. But occasionally we want to be stronger and state `NaN` equals `NaN` and `+0` and `-0` are different from each other. In a context where your type is concrete, simply use `fpIsEqualObject`. But in a polymorphic context, use the strong equality instead.

NB. If you do not care about or work with floats, simply use (.==) and (./=).

(./==) :: a -> a -> SBool infix 4 Source #

Negation of strong equality. Equaivalent to negation of (.===) on all types.

distinct :: [a] -> SBool Source #

Returns (symbolic) `sTrue` if all the elements of the given list are different.

distinctExcept :: [a] -> [a] -> SBool Source #

Returns (symbolic) `sTrue` if all the elements of the given list are different. The second list contains exceptions, i.e., if an element belongs to that set, it will be considered distinct regardless of repetition.

allEqual :: [a] -> SBool Source #

Returns (symbolic) `sTrue` if all the elements of the given list are the same.

sElem :: a -> [a] -> SBool Source #

Symbolic membership test.

sNotElem :: a -> [a] -> SBool Source #

Symbolic negated membership test.

#### Instances

Instances details

EqSymbolic RegExp Source # | Regular expressions can be compared for equality. Note that we diverge here from the equality in the concrete sense; i.e., the Eq instance does not match the symbolic case. This is a bit unfortunate, but unavoidable with the current design of how we "distinguish" operators. Hopefully shouldn't be a big deal, though one should be careful.

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: RegExp -> RegExp -> SBool Source #

(./=) :: RegExp -> RegExp -> SBool Source #

(.===) :: RegExp -> RegExp -> SBool Source #

(./==) :: RegExp -> RegExp -> SBool Source #

distinct :: [RegExp] -> SBool Source #

distinctExcept :: [RegExp] -> [RegExp] -> SBool Source #

allEqual :: [RegExp] -> SBool Source #

sElem :: RegExp -> [RegExp] -> SBool Source #

sNotElem :: RegExp -> [RegExp] -> SBool Source #

EqSymbolic Bool Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: Bool -> Bool -> SBool Source #

(./=) :: Bool -> Bool -> SBool Source #

(.===) :: Bool -> Bool -> SBool Source #

(./==) :: Bool -> Bool -> SBool Source #

distinct :: [Bool] -> SBool Source #

distinctExcept :: [Bool] -> [Bool] -> SBool Source #

allEqual :: [Bool] -> SBool Source #

sElem :: Bool -> [Bool] -> SBool Source #

sNotElem :: Bool -> [Bool] -> SBool Source #

EqSymbolic (SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: SBV a -> SBV a -> SBool Source #

(./=) :: SBV a -> SBV a -> SBool Source #

(.===) :: SBV a -> SBV a -> SBool Source #

(./==) :: SBV a -> SBV a -> SBool Source #

distinct :: [SBV a] -> SBool Source #

distinctExcept :: [SBV a] -> [SBV a] -> SBool Source #

allEqual :: [SBV a] -> SBool Source #

sElem :: SBV a -> [SBV a] -> SBool Source #

sNotElem :: SBV a -> [SBV a] -> SBool Source #

EqSymbolic a => EqSymbolic (S a) Source # | Symbolic equality for `S`.

Instance details

Defined in Documentation.SBV.Examples.ProofTools.BMC

Methods

(.==) :: S a -> S a -> SBool Source #

(./=) :: S a -> S a -> SBool Source #

(.===) :: S a -> S a -> SBool Source #

(./==) :: S a -> S a -> SBool Source #

distinct :: [S a] -> SBool Source #

distinctExcept :: [S a] -> [S a] -> SBool Source #

allEqual :: [S a] -> SBool Source #

sElem :: S a -> [S a] -> SBool Source #

sNotElem :: S a -> [S a] -> SBool Source #

EqSymbolic a => EqSymbolic (Maybe a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: Maybe a -> Maybe a -> SBool Source #

(./=) :: Maybe a -> Maybe a -> SBool Source #

(.===) :: Maybe a -> Maybe a -> SBool Source #

(./==) :: Maybe a -> Maybe a -> SBool Source #

distinct :: [Maybe a] -> SBool Source #

distinctExcept :: [Maybe a] -> [Maybe a] -> SBool Source #

allEqual :: [Maybe a] -> SBool Source #

sElem :: Maybe a -> [Maybe a] -> SBool Source #

sNotElem :: Maybe a -> [Maybe a] -> SBool Source #

EqSymbolic a => EqSymbolic [a] Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: [a] -> [a] -> SBool Source #

(./=) :: [a] -> [a] -> SBool Source #

(.===) :: [a] -> [a] -> SBool Source #

(./==) :: [a] -> [a] -> SBool Source #

distinct :: [[a]] -> SBool Source #

distinctExcept :: [[a]] -> [[a]] -> SBool Source #

allEqual :: [[a]] -> SBool Source #

sElem :: [a] -> [[a]] -> SBool Source #

sNotElem :: [a] -> [[a]] -> SBool Source #

(EqSymbolic a, EqSymbolic b) => EqSymbolic (Either a b) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: Either a b -> Either a b -> SBool Source #

(./=) :: Either a b -> Either a b -> SBool Source #

(.===) :: Either a b -> Either a b -> SBool Source #

(./==) :: Either a b -> Either a b -> SBool Source #

distinct :: [Either a b] -> SBool Source #

distinctExcept :: [Either a b] -> [Either a b] -> SBool Source #

allEqual :: [Either a b] -> SBool Source #

sElem :: Either a b -> [Either a b] -> SBool Source #

sNotElem :: Either a b -> [Either a b] -> SBool Source #

EqSymbolic (SArray a b) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: SArray a b -> SArray a b -> SBool Source #

(./=) :: SArray a b -> SArray a b -> SBool Source #

(.===) :: SArray a b -> SArray a b -> SBool Source #

(./==) :: SArray a b -> SArray a b -> SBool Source #

distinct :: [SArray a b] -> SBool Source #

distinctExcept :: [SArray a b] -> [SArray a b] -> SBool Source #

allEqual :: [SArray a b] -> SBool Source #

sElem :: SArray a b -> [SArray a b] -> SBool Source #

sNotElem :: SArray a b -> [SArray a b] -> SBool Source #

(EqSymbolic a, EqSymbolic b) => EqSymbolic (a, b) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: (a, b) -> (a, b) -> SBool Source #

(./=) :: (a, b) -> (a, b) -> SBool Source #

(.===) :: (a, b) -> (a, b) -> SBool Source #

(./==) :: (a, b) -> (a, b) -> SBool Source #

distinct :: [(a, b)] -> SBool Source #

distinctExcept :: [(a, b)] -> [(a, b)] -> SBool Source #

allEqual :: [(a, b)] -> SBool Source #

sElem :: (a, b) -> [(a, b)] -> SBool Source #

sNotElem :: (a, b) -> [(a, b)] -> SBool Source #

(EqSymbolic a, EqSymbolic b, EqSymbolic c) => EqSymbolic (a, b, c) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: (a, b, c) -> (a, b, c) -> SBool Source #

(./=) :: (a, b, c) -> (a, b, c) -> SBool Source #

(.===) :: (a, b, c) -> (a, b, c) -> SBool Source #

(./==) :: (a, b, c) -> (a, b, c) -> SBool Source #

distinct :: [(a, b, c)] -> SBool Source #

distinctExcept :: [(a, b, c)] -> [(a, b, c)] -> SBool Source #

allEqual :: [(a, b, c)] -> SBool Source #

sElem :: (a, b, c) -> [(a, b, c)] -> SBool Source #

sNotElem :: (a, b, c) -> [(a, b, c)] -> SBool Source #

(EqSymbolic a, EqSymbolic b, EqSymbolic c, EqSymbolic d) => EqSymbolic (a, b, c, d) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: (a, b, c, d) -> (a, b, c, d) -> SBool Source #

(./=) :: (a, b, c, d) -> (a, b, c, d) -> SBool Source #

(.===) :: (a, b, c, d) -> (a, b, c, d) -> SBool Source #

(./==) :: (a, b, c, d) -> (a, b, c, d) -> SBool Source #

distinct :: [(a, b, c, d)] -> SBool Source #

distinctExcept :: [(a, b, c, d)] -> [(a, b, c, d)] -> SBool Source #

allEqual :: [(a, b, c, d)] -> SBool Source #

sElem :: (a, b, c, d) -> [(a, b, c, d)] -> SBool Source #

sNotElem :: (a, b, c, d) -> [(a, b, c, d)] -> SBool Source #

(EqSymbolic a, EqSymbolic b, EqSymbolic c, EqSymbolic d, EqSymbolic e) => EqSymbolic (a, b, c, d, e) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: (a, b, c, d, e) -> (a, b, c, d, e) -> SBool Source #

(./=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> SBool Source #

(.===) :: (a, b, c, d, e) -> (a, b, c, d, e) -> SBool Source #

(./==) :: (a, b, c, d, e) -> (a, b, c, d, e) -> SBool Source #

distinct :: [(a, b, c, d, e)] -> SBool Source #

distinctExcept :: [(a, b, c, d, e)] -> [(a, b, c, d, e)] -> SBool Source #

allEqual :: [(a, b, c, d, e)] -> SBool Source #

sElem :: (a, b, c, d, e) -> [(a, b, c, d, e)] -> SBool Source #

sNotElem :: (a, b, c, d, e) -> [(a, b, c, d, e)] -> SBool Source #

(EqSymbolic a, EqSymbolic b, EqSymbolic c, EqSymbolic d, EqSymbolic e, EqSymbolic f) => EqSymbolic (a, b, c, d, e, f) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> SBool Source #

(./=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> SBool Source #

(.===) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> SBool Source #

(./==) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> SBool Source #

distinct :: [(a, b, c, d, e, f)] -> SBool Source #

distinctExcept :: [(a, b, c, d, e, f)] -> [(a, b, c, d, e, f)] -> SBool Source #

allEqual :: [(a, b, c, d, e, f)] -> SBool Source #

sElem :: (a, b, c, d, e, f) -> [(a, b, c, d, e, f)] -> SBool Source #

sNotElem :: (a, b, c, d, e, f) -> [(a, b, c, d, e, f)] -> SBool Source #

(EqSymbolic a, EqSymbolic b, EqSymbolic c, EqSymbolic d, EqSymbolic e, EqSymbolic f, EqSymbolic g) => EqSymbolic (a, b, c, d, e, f, g) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> SBool Source #

(./=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> SBool Source #

(.===) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> SBool Source #

(./==) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> SBool Source #

distinct :: [(a, b, c, d, e, f, g)] -> SBool Source #

distinctExcept :: [(a, b, c, d, e, f, g)] -> [(a, b, c, d, e, f, g)] -> SBool Source #

allEqual :: [(a, b, c, d, e, f, g)] -> SBool Source #

sElem :: (a, b, c, d, e, f, g) -> [(a, b, c, d, e, f, g)] -> SBool Source #

sNotElem :: (a, b, c, d, e, f, g) -> [(a, b, c, d, e, f, g)] -> SBool Source #

class (Mergeable a, EqSymbolic a) => OrdSymbolic a where Source #

Symbolic Comparisons. Similar to `Eq`, we cannot implement Haskell's `Ord` class since there is no way to return an `Ordering` value from a symbolic comparison. Furthermore, `OrdSymbolic` requires `Mergeable` to implement if-then-else, for the benefit of implementing symbolic versions of `max` and `min` functions.

Minimal complete definition

(.<)

Methods

(.<) :: a -> a -> SBool infix 4 Source #

Symbolic less than.

(.<=) :: a -> a -> SBool infix 4 Source #

Symbolic less than or equal to.

(.>) :: a -> a -> SBool infix 4 Source #

Symbolic greater than.

(.>=) :: a -> a -> SBool infix 4 Source #

Symbolic greater than or equal to.

smin :: a -> a -> a Source #

Symbolic minimum.

smax :: a -> a -> a Source #

Symbolic maximum.

inRange :: a -> (a, a) -> SBool Source #

Is the value within the allowed inclusive range?

#### Instances

Instances details

(Ord a, SymVal a) => OrdSymbolic (SBV a) Source # | If comparison is over something SMTLib can handle, just translate it. Otherwise desugar.
Instance details Defined in Data.SBV.Core.Model Methods (.<) :: SBV a -> SBV a -> SBool Source # (.<=) :: SBV a -> SBV a -> SBool Source # (.>) :: SBV a -> SBV a -> SBool Source # (.>=) :: SBV a -> SBV a -> SBool Source # smin :: SBV a -> SBV a -> SBV a Source # smax :: SBV a -> SBV a -> SBV a Source # inRange :: SBV a -> (SBV a, SBV a) -> SBool Source #
OrdSymbolic a => OrdSymbolic (Maybe a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (.<) :: Maybe a -> Maybe a -> SBool Source # (.<=) :: Maybe a -> Maybe a -> SBool Source # (.>) :: Maybe a -> Maybe a -> SBool Source # (.>=) :: Maybe a -> Maybe a -> SBool Source # smin :: Maybe a -> Maybe a -> Maybe a Source # smax :: Maybe a -> Maybe a -> Maybe a Source # inRange :: Maybe a -> (Maybe a, Maybe a) -> SBool Source #
OrdSymbolic a => OrdSymbolic [a] Source # |
Instance details Defined in Data.SBV.Core.Model Methods (.<) :: [a] -> [a] -> SBool Source # (.<=) :: [a] -> [a] -> SBool Source # (.>) :: [a] -> [a] -> SBool Source # (.>=) :: [a] -> [a] -> SBool Source # smin :: [a] -> [a] -> [a] Source # smax :: [a] -> [a] -> [a] Source # inRange :: [a] -> ([a], [a]) -> SBool Source #
(OrdSymbolic a, OrdSymbolic b) => OrdSymbolic (Either a b) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: Either a b -> Either a b -> SBool Source #

(.<=) :: Either a b -> Either a b -> SBool Source #

(.>) :: Either a b -> Either a b -> SBool Source #

(.>=) :: Either a b -> Either a b -> SBool Source #

smin :: Either a b -> Either a b -> Either a b Source #

smax :: Either a b -> Either a b -> Either a b Source #

inRange :: Either a b -> (Either a b, Either a b) -> SBool Source #

(OrdSymbolic a, OrdSymbolic b) => OrdSymbolic (a, b) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (.<) :: (a, b) -> (a, b) -> SBool Source # (.<=) :: (a, b) -> (a, b) -> SBool Source # (.>) :: (a, b) -> (a, b) -> SBool Source # (.>=) :: (a, b) -> (a, b) -> SBool Source # smin :: (a, b) -> (a, b) -> (a, b) Source # smax :: (a, b) -> (a, b) -> (a, b) Source # inRange :: (a, b) -> ((a, b), (a, b)) -> SBool Source #
(OrdSymbolic a, OrdSymbolic b, OrdSymbolic c) => OrdSymbolic (a, b, c) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: (a, b, c) -> (a, b, c) -> SBool Source #

(.<=) :: (a, b, c) -> (a, b, c) -> SBool Source #

(.>) :: (a, b, c) -> (a, b, c) -> SBool Source #

(.>=) :: (a, b, c) -> (a, b, c) -> SBool Source #

smin :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

smax :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

inRange :: (a, b, c) -> ((a, b, c), (a, b, c)) -> SBool Source #

(OrdSymbolic a, OrdSymbolic b, OrdSymbolic c, OrdSymbolic d) => OrdSymbolic (a, b, c, d) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: (a, b, c, d) -> (a, b, c, d) -> SBool Source #

(.<=) :: (a, b, c, d) -> (a, b, c, d) -> SBool Source #

(.>) :: (a, b, c, d) -> (a, b, c, d) -> SBool Source #

(.>=) :: (a, b, c, d) -> (a, b, c, d) -> SBool Source #

smin :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

smax :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

inRange :: (a, b, c, d) -> ((a, b, c, d), (a, b, c, d)) -> SBool Source #

(OrdSymbolic a, OrdSymbolic b, OrdSymbolic c, OrdSymbolic d, OrdSymbolic e) => OrdSymbolic (a, b, c, d, e) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: (a, b, c, d, e) -> (a, b, c, d, e) -> SBool Source #

(.<=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> SBool Source #

(.>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> SBool Source #

(.>=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> SBool Source #

smin :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

smax :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

inRange :: (a, b, c, d, e) -> ((a, b, c, d, e), (a, b, c, d, e)) -> SBool Source #

(OrdSymbolic a, OrdSymbolic b, OrdSymbolic c, OrdSymbolic d, OrdSymbolic e, OrdSymbolic f) => OrdSymbolic (a, b, c, d, e, f) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> SBool Source #

(.<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> SBool Source #

(.>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> SBool Source #

(.>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> SBool Source #

smin :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

smax :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

inRange :: (a, b, c, d, e, f) -> ((a, b, c, d, e, f), (a, b, c, d, e, f)) -> SBool Source #

(OrdSymbolic a, OrdSymbolic b, OrdSymbolic c, OrdSymbolic d, OrdSymbolic e, OrdSymbolic f, OrdSymbolic g) => OrdSymbolic (a, b, c, d, e, f, g) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> SBool Source #

(.<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> SBool Source #

(.>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> SBool Source #

(.>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> SBool Source #

smin :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

smax :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

inRange :: (a, b, c, d, e, f, g) -> ((a, b, c, d, e, f, g), (a, b, c, d, e, f, g)) -> SBool Source #

class Equality a where Source #

Equality as a proof method. Allows for very concise construction of equivalence proofs, which is very typical in bit-precise proofs.

Methods

(===) :: a -> a -> IO ThmResult infix 4 Source #

#### Instances

Instances details

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> SBV g -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> SBV g -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> SBV g -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> SBV d -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> z) -> (SBV a -> SBV b -> SBV c -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, EqSymbolic z) => Equality (SBV a -> SBV b -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> z) -> (SBV a -> SBV b -> z) -> IO ThmResult Source #
(SymVal a, EqSymbolic z) => Equality (SBV a -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> z) -> (SBV a -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, EqSymbolic z) => Equality ((SBV a, SBV b) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b) -> z) -> ((SBV a, SBV b) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c) -> z) -> ((SBV a, SBV b, SBV c) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c, SBV d) -> z) -> ((SBV a, SBV b, SBV c, SBV d) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> z) -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> z) -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) -> IO ThmResult Source #

# Conditionals: Mergeable values

class Mergeable a where Source #

Symbolic conditionals are modeled by the `Mergeable` class, describing how to merge the results of an if-then-else call with a symbolic test. SBV provides all basic types as instances of this class, so users only need to declare instances for custom data-types of their programs as needed.

A `Mergeable` instance may be automatically derived for a custom data-type with a single constructor where the type of each field is an instance of `Mergeable`, such as a record of symbolic values. Users only need to add `Generic` and `Mergeable` to the `deriving` clause for the data-type. See `Status` for an example and an illustration of what the instance would look like if written by hand.

The function `select` is a total-indexing function out of a list of choices with a default value, simulating array/list indexing. It's an n-way generalization of the `ite` function.

Minimal complete definition: None, if the type is instance of `Generic`. Otherwise `symbolicMerge`. Note that most types subject to merging are likely to be trivial instances of `Generic`.

Minimal complete definition

Nothing

Methods

symbolicMerge :: Bool -> SBool -> a -> a -> a Source #

Merge two values based on the condition. The first argument states whether we force the then-and-else branches before the merging, at the word level. This is an efficiency concern; one that we'd rather not make but unfortunately necessary for getting symbolic simulation working efficiently.

default symbolicMerge :: (Generic a, GMergeable (Rep a)) => Bool -> SBool -> a -> a -> a Source #

select :: (Ord b, SymVal b, Num b) => [a] -> a -> SBV b -> a Source #

Total indexing operation. `select xs default index` is intuitively the same as `xs !! index`, except it evaluates to `default` if `index` underflows/overflows.

#### Instances

Instances details

Mergeable Int16 Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Int16 -> Int16 -> Int16 Source # select :: (Ord b, SymVal b, Num b) => [Int16] -> Int16 -> SBV b -> Int16 Source #
Mergeable Int32 Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Int32 -> Int32 -> Int32 Source # select :: (Ord b, SymVal b, Num b) => [Int32] -> Int32 -> SBV b -> Int32 Source #
Mergeable Int64 Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Int64 -> Int64 -> Int64 Source # select :: (Ord b, SymVal b, Num b) => [Int64] -> Int64 -> SBV b -> Int64 Source #
Mergeable Int8 Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Int8 -> Int8 -> Int8 Source # select :: (Ord b, SymVal b, Num b) => [Int8] -> Int8 -> SBV b -> Int8 Source #
Mergeable Word16 Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Word16 -> Word16 -> Word16 Source # select :: (Ord b, SymVal b, Num b) => [Word16] -> Word16 -> SBV b -> Word16 Source #
Mergeable Word32 Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Word32 -> Word32 -> Word32 Source # select :: (Ord b, SymVal b, Num b) => [Word32] -> Word32 -> SBV b -> Word32 Source #
Mergeable Word64 Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Word64 -> Word64 -> Word64 Source # select :: (Ord b, SymVal b, Num b) => [Word64] -> Word64 -> SBV b -> Word64 Source #
Mergeable Word8 Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Word8 -> Word8 -> Word8 Source # select :: (Ord b, SymVal b, Num b) => [Word8] -> Word8 -> SBV b -> Word8 Source #
Mergeable Mostek Source # |
Instance details Defined in Documentation.SBV.Examples.BitPrecise.Legato Methods symbolicMerge :: Bool -> SBool -> Mostek -> Mostek -> Mostek Source # select :: (Ord b, SymVal b, Num b) => [Mostek] -> Mostek -> SBV b -> Mostek Source #
Mergeable Jug Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Jugs Methods symbolicMerge :: Bool -> SBool -> Jug -> Jug -> Jug Source # select :: (Ord b, SymVal b, Num b) => [Jug] -> Jug -> SBV b -> Jug Source #
Mergeable Assignment Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Orangutans Methods symbolicMerge :: Bool -> SBool -> Assignment -> Assignment -> Assignment Source # select :: (Ord b, SymVal b, Num b) => [Assignment] -> Assignment -> SBV b -> Assignment Source #
Mergeable Status Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.U2Bridge Methods symbolicMerge :: Bool -> SBool -> Status -> Status -> Status Source # select :: (Ord b, SymVal b, Num b) => [Status] -> Status -> SBV b -> Status Source #
Mergeable Integer Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Integer -> Integer -> Integer Source # select :: (Ord b, SymVal b, Num b) => [Integer] -> Integer -> SBV b -> Integer Source #
Mergeable () Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> () -> () -> () Source # select :: (Ord b, SymVal b, Num b) => [()] -> () -> SBV b -> () Source #
Mergeable Bool Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Bool -> Bool -> Bool Source # select :: (Ord b, SymVal b, Num b) => [Bool] -> Bool -> SBV b -> Bool Source #
Mergeable Char Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Char -> Char -> Char Source # select :: (Ord b, SymVal b, Num b) => [Char] -> Char -> SBV b -> Char Source #
Mergeable Double Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Double -> Double -> Double Source # select :: (Ord b, SymVal b, Num b) => [Double] -> Double -> SBV b -> Double Source #
Mergeable Float Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Float -> Float -> Float Source # select :: (Ord b, SymVal b, Num b) => [Float] -> Float -> SBV b -> Float Source #
Mergeable a => Mergeable (ZipList a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> ZipList a -> ZipList a -> ZipList a Source # select :: (Ord b, SymVal b, Num b) => [ZipList a] -> ZipList a -> SBV b -> ZipList a Source #
SymVal a => Mergeable (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> SBV a -> SBV a -> SBV a Source # select :: (Ord b, SymVal b, Num b) => [SBV a] -> SBV a -> SBV b -> SBV a Source #
Mergeable a => Mergeable (S a) Source # |
Instance details Defined in Documentation.SBV.Examples.ProofTools.Fibonacci Methods symbolicMerge :: Bool -> SBool -> S a -> S a -> S a Source # select :: (Ord b, SymVal b, Num b) => [S a] -> S a -> SBV b -> S a Source #
Mergeable a => Mergeable (S a) Source # |
Instance details Defined in Documentation.SBV.Examples.ProofTools.Sum Methods symbolicMerge :: Bool -> SBool -> S a -> S a -> S a Source # select :: (Ord b, SymVal b, Num b) => [S a] -> S a -> SBV b -> S a Source #
Mergeable a => Mergeable (Move a) Source # | Mergeable instance for `Move` simply pushes the merging the data after run of each branch starting from the same state.
Instance details Defined in Documentation.SBV.Examples.Puzzles.U2Bridge Methods symbolicMerge :: Bool -> SBool -> Move a -> Move a -> Move a Source # select :: (Ord b, SymVal b, Num b) => [Move a] -> Move a -> SBV b -> Move a Source #
SymVal a => Mergeable (AppS a) Source # |
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Append Methods symbolicMerge :: Bool -> SBool -> AppS a -> AppS a -> AppS a Source # select :: (Ord b, SymVal b, Num b) => [AppS a] -> AppS a -> SBV b -> AppS a Source #
Mergeable a => Mergeable (IncS a) Source # |
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Basics Methods symbolicMerge :: Bool -> SBool -> IncS a -> IncS a -> IncS a Source # select :: (Ord b, SymVal b, Num b) => [IncS a] -> IncS a -> SBV b -> IncS a Source #
Mergeable a => Mergeable (FibS a) Source # |
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Fib Methods symbolicMerge :: Bool -> SBool -> FibS a -> FibS a -> FibS a Source # select :: (Ord b, SymVal b, Num b) => [FibS a] -> FibS a -> SBV b -> FibS a Source #
Mergeable a => Mergeable (GCDS a) Source # |
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.GCD Methods symbolicMerge :: Bool -> SBool -> GCDS a -> GCDS a -> GCDS a Source # select :: (Ord b, SymVal b, Num b) => [GCDS a] -> GCDS a -> SBV b -> GCDS a Source #
Mergeable a => Mergeable (DivS a) Source # |
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.IntDiv Methods symbolicMerge :: Bool -> SBool -> DivS a -> DivS a -> DivS a Source # select :: (Ord b, SymVal b, Num b) => [DivS a] -> DivS a -> SBV b -> DivS a Source #
Mergeable a => Mergeable (SqrtS a) Source # |
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.IntSqrt Methods symbolicMerge :: Bool -> SBool -> SqrtS a -> SqrtS a -> SqrtS a Source # select :: (Ord b, SymVal b, Num b) => [SqrtS a] -> SqrtS a -> SBV b -> SqrtS a Source #
SymVal a => Mergeable (LenS a) Source # |
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Length Methods symbolicMerge :: Bool -> SBool -> LenS a -> LenS a -> LenS a Source # select :: (Ord b, SymVal b, Num b) => [LenS a] -> LenS a -> SBV b -> LenS a Source #
Mergeable a => Mergeable (SumS a) Source # |
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Sum Methods symbolicMerge :: Bool -> SBool -> SumS a -> SumS a -> SumS a Source # select :: (Ord b, SymVal b, Num b) => [SumS a] -> SumS a -> SBV b -> SumS a Source #
Mergeable a => Mergeable (Maybe a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Maybe a -> Maybe a -> Maybe a Source # select :: (Ord b, SymVal b, Num b) => [Maybe a] -> Maybe a -> SBV b -> Maybe a Source #
Mergeable a => Mergeable [a] Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> [a] -> [a] -> [a] Source # select :: (Ord b, SymVal b, Num b) => [[a]] -> [a] -> SBV b -> [a] Source #
(Mergeable a, Mergeable b) => Mergeable (Either a b) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Either a b -> Either a b -> Either a b Source # select :: (Ord b0, SymVal b0, Num b0) => [Either a b] -> Either a b -> SBV b0 -> Either a b Source #
(Ix a, Mergeable b) => Mergeable (Array a b) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> Array a b -> Array a b -> Array a b Source # select :: (Ord b0, SymVal b0, Num b0) => [Array a b] -> Array a b -> SBV b0 -> Array a b Source #
SymVal b => Mergeable (SArray a b) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> SArray a b -> SArray a b -> SArray a b Source # select :: (Ord b0, SymVal b0, Num b0) => [SArray a b] -> SArray a b -> SBV b0 -> SArray a b Source #
SymVal e => Mergeable (STree i e) Source # |
Instance details Defined in Data.SBV.Tools.STree Methods symbolicMerge :: Bool -> SBool -> STree i e -> STree i e -> STree i e Source # select :: (Ord b, SymVal b, Num b) => [STree i e] -> STree i e -> SBV b -> STree i e Source #
(Mergeable a, Mergeable b) => Mergeable (a, b) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> (a, b) -> (a, b) -> (a, b) Source # select :: (Ord b0, SymVal b0, Num b0) => [(a, b)] -> (a, b) -> SBV b0 -> (a, b) Source #
Mergeable b => Mergeable (a -> b) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> (a -> b) -> (a -> b) -> a -> b Source # select :: (Ord b0, SymVal b0, Num b0) => [a -> b] -> (a -> b) -> SBV b0 -> a -> b Source #
(Mergeable a, Mergeable b, Mergeable c) => Mergeable (a, b, c) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> (a, b, c) -> (a, b, c) -> (a, b, c) Source # select :: (Ord b0, SymVal b0, Num b0) => [(a, b, c)] -> (a, b, c) -> SBV b0 -> (a, b, c) Source #
(Mergeable a, Mergeable b, Mergeable c, Mergeable d) => Mergeable (a, b, c, d) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source # select :: (Ord b0, SymVal b0, Num b0) => [(a, b, c, d)] -> (a, b, c, d) -> SBV b0 -> (a, b, c, d) Source #
(Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e) => Mergeable (a, b, c, d, e) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source # select :: (Ord b0, SymVal b0, Num b0) => [(a, b, c, d, e)] -> (a, b, c, d, e) -> SBV b0 -> (a, b, c, d, e) Source #
(Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e, Mergeable f) => Mergeable (a, b, c, d, e, f) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source # select :: (Ord b0, SymVal b0, Num b0) => [(a, b, c, d, e, f)] -> (a, b, c, d, e, f) -> SBV b0 -> (a, b, c, d, e, f) Source #
(Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e, Mergeable f, Mergeable g) => Mergeable (a, b, c, d, e, f, g) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source # select :: (Ord b0, SymVal b0, Num b0) => [(a, b, c, d, e, f, g)] -> (a, b, c, d, e, f, g) -> SBV b0 -> (a, b, c, d, e, f, g) Source #

ite :: Mergeable a => SBool -> a -> a -> a Source #

If-then-else. This is by definition `symbolicMerge` with both branches forced. This is typically the desired behavior, but also see `iteLazy` should you need more laziness.

iteLazy :: Mergeable a => SBool -> a -> a -> a Source #

A Lazy version of ite, which does not force its arguments. This might cause issues for symbolic simulation with large thunks around, so use with care.

# Symbolic integral numbers

class (SymVal a, Num a, Bits a, Integral a) => SIntegral a Source #

Symbolic Numbers. This is a simple class that simply incorporates all number like base types together, simplifying writing polymorphic type-signatures that work for all symbolic numbers, such as `SWord8`, `SInt8` etc. For instance, we can write a generic list-minimum function as follows:

       mm :: SIntegral a => [SBV a] -> SBV a
       mm = foldr1 (a b -> ite (a .<= b) a b)

It is similar to the standard `Integral` class, except ranging over symbolic instances.

#### Instances

Instances details

SIntegral Int16 Source # |
Instance details Defined in Data.SBV.Core.Model
SIntegral Int32 Source # |
Instance details Defined in Data.SBV.Core.Model
SIntegral Int64 Source # |
Instance details Defined in Data.SBV.Core.Model
SIntegral Int8 Source # |
Instance details Defined in Data.SBV.Core.Model
SIntegral Word16 Source # |
Instance details Defined in Data.SBV.Core.Model
SIntegral Word32 Source # |
Instance details Defined in Data.SBV.Core.Model
SIntegral Word64 Source # |
Instance details Defined in Data.SBV.Core.Model
SIntegral Word8 Source # |
Instance details Defined in Data.SBV.Core.Model
SIntegral Integer Source # |
Instance details Defined in Data.SBV.Core.Model
(KnownNat n, BVIsNonZero n) => SIntegral (IntN n) Source # | `SIntegral` instance for `IntN`
Instance details Defined in Data.SBV.Core.Sized
(KnownNat n, BVIsNonZero n) => SIntegral (WordN n) Source # | `SIntegral` instance for `WordN`
Instance details Defined in Data.SBV.Core.Sized

# Division and Modulus

class SDivisible a where Source #

The `SDivisible` class captures the essence of division. Unfortunately we cannot use Haskell's `Integral` class since the `Real` and `Enum` superclasses are not implementable for symbolic bit-vectors. However, `quotRem` and `divMod` both make perfect sense, and the `SDivisible` class captures this operation. One issue is how division by 0 behaves. The verification technology requires total functions, and there are several design choices here. We follow Isabelle/HOL approach of assigning the value 0 for division by 0. Therefore, we impose the following pair of laws:

         x sQuotRem 0 = (0, x)
         x sDivMod  0 = (0, x)

Note that our instances implement this law even when `x` is `0` itself.

NB. `quot` truncates toward zero, while `div` truncates toward negative infinity.

### C code generation of division operations

In the case of division or modulo of a minimal signed value (e.g. `-128` for `SInt8`) by `-1`, SMTLIB and Haskell agree on what the result should be. Unfortunately the result in C code depends on CPU architecture and compiler settings, as this is undefined behaviour in C. **SBV does not guarantee** what will happen in generated C code in this corner case.

Minimal complete definition

sQuotRem, sDivMod

Methods

sQuotRem :: a -> a -> (a, a) Source #

sDivMod :: a -> a -> (a, a) Source #

sQuot :: a -> a -> a Source #

sRem :: a -> a -> a Source #

sDiv :: a -> a -> a Source #

sMod :: a -> a -> a Source #

#### Instances

Instances details

SDivisible Int16 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: Int16 -> Int16 -> (Int16, Int16) Source # sDivMod :: Int16 -> Int16 -> (Int16, Int16) Source # sQuot :: Int16 -> Int16 -> Int16 Source # sRem :: Int16 -> Int16 -> Int16 Source # sDiv :: Int16 -> Int16 -> Int16 Source # sMod :: Int16 -> Int16 -> Int16 Source #
SDivisible Int32 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: Int32 -> Int32 -> (Int32, Int32) Source # sDivMod :: Int32 -> Int32 -> (Int32, Int32) Source # sQuot :: Int32 -> Int32 -> Int32 Source # sRem :: Int32 -> Int32 -> Int32 Source # sDiv :: Int32 -> Int32 -> Int32 Source # sMod :: Int32 -> Int32 -> Int32 Source #
SDivisible Int64 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: Int64 -> Int64 -> (Int64, Int64) Source # sDivMod :: Int64 -> Int64 -> (Int64, Int64) Source # sQuot :: Int64 -> Int64 -> Int64 Source # sRem :: Int64 -> Int64 -> Int64 Source # sDiv :: Int64 -> Int64 -> Int64 Source # sMod :: Int64 -> Int64 -> Int64 Source #
SDivisible Int8 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: Int8 -> Int8 -> (Int8, Int8) Source # sDivMod :: Int8 -> Int8 -> (Int8, Int8) Source # sQuot :: Int8 -> Int8 -> Int8 Source # sRem :: Int8 -> Int8 -> Int8 Source # sDiv :: Int8 -> Int8 -> Int8 Source # sMod :: Int8 -> Int8 -> Int8 Source #
SDivisible Word16 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: Word16 -> Word16 -> (Word16, Word16) Source # sDivMod :: Word16 -> Word16 -> (Word16, Word16) Source # sQuot :: Word16 -> Word16 -> Word16 Source # sRem :: Word16 -> Word16 -> Word16 Source # sDiv :: Word16 -> Word16 -> Word16 Source # sMod :: Word16 -> Word16 -> Word16 Source #
SDivisible Word32 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: Word32 -> Word32 -> (Word32, Word32) Source # sDivMod :: Word32 -> Word32 -> (Word32, Word32) Source # sQuot :: Word32 -> Word32 -> Word32 Source # sRem :: Word32 -> Word32 -> Word32 Source # sDiv :: Word32 -> Word32 -> Word32 Source # sMod :: Word32 -> Word32 -> Word32 Source #
SDivisible Word64 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: Word64 -> Word64 -> (Word64, Word64) Source # sDivMod :: Word64 -> Word64 -> (Word64, Word64) Source # sQuot :: Word64 -> Word64 -> Word64 Source # sRem :: Word64 -> Word64 -> Word64 Source # sDiv :: Word64 -> Word64 -> Word64 Source # sMod :: Word64 -> Word64 -> Word64 Source #
SDivisible Word8 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: Word8 -> Word8 -> (Word8, Word8) Source # sDivMod :: Word8 -> Word8 -> (Word8, Word8) Source # sQuot :: Word8 -> Word8 -> Word8 Source # sRem :: Word8 -> Word8 -> Word8 Source # sDiv :: Word8 -> Word8 -> Word8 Source # sMod :: Word8 -> Word8 -> Word8 Source #
SDivisible CV Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: CV -> CV -> (CV, CV) Source # sDivMod :: CV -> CV -> (CV, CV) Source # sQuot :: CV -> CV -> CV Source # sRem :: CV -> CV -> CV Source # sDiv :: CV -> CV -> CV Source # sMod :: CV -> CV -> CV Source #
SDivisible SInt16 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInt16 -> SInt16 -> (SInt16, SInt16) Source # sDivMod :: SInt16 -> SInt16 -> (SInt16, SInt16) Source # sQuot :: SInt16 -> SInt16 -> SInt16 Source # sRem :: SInt16 -> SInt16 -> SInt16 Source # sDiv :: SInt16 -> SInt16 -> SInt16 Source # sMod :: SInt16 -> SInt16 -> SInt16 Source #
SDivisible SInt32 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInt32 -> SInt32 -> (SInt32, SInt32) Source # sDivMod :: SInt32 -> SInt32 -> (SInt32, SInt32) Source # sQuot :: SInt32 -> SInt32 -> SInt32 Source # sRem :: SInt32 -> SInt32 -> SInt32 Source # sDiv :: SInt32 -> SInt32 -> SInt32 Source # sMod :: SInt32 -> SInt32 -> SInt32 Source #
SDivisible SInt64 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInt64 -> SInt64 -> (SInt64, SInt64) Source # sDivMod :: SInt64 -> SInt64 -> (SInt64, SInt64) Source # sQuot :: SInt64 -> SInt64 -> SInt64 Source # sRem :: SInt64 -> SInt64 -> SInt64 Source # sDiv :: SInt64 -> SInt64 -> SInt64 Source # sMod :: SInt64 -> SInt64 -> SInt64 Source #
SDivisible SInt8 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInt8 -> SInt8 -> (SInt8, SInt8) Source # sDivMod :: SInt8 -> SInt8 -> (SInt8, SInt8) Source # sQuot :: SInt8 -> SInt8 -> SInt8 Source # sRem :: SInt8 -> SInt8 -> SInt8 Source # sDiv :: SInt8 -> SInt8 -> SInt8 Source # sMod :: SInt8 -> SInt8 -> SInt8 Source #
SDivisible SInteger Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInteger -> SInteger -> (SInteger, SInteger) Source # sDivMod :: SInteger -> SInteger -> (SInteger, SInteger) Source # sQuot :: SInteger -> SInteger -> SInteger Source # sRem :: SInteger -> SInteger -> SInteger Source # sDiv :: SInteger -> SInteger -> SInteger Source # sMod :: SInteger -> SInteger -> SInteger Source #
SDivisible SWord16 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SWord16 -> SWord16 -> (SWord16, SWord16) Source # sDivMod :: SWord16 -> SWord16 -> (SWord16, SWord16) Source # sQuot :: SWord16 -> SWord16 -> SWord16 Source # sRem :: SWord16 -> SWord16 -> SWord16 Source # sDiv :: SWord16 -> SWord16 -> SWord16 Source # sMod :: SWord16 -> SWord16 -> SWord16 Source #
SDivisible SWord32 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SWord32 -> SWord32 -> (SWord32, SWord32) Source # sDivMod :: SWord32 -> SWord32 -> (SWord32, SWord32) Source # sQuot :: SWord32 -> SWord32 -> SWord32 Source # sRem :: SWord32 -> SWord32 -> SWord32 Source # sDiv :: SWord32 -> SWord32 -> SWord32 Source # sMod :: SWord32 -> SWord32 -> SWord32 Source #
SDivisible SWord64 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SWord64 -> SWord64 -> (SWord64, SWord64) Source # sDivMod :: SWord64 -> SWord64 -> (SWord64, SWord64) Source # sQuot :: SWord64 -> SWord64 -> SWord64 Source # sRem :: SWord64 -> SWord64 -> SWord64 Source # sDiv :: SWord64 -> SWord64 -> SWord64 Source # sMod :: SWord64 -> SWord64 -> SWord64 Source #
SDivisible SWord8 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SWord8 -> SWord8 -> (SWord8, SWord8) Source # sDivMod :: SWord8 -> SWord8 -> (SWord8, SWord8) Source # sQuot :: SWord8 -> SWord8 -> SWord8 Source # sRem :: SWord8 -> SWord8 -> SWord8 Source # sDiv :: SWord8 -> SWord8 -> SWord8 Source # sMod :: SWord8 -> SWord8 -> SWord8 Source #
SDivisible Integer Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: Integer -> Integer -> (Integer, Integer) Source # sDivMod :: Integer -> Integer -> (Integer, Integer) Source # sQuot :: Integer -> Integer -> Integer Source # sRem :: Integer -> Integer -> Integer Source # sDiv :: Integer -> Integer -> Integer Source # sMod :: Integer -> Integer -> Integer Source #
(KnownNat n, BVIsNonZero n) => SDivisible (IntN n) Source # | `SDivisible` instance for `IntN`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: IntN n -> IntN n -> (IntN n, IntN n) Source # sDivMod :: IntN n -> IntN n -> (IntN n, IntN n) Source # sQuot :: IntN n -> IntN n -> IntN n Source # sRem :: IntN n -> IntN n -> IntN n Source # sDiv :: IntN n -> IntN n -> IntN n Source # sMod :: IntN n -> IntN n -> IntN n Source #
(KnownNat n, BVIsNonZero n) => SDivisible (SInt n) Source # | `SDivisible` instance for `SInt`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: SInt n -> SInt n -> (SInt n, SInt n) Source # sDivMod :: SInt n -> SInt n -> (SInt n, SInt n) Source # sQuot :: SInt n -> SInt n -> SInt n Source # sRem :: SInt n -> SInt n -> SInt n Source # sDiv :: SInt n -> SInt n -> SInt n Source # sMod :: SInt n -> SInt n -> SInt n Source #
(KnownNat n, BVIsNonZero n) => SDivisible (SWord n) Source # | `SDivisible` instance for `SWord`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: SWord n -> SWord n -> (SWord n, SWord n) Source # sDivMod :: SWord n -> SWord n -> (SWord n, SWord n) Source # sQuot :: SWord n -> SWord n -> SWord n Source # sRem :: SWord n -> SWord n -> SWord n Source # sDiv :: SWord n -> SWord n -> SWord n Source # sMod :: SWord n -> SWord n -> SWord n Source #
(KnownNat n, BVIsNonZero n) => SDivisible (WordN n) Source # | `SDivisible` instance for `WordN`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: WordN n -> WordN n -> (WordN n, WordN n) Source # sDivMod :: WordN n -> WordN n -> (WordN n, WordN n) Source # sQuot :: WordN n -> WordN n -> WordN n Source # sRem :: WordN n -> WordN n -> WordN n Source # sDiv :: WordN n -> WordN n -> WordN n Source # sMod :: WordN n -> WordN n -> WordN n Source #

# Bit-vector operations

## Conversions

sFromIntegral :: forall a b. (Integral a, HasKind a, Num a, SymVal a, HasKind b, Num b, SymVal b) => SBV a -> SBV b Source #

Conversion between integral-symbolic values, akin to Haskell's `fromIntegral`

## Shifts and rotates

sShiftLeft :: (SIntegral a, SIntegral b) => SBV a -> SBV b -> SBV a Source #

Generalization of `shiftL`, when the shift-amount is symbolic. Since Haskell's `shiftL` only takes an `Int` as the shift amount, it cannot be used when we have a symbolic amount to shift with.

sShiftRight :: (SIntegral a, SIntegral b) => SBV a -> SBV b -> SBV a Source #

Generalization of `shiftR`, when the shift-amount is symbolic. Since Haskell's `shiftR` only takes an `Int` as the shift amount, it cannot be used when we have a symbolic amount to shift with.

NB. If the shiftee is signed, then this is an arithmetic shift; otherwise it's logical, following the usual Haskell convention. See `sSignedShiftArithRight` for a variant that explicitly uses the msb as the sign bit, even for unsigned underlying types.

sRotateLeft :: (SIntegral a, SIntegral b) => SBV a -> SBV b -> SBV a Source #

Generalization of `rotateL`, when the shift-amount is symbolic. Since Haskell's `rotateL` only takes an `Int` as the shift amount, it cannot be used when we have a symbolic amount to shift with. The first argument should be a bounded quantity.

sBarrelRotateLeft :: (SFiniteBits a, SFiniteBits b) => SBV a -> SBV b -> SBV a Source #

An implementation of rotate-left, using a barrel shifter like design. Only works when both arguments are finite bitvectors, and furthermore when the second argument is unsigned. The first condition is enforced by the type, but the second is dynamically checked. We provide this implementation as an alternative to `sRotateLeft` since SMTLib logic does not support variable argument rotates (as opposed to shifts), and thus this implementation can produce better code for verification compared to `sRotateLeft`.

sRotateRight :: (SIntegral a, SIntegral b) => SBV a -> SBV b -> SBV a Source #

Generalization of `rotateR`, when the shift-amount is symbolic. Since Haskell's `rotateR` only takes an `Int` as the shift amount, it cannot be used when we have a symbolic amount to shift with. The first argument should be a bounded quantity.

sBarrelRotateRight :: (SFiniteBits a, SFiniteBits b) => SBV a -> SBV b -> SBV a Source #

An implementation of rotate-right, using a barrel shifter like design. See comments for `sBarrelRotateLeft` for details.

sSignedShiftArithRight :: (SFiniteBits a, SIntegral b) => SBV a -> SBV b -> SBV a Source #

Arithmetic shift-right with a symbolic unsigned shift amount. This is equivalent to `sShiftRight` when the argument is signed. However, if the argument is unsigned, then it explicitly treats its msb as a sign-bit, and uses it as the bit that gets shifted in. Useful when using the underlying unsigned bit representation to implement custom signed operations. Note that there is no direct Haskell analogue of this function.

## Finite bit-vector operations

class (Ord a, SymVal a, Num a, Bits a) => SFiniteBits a where Source #

Finite bit-length symbolic values. Essentially the same as `SIntegral`, but further leaves out `Integer`. Loosely based on Haskell's `FiniteBits` class, but with more methods defined and structured differently to fit into the symbolic world view. Minimal complete definition: `sFiniteBitSize`.

Minimal complete definition

sFiniteBitSize

Methods

sFiniteBitSize :: SBV a -> Int Source #

Bit size.

lsb :: SBV a -> SBool Source #

Least significant bit of a word, always stored at index 0.

msb :: SBV a -> SBool Source #

Most significant bit of a word, always stored at the last position.

blastBE :: SBV a -> [SBool] Source #

Big-endian blasting of a word into its bits.

blastLE :: SBV a -> [SBool] Source #

Little-endian blasting of a word into its bits.

fromBitsBE :: [SBool] -> SBV a Source #

Reconstruct from given bits, given in little-endian.

fromBitsLE :: [SBool] -> SBV a Source #

Reconstruct from given bits, given in little-endian.

sTestBit :: SBV a -> Int -> SBool Source #

Replacement for `testBit`, returning `SBool` instead of `Bool`.

sExtractBits :: SBV a -> [Int] -> [SBool] Source #

Variant of `sTestBit`, where we want to extract multiple bit positions.

sPopCount :: SBV a -> SWord8 Source #

Variant of `popCount`, returning a symbolic value.

setBitTo :: SBV a -> Int -> SBool -> SBV a Source #

A combo of `setBit` and `clearBit`, when the bit to be set is symbolic.

fullAdder :: SBV a -> SBV a -> (SBool, SBV a) Source #

Full adder, returns carry-out from the addition. Only for unsigned quantities.

fullMultiplier :: SBV a -> SBV a -> (SBV a, SBV a) Source #

Full multiplier, returns both high and low-order bits. Only for unsigned quantities.

sCountLeadingZeros :: SBV a -> SWord8 Source #

Count leading zeros in a word, big-endian interpretation.

sCountTrailingZeros :: SBV a -> SWord8 Source #

Count trailing zeros in a word, big-endian interpretation.

#### Instances

Instances details

SFiniteBits Int16 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

sFiniteBitSize :: SBV Int16 -> Int Source #

lsb :: SBV Int16 -> SBool Source #

msb :: SBV Int16 -> SBool Source #

blastBE :: SBV Int16 -> [SBool] Source #

blastLE :: SBV Int16 -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV Int16 Source #

fromBitsLE :: [SBool] -> SBV Int16 Source #

sTestBit :: SBV Int16 -> Int -> SBool Source #

sExtractBits :: SBV Int16 -> [Int] -> [SBool] Source #

sPopCount :: SBV Int16 -> SWord8 Source #

setBitTo :: SBV Int16 -> Int -> SBool -> SBV Int16 Source #

fullAdder :: SBV Int16 -> SBV Int16 -> (SBool, SBV Int16) Source #

fullMultiplier :: SBV Int16 -> SBV Int16 -> (SBV Int16, SBV Int16) Source #

sCountLeadingZeros :: SBV Int16 -> SWord8 Source #

sCountTrailingZeros :: SBV Int16 -> SWord8 Source #

SFiniteBits Int32 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

sFiniteBitSize :: SBV Int32 -> Int Source #

lsb :: SBV Int32 -> SBool Source #

msb :: SBV Int32 -> SBool Source #

blastBE :: SBV Int32 -> [SBool] Source #

blastLE :: SBV Int32 -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV Int32 Source #

fromBitsLE :: [SBool] -> SBV Int32 Source #

sTestBit :: SBV Int32 -> Int -> SBool Source #

sExtractBits :: SBV Int32 -> [Int] -> [SBool] Source #

sPopCount :: SBV Int32 -> SWord8 Source #

setBitTo :: SBV Int32 -> Int -> SBool -> SBV Int32 Source #

fullAdder :: SBV Int32 -> SBV Int32 -> (SBool, SBV Int32) Source #

fullMultiplier :: SBV Int32 -> SBV Int32 -> (SBV Int32, SBV Int32) Source #

sCountLeadingZeros :: SBV Int32 -> SWord8 Source #

sCountTrailingZeros :: SBV Int32 -> SWord8 Source #

SFiniteBits Int64 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

sFiniteBitSize :: SBV Int64 -> Int Source #

lsb :: SBV Int64 -> SBool Source #

msb :: SBV Int64 -> SBool Source #

blastBE :: SBV Int64 -> [SBool] Source #

blastLE :: SBV Int64 -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV Int64 Source #

fromBitsLE :: [SBool] -> SBV Int64 Source #

sTestBit :: SBV Int64 -> Int -> SBool Source #

sExtractBits :: SBV Int64 -> [Int] -> [SBool] Source #

sPopCount :: SBV Int64 -> SWord8 Source #

setBitTo :: SBV Int64 -> Int -> SBool -> SBV Int64 Source #

fullAdder :: SBV Int64 -> SBV Int64 -> (SBool, SBV Int64) Source #

fullMultiplier :: SBV Int64 -> SBV Int64 -> (SBV Int64, SBV Int64) Source #

sCountLeadingZeros :: SBV Int64 -> SWord8 Source #

sCountTrailingZeros :: SBV Int64 -> SWord8 Source #

SFiniteBits Int8 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

sFiniteBitSize :: SBV Int8 -> Int Source #

lsb :: SBV Int8 -> SBool Source #

msb :: SBV Int8 -> SBool Source #

blastBE :: SBV Int8 -> [SBool] Source #

blastLE :: SBV Int8 -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV Int8 Source #

fromBitsLE :: [SBool] -> SBV Int8 Source #

sTestBit :: SBV Int8 -> Int -> SBool Source #

sExtractBits :: SBV Int8 -> [Int] -> [SBool] Source #

sPopCount :: SBV Int8 -> SWord8 Source #

setBitTo :: SBV Int8 -> Int -> SBool -> SBV Int8 Source #

fullAdder :: SBV Int8 -> SBV Int8 -> (SBool, SBV Int8) Source #

fullMultiplier :: SBV Int8 -> SBV Int8 -> (SBV Int8, SBV Int8) Source #

sCountLeadingZeros :: SBV Int8 -> SWord8 Source #

sCountTrailingZeros :: SBV Int8 -> SWord8 Source #

SFiniteBits Word16 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

sFiniteBitSize :: SBV Word16 -> Int Source #

lsb :: SBV Word16 -> SBool Source #

msb :: SBV Word16 -> SBool Source #

blastBE :: SBV Word16 -> [SBool] Source #

blastLE :: SBV Word16 -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV Word16 Source #

fromBitsLE :: [SBool] -> SBV Word16 Source #

sTestBit :: SBV Word16 -> Int -> SBool Source #

sExtractBits :: SBV Word16 -> [Int] -> [SBool] Source #

sPopCount :: SBV Word16 -> SWord8 Source #

setBitTo :: SBV Word16 -> Int -> SBool -> SBV Word16 Source #

fullAdder :: SBV Word16 -> SBV Word16 -> (SBool, SBV Word16) Source #

fullMultiplier :: SBV Word16 -> SBV Word16 -> (SBV Word16, SBV Word16) Source #

sCountLeadingZeros :: SBV Word16 -> SWord8 Source #

sCountTrailingZeros :: SBV Word16 -> SWord8 Source #

SFiniteBits Word32 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

sFiniteBitSize :: SBV Word32 -> Int Source #

lsb :: SBV Word32 -> SBool Source #

msb :: SBV Word32 -> SBool Source #

blastBE :: SBV Word32 -> [SBool] Source #

blastLE :: SBV Word32 -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV Word32 Source #

fromBitsLE :: [SBool] -> SBV Word32 Source #

sTestBit :: SBV Word32 -> Int -> SBool Source #

sExtractBits :: SBV Word32 -> [Int] -> [SBool] Source #

sPopCount :: SBV Word32 -> SWord8 Source #

setBitTo :: SBV Word32 -> Int -> SBool -> SBV Word32 Source #

fullAdder :: SBV Word32 -> SBV Word32 -> (SBool, SBV Word32) Source #

fullMultiplier :: SBV Word32 -> SBV Word32 -> (SBV Word32, SBV Word32) Source #

sCountLeadingZeros :: SBV Word32 -> SWord8 Source #

sCountTrailingZeros :: SBV Word32 -> SWord8 Source #

SFiniteBits Word64 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

sFiniteBitSize :: SBV Word64 -> Int Source #

lsb :: SBV Word64 -> SBool Source #

msb :: SBV Word64 -> SBool Source #

blastBE :: SBV Word64 -> [SBool] Source #

blastLE :: SBV Word64 -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV Word64 Source #

fromBitsLE :: [SBool] -> SBV Word64 Source #

sTestBit :: SBV Word64 -> Int -> SBool Source #

sExtractBits :: SBV Word64 -> [Int] -> [SBool] Source #

sPopCount :: SBV Word64 -> SWord8 Source #

setBitTo :: SBV Word64 -> Int -> SBool -> SBV Word64 Source #

fullAdder :: SBV Word64 -> SBV Word64 -> (SBool, SBV Word64) Source #

fullMultiplier :: SBV Word64 -> SBV Word64 -> (SBV Word64, SBV Word64) Source #

sCountLeadingZeros :: SBV Word64 -> SWord8 Source #

sCountTrailingZeros :: SBV Word64 -> SWord8 Source #

SFiniteBits Word8 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

sFiniteBitSize :: SBV Word8 -> Int Source #

lsb :: SBV Word8 -> SBool Source #

msb :: SBV Word8 -> SBool Source #

blastBE :: SBV Word8 -> [SBool] Source #

blastLE :: SBV Word8 -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV Word8 Source #

fromBitsLE :: [SBool] -> SBV Word8 Source #

sTestBit :: SBV Word8 -> Int -> SBool Source #

sExtractBits :: SBV Word8 -> [Int] -> [SBool] Source #

sPopCount :: SBV Word8 -> SWord8 Source #

setBitTo :: SBV Word8 -> Int -> SBool -> SBV Word8 Source #

fullAdder :: SBV Word8 -> SBV Word8 -> (SBool, SBV Word8) Source #

fullMultiplier :: SBV Word8 -> SBV Word8 -> (SBV Word8, SBV Word8) Source #

sCountLeadingZeros :: SBV Word8 -> SWord8 Source #

sCountTrailingZeros :: SBV Word8 -> SWord8 Source #

(KnownNat n, BVIsNonZero n) => SFiniteBits (IntN n) Source # | `SFiniteBits` instance for `IntN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

sFiniteBitSize :: SBV (IntN n) -> Int Source #

lsb :: SBV (IntN n) -> SBool Source #

msb :: SBV (IntN n) -> SBool Source #

blastBE :: SBV (IntN n) -> [SBool] Source #

blastLE :: SBV (IntN n) -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV (IntN n) Source #

fromBitsLE :: [SBool] -> SBV (IntN n) Source #

sTestBit :: SBV (IntN n) -> Int -> SBool Source #

sExtractBits :: SBV (IntN n) -> [Int] -> [SBool] Source #

sPopCount :: SBV (IntN n) -> SWord8 Source #

setBitTo :: SBV (IntN n) -> Int -> SBool -> SBV (IntN n) Source #

fullAdder :: SBV (IntN n) -> SBV (IntN n) -> (SBool, SBV (IntN n)) Source #

fullMultiplier :: SBV (IntN n) -> SBV (IntN n) -> (SBV (IntN n), SBV (IntN n)) Source #

sCountLeadingZeros :: SBV (IntN n) -> SWord8 Source #

sCountTrailingZeros :: SBV (IntN n) -> SWord8 Source #

(KnownNat n, BVIsNonZero n) => SFiniteBits (WordN n) Source # | `SFiniteBits` instance for `WordN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

sFiniteBitSize :: SBV (WordN n) -> Int Source #

lsb :: SBV (WordN n) -> SBool Source #

msb :: SBV (WordN n) -> SBool Source #

blastBE :: SBV (WordN n) -> [SBool] Source #

blastLE :: SBV (WordN n) -> [SBool] Source #

fromBitsBE :: [SBool] -> SBV (WordN n) Source #

fromBitsLE :: [SBool] -> SBV (WordN n) Source #

sTestBit :: SBV (WordN n) -> Int -> SBool Source #

sExtractBits :: SBV (WordN n) -> [Int] -> [SBool] Source #

sPopCount :: SBV (WordN n) -> SWord8 Source #

setBitTo :: SBV (WordN n) -> Int -> SBool -> SBV (WordN n) Source #

fullAdder :: SBV (WordN n) -> SBV (WordN n) -> (SBool, SBV (WordN n)) Source #

fullMultiplier :: SBV (WordN n) -> SBV (WordN n) -> (SBV (WordN n), SBV (WordN n)) Source #

sCountLeadingZeros :: SBV (WordN n) -> SWord8 Source #

sCountTrailingZeros :: SBV (WordN n) -> SWord8 Source #

## Splitting, joining, and extending bit-vectors

bvExtract Source #

Arguments

:: forall i j n bv proxy. (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat i, KnownNat j, (i + 1) <= n, j <= i, BVIsNonZero ((i - j) + 1)) |
=> proxy i | `i`: Start position, numbered from `n-1` to `0`
-> proxy j | `j`: End position, numbered from `n-1` to `0`, `j <= i` must hold
-> SBV (bv n) | Input bit vector of size `n`
-> SBV (bv ((i - j) + 1)) | Output is of size `i - j + 1`

Extract a portion of bits to form a smaller bit-vector.

(#) infixr 5 Source #

Arguments

:: (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat m, BVIsNonZero m, SymVal (bv m)) |
=> SBV (bv n) | First input, of size `n`, becomes the left side
-> SBV (bv m) | Second input, of size `m`, becomes the right side
-> SBV (bv (n + m)) | Concatenation, of size `n+m`

Join two bitvectors.

zeroExtend Source #

Arguments

:: forall n m bv. (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat m, BVIsNonZero m, SymVal (bv m), (n + 1) <= m, SIntegral (bv (m - n)), BVIsNonZero (m - n)) |
=> SBV (bv n) | Input, of size `n`
-> SBV (bv m) | Output, of size `m`. `n < m` must hold

Zero extend a bit-vector.

signExtend Source #

Arguments

:: forall n m bv. (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat m, BVIsNonZero m, SymVal (bv m), (n + 1) <= m, SFiniteBits (bv n), SIntegral (bv (m - n)), BVIsNonZero (m - n)) |
=> SBV (bv n) | Input, of size `n`
-> SBV (bv m) | Output, of size `m`. `n < m` must hold

Sign extend a bit-vector.

bvDrop Source #

Arguments

:: forall i n m bv proxy. (KnownNat n, BVIsNonZero n, KnownNat i, (i + 1) <= n, ((i + m) - n) <= 0, BVIsNonZero (n - i)) |
=> proxy i | `i`: Number of bits to drop. `i < n` must hold.
-> SBV (bv n) | Input, of size `n`
-> SBV (bv m) | Output, of size `m`. `m = n - i` holds.

Drop bits from the top of a bit-vector.

bvTake Source #

Arguments

:: forall i n bv proxy. (KnownNat n, BVIsNonZero n, KnownNat i, BVIsNonZero i, i <= n) |
=> proxy i | `i`: Number of bits to take. `0 < i <= n` must hold.
-> SBV (bv n) | Input, of size `n`
-> SBV (bv i) | Output, of size `i`

Take bits from the top of a bit-vector.

## Exponentiation

(.^) :: (Mergeable b, Num b, SIntegral e) => b -> SBV e -> b Source #

Symbolic exponentiation using bit blasting and repeated squaring.

N.B. The exponent must be unsigned/bounded if symbolic. Signed exponents will be rejected.

# IEEE-floating point numbers

class (SymVal a, RealFloat a) => IEEEFloating a where Source #

A class of floating-point (IEEE754) operations, some of which behave differently based on rounding modes. Note that unless the rounding mode is concretely RoundNearestTiesToEven, we will not concretely evaluate these, but rather pass down to the SMT solver.

Minimal complete definition

Nothing

Methods

fpAbs :: SBV a -> SBV a Source #

Compute the floating point absolute value.

fpNeg :: SBV a -> SBV a Source #

Compute the unary negation. Note that `0 - x` is not equivalent to `-x` for floating-point, since `-0` and `0` are different.

fpAdd :: SRoundingMode -> SBV a -> SBV a -> SBV a Source #

Add two floating point values, using the given rounding mode

fpSub :: SRoundingMode -> SBV a -> SBV a -> SBV a Source #

Subtract two floating point values, using the given rounding mode

fpMul :: SRoundingMode -> SBV a -> SBV a -> SBV a Source #

Multiply two floating point values, using the given rounding mode

fpDiv :: SRoundingMode -> SBV a -> SBV a -> SBV a Source #

Divide two floating point values, using the given rounding mode

fpFMA :: SRoundingMode -> SBV a -> SBV a -> SBV a -> SBV a Source #

Fused-multiply-add three floating point values, using the given rounding mode. `fpFMA x y z = x*y+z` but with only one rounding done for the whole operation; not two. Note that we will never concretely evaluate this function since Haskell lacks an FMA implementation.

fpSqrt :: SRoundingMode -> SBV a -> SBV a Source #

Compute the square-root of a float, using the given rounding mode

fpRem :: SBV a -> SBV a -> SBV a Source #

Compute the remainder: `x - y * n`, where `n` is the truncated integer nearest to x/y. The rounding mode is implicitly assumed to be `RoundNearestTiesToEven`.

fpRoundToIntegral :: SRoundingMode -> SBV a -> SBV a Source #

Round to the nearest integral value, using the given rounding mode.

fpMin :: SBV a -> SBV a -> SBV a Source #

Compute the minimum of two floats, respects `infinity` and `NaN` values

fpMax :: SBV a -> SBV a -> SBV a Source #

Compute the maximum of two floats, respects `infinity` and `NaN` values

fpIsEqualObject :: SBV a -> SBV a -> SBool Source #

Are the two given floats exactly the same. That is, `NaN` will compare equal to itself, `+0` will not compare equal to `-0` etc. This is the object level equality, as opposed to the semantic equality. (For the latter, just use `.==`.)

fpIsNormal :: SBV a -> SBool Source #

Is the floating-point number a normal value. (i.e., not denormalized.)

fpIsSubnormal :: SBV a -> SBool Source #

Is the floating-point number a subnormal value. (Also known as denormal.)

fpIsZero :: SBV a -> SBool Source #

Is the floating-point number 0? (Note that both +0 and -0 will satisfy this predicate.)

fpIsInfinite :: SBV a -> SBool Source #

Is the floating-point number infinity? (Note that both +oo and -oo will satisfy this predicate.)

fpIsNaN :: SBV a -> SBool Source #

Is the floating-point number a NaN value?

fpIsNegative :: SBV a -> SBool Source #

Is the floating-point number negative? Note that -0 satisfies this predicate but +0 does not.

fpIsPositive :: SBV a -> SBool Source #

Is the floating-point number positive? Note that +0 satisfies this predicate but -0 does not.

fpIsNegativeZero :: SBV a -> SBool Source #

Is the floating point number -0?

fpIsPositiveZero :: SBV a -> SBool Source #

Is the floating point number +0?

fpIsPoint :: SBV a -> SBool Source #

Is the floating-point number a regular floating point, i.e., not NaN, nor +oo, nor -oo. Normals or denormals are allowed.

#### Instances

Instances details

IEEEFloating Double Source # | SDouble instance

Instance details

Defined in Data.SBV.Core.Floating

Methods

fpAbs :: SBV Double -> SBV Double Source #

fpNeg :: SBV Double -> SBV Double Source #

fpAdd :: SRoundingMode -> SBV Double -> SBV Double -> SBV Double Source #

fpSub :: SRoundingMode -> SBV Double -> SBV Double -> SBV Double Source #

fpMul :: SRoundingMode -> SBV Double -> SBV Double -> SBV Double Source #

fpDiv :: SRoundingMode -> SBV Double -> SBV Double -> SBV Double Source #

fpFMA :: SRoundingMode -> SBV Double -> SBV Double -> SBV Double -> SBV Double Source #

fpSqrt :: SRoundingMode -> SBV Double -> SBV Double Source #

fpRem :: SBV Double -> SBV Double -> SBV Double Source #

fpRoundToIntegral :: SRoundingMode -> SBV Double -> SBV Double Source #

fpMin :: SBV Double -> SBV Double -> SBV Double Source #

fpMax :: SBV Double -> SBV Double -> SBV Double Source #

fpIsEqualObject :: SBV Double -> SBV Double -> SBool Source #

fpIsNormal :: SBV Double -> SBool Source #

fpIsSubnormal :: SBV Double -> SBool Source #

fpIsZero :: SBV Double -> SBool Source #

fpIsInfinite :: SBV Double -> SBool Source #

fpIsNaN :: SBV Double -> SBool Source #

fpIsNegative :: SBV Double -> SBool Source #

fpIsPositive :: SBV Double -> SBool Source #

fpIsNegativeZero :: SBV Double -> SBool Source #

fpIsPositiveZero :: SBV Double -> SBool Source #

fpIsPoint :: SBV Double -> SBool Source #

IEEEFloating Float Source # | SFloat instance

Instance details

Defined in Data.SBV.Core.Floating

Methods

fpAbs :: SBV Float -> SBV Float Source #

fpNeg :: SBV Float -> SBV Float Source #

fpAdd :: SRoundingMode -> SBV Float -> SBV Float -> SBV Float Source #

fpSub :: SRoundingMode -> SBV Float -> SBV Float -> SBV Float Source #

fpMul :: SRoundingMode -> SBV Float -> SBV Float -> SBV Float Source #

fpDiv :: SRoundingMode -> SBV Float -> SBV Float -> SBV Float Source #

fpFMA :: SRoundingMode -> SBV Float -> SBV Float -> SBV Float -> SBV Float Source #

fpSqrt :: SRoundingMode -> SBV Float -> SBV Float Source #

fpRem :: SBV Float -> SBV Float -> SBV Float Source #

fpRoundToIntegral :: SRoundingMode -> SBV Float -> SBV Float Source #

fpMin :: SBV Float -> SBV Float -> SBV Float Source #

fpMax :: SBV Float -> SBV Float -> SBV Float Source #

fpIsEqualObject :: SBV Float -> SBV Float -> SBool Source #

fpIsNormal :: SBV Float -> SBool Source #

fpIsSubnormal :: SBV Float -> SBool Source #

fpIsZero :: SBV Float -> SBool Source #

fpIsInfinite :: SBV Float -> SBool Source #

fpIsNaN :: SBV Float -> SBool Source #

fpIsNegative :: SBV Float -> SBool Source #

fpIsPositive :: SBV Float -> SBool Source #

fpIsNegativeZero :: SBV Float -> SBool Source #

fpIsPositiveZero :: SBV Float -> SBool Source #

fpIsPoint :: SBV Float -> SBool Source #

ValidFloat eb sb => IEEEFloating (FloatingPoint eb sb) Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fpAbs :: SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpNeg :: SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpAdd :: SRoundingMode -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpSub :: SRoundingMode -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpMul :: SRoundingMode -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpDiv :: SRoundingMode -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpFMA :: SRoundingMode -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpSqrt :: SRoundingMode -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpRem :: SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpRoundToIntegral :: SRoundingMode -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpMin :: SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpMax :: SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) Source #

fpIsEqualObject :: SBV (FloatingPoint eb sb) -> SBV (FloatingPoint eb sb) -> SBool Source #

fpIsNormal :: SBV (FloatingPoint eb sb) -> SBool Source #

fpIsSubnormal :: SBV (FloatingPoint eb sb) -> SBool Source #

fpIsZero :: SBV (FloatingPoint eb sb) -> SBool Source #

fpIsInfinite :: SBV (FloatingPoint eb sb) -> SBool Source #

fpIsNaN :: SBV (FloatingPoint eb sb) -> SBool Source #

fpIsNegative :: SBV (FloatingPoint eb sb) -> SBool Source #

fpIsPositive :: SBV (FloatingPoint eb sb) -> SBool Source #

fpIsNegativeZero :: SBV (FloatingPoint eb sb) -> SBool Source #

fpIsPositiveZero :: SBV (FloatingPoint eb sb) -> SBool Source #

fpIsPoint :: SBV (FloatingPoint eb sb) -> SBool Source #

data RoundingMode Source #

Rounding mode to be used for the IEEE floating-point operations. Note that Haskell's default is `RoundNearestTiesToEven`. If you use a different rounding mode, then the counter-examples you get may not match what you observe in Haskell.

Constructors

RoundNearestTiesToEven | Round to nearest representable floating point value. If precisely at half-way, pick the even number. (In this context, even means the lowest-order bit is zero.)
RoundNearestTiesToAway | Round to nearest representable floating point value. If precisely at half-way, pick the number further away from 0. (That is, for positive values, pick the greater; for negative values, pick the smaller.)
RoundTowardPositive | Round towards positive infinity. (Also known as rounding-up or ceiling.)
RoundTowardNegative | Round towards negative infinity. (Also known as rounding-down or floor.)
RoundTowardZero | Round towards zero. (Also known as truncation.)

#### Instances

Instances details

Data RoundingMode Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RoundingMode -> c RoundingMode Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RoundingMode Source #

toConstr :: RoundingMode -> Constr Source #

dataTypeOf :: RoundingMode -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RoundingMode) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RoundingMode) Source #

gmapT :: (forall b. Data b => b -> b) -> RoundingMode -> RoundingMode Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RoundingMode -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RoundingMode -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> RoundingMode -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RoundingMode -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RoundingMode -> m RoundingMode Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RoundingMode -> m RoundingMode Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RoundingMode -> m RoundingMode Source #

Bounded RoundingMode Source # |
Instance details Defined in Data.SBV.Core.Kind Methods minBound :: RoundingMode Source # maxBound :: RoundingMode Source #
Enum RoundingMode Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

succ :: RoundingMode -> RoundingMode Source #

pred :: RoundingMode -> RoundingMode Source #

toEnum :: Int -> RoundingMode Source #

fromEnum :: RoundingMode -> Int Source #

enumFrom :: RoundingMode -> [RoundingMode] Source #

enumFromThen :: RoundingMode -> RoundingMode -> [RoundingMode] Source #

enumFromTo :: RoundingMode -> RoundingMode -> [RoundingMode] Source #

enumFromThenTo :: RoundingMode -> RoundingMode -> RoundingMode -> [RoundingMode] Source #

Read RoundingMode Source # |
Instance details Defined in Data.SBV.Core.Kind Methods readsPrec :: Int -> ReadS RoundingMode Source # readList :: ReadS [RoundingMode] Source # readPrec :: ReadPrec RoundingMode Source # readListPrec :: ReadPrec [RoundingMode] Source #
Show RoundingMode Source # |
Instance details Defined in Data.SBV.Core.Kind Methods showsPrec :: Int -> RoundingMode -> ShowS Source # show :: RoundingMode -> String Source # showList :: [RoundingMode] -> ShowS Source #
Eq RoundingMode Source # |
Instance details Defined in Data.SBV.Core.Kind Methods (==) :: RoundingMode -> RoundingMode -> Bool Source # (/=) :: RoundingMode -> RoundingMode -> Bool Source #
Ord RoundingMode Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

compare :: RoundingMode -> RoundingMode -> Ordering Source #

(<) :: RoundingMode -> RoundingMode -> Bool Source #

(<=) :: RoundingMode -> RoundingMode -> Bool Source #

(>) :: RoundingMode -> RoundingMode -> Bool Source #

(>=) :: RoundingMode -> RoundingMode -> Bool Source #

max :: RoundingMode -> RoundingMode -> RoundingMode Source #

min :: RoundingMode -> RoundingMode -> RoundingMode Source #

SymVal RoundingMode Source # | `RoundingMode` can be used symbolically

Instance details

Defined in Data.SBV.Core.Data

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV RoundingMode) Source #

literal :: RoundingMode -> SBV RoundingMode Source #

fromCV :: CV -> RoundingMode Source #

isConcretely :: SBV RoundingMode -> (RoundingMode -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV RoundingMode) Source #

free_ :: MonadSymbolic m => m (SBV RoundingMode) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV RoundingMode] Source #

symbolic :: MonadSymbolic m => String -> m (SBV RoundingMode) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV RoundingMode] Source #

unliteral :: SBV RoundingMode -> Maybe RoundingMode Source #

isConcrete :: SBV RoundingMode -> Bool Source #

isSymbolic :: SBV RoundingMode -> Bool Source #

HasKind RoundingMode Source # | `RoundingMode` kind

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: RoundingMode -> Kind Source #

hasSign :: RoundingMode -> Bool Source #

intSizeOf :: RoundingMode -> Int Source #

isBoolean :: RoundingMode -> Bool Source #

isBounded :: RoundingMode -> Bool Source #

isReal :: RoundingMode -> Bool Source #

isFloat :: RoundingMode -> Bool Source #

isDouble :: RoundingMode -> Bool Source #

isRational :: RoundingMode -> Bool Source #

isFP :: RoundingMode -> Bool Source #

isUnbounded :: RoundingMode -> Bool Source #

isUserSort :: RoundingMode -> Bool Source #

isChar :: RoundingMode -> Bool Source #

isString :: RoundingMode -> Bool Source #

isList :: RoundingMode -> Bool Source #

isSet :: RoundingMode -> Bool Source #

isTuple :: RoundingMode -> Bool Source #

isMaybe :: RoundingMode -> Bool Source #

isEither :: RoundingMode -> Bool Source #

showType :: RoundingMode -> String Source #

SatModel RoundingMode Source # | A rounding mode, extracted from a model. (Default definition suffices)
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (RoundingMode, [CV]) Source # cvtModel :: (RoundingMode -> Maybe b) -> Maybe (RoundingMode, [CV]) -> Maybe (b, [CV]) Source #

type SRoundingMode = SBV RoundingMode Source #

The symbolic variant of `RoundingMode`

nan :: Floating a => a Source #

Not-A-Number for `Double` and `Float`. Surprisingly, Haskell Prelude doesn't have this value defined, so we provide it here.

infinity :: Floating a => a Source #

Infinity for `Double` and `Float`. Surprisingly, Haskell Prelude doesn't have this value defined, so we provide it here.

sNaN :: (Floating a, SymVal a) => SBV a Source #

Symbolic variant of Not-A-Number. This value will inhabit `SFloat`, `SDouble` and `SFloatingPoint`. types.

sInfinity :: (Floating a, SymVal a) => SBV a Source #

Symbolic variant of infinity. This value will inhabit both `SFloat`, `SDouble` and `SFloatingPoint`. types.

## Rounding modes

sRoundNearestTiesToEven :: SRoundingMode Source #

Symbolic variant of `RoundNearestTiesToEven`

sRoundNearestTiesToAway :: SRoundingMode Source #

Symbolic variant of `RoundNearestTiesToAway`

sRoundTowardPositive :: SRoundingMode Source #

Symbolic variant of `RoundTowardPositive`

sRoundTowardNegative :: SRoundingMode Source #

Symbolic variant of `RoundTowardNegative`

sRoundTowardZero :: SRoundingMode Source #

Symbolic variant of `RoundTowardZero`

sRNE :: SRoundingMode Source #

Alias for `sRoundNearestTiesToEven`

sRNA :: SRoundingMode Source #

Alias for `sRoundNearestTiesToAway`

sRTP :: SRoundingMode Source #

Alias for `sRoundTowardPositive`

sRTN :: SRoundingMode Source #

Alias for `sRoundTowardNegative`

sRTZ :: SRoundingMode Source #

Alias for `sRoundTowardZero`

## Conversion to/from floats

class SymVal a => IEEEFloatConvertible a where Source #

Conversion to and from floats

Minimal complete definition

Nothing

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV a Source #

Convert from an IEEE74 single precision float.

toSFloat :: SRoundingMode -> SBV a -> SFloat Source #

Convert to an IEEE-754 Single-precision float.

default toSFloat :: Integral a => SRoundingMode -> SBV a -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV a Source #

Convert from an IEEE74 double precision float.

toSDouble :: SRoundingMode -> SBV a -> SDouble Source #

Convert to an IEEE-754 Double-precision float.

default toSDouble :: Integral a => SRoundingMode -> SBV a -> SDouble Source #

fromSFloatingPoint :: ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV a Source #

Convert from an arbitrary floating point.

toSFloatingPoint :: ValidFloat eb sb => SRoundingMode -> SBV a -> SFloatingPoint eb sb Source #

Convert to an arbitrary floating point.

default toSFloatingPoint :: (Integral a, ValidFloat eb sb) => SRoundingMode -> SBV a -> SFloatingPoint eb sb Source #

#### Instances

Instances details

IEEEFloatConvertible Int16 Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Int16 Source #

toSFloat :: SRoundingMode -> SBV Int16 -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Int16 Source #

toSDouble :: SRoundingMode -> SBV Int16 -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Int16 Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Int16 -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Int32 Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Int32 Source #

toSFloat :: SRoundingMode -> SBV Int32 -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Int32 Source #

toSDouble :: SRoundingMode -> SBV Int32 -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Int32 Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Int32 -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Int64 Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Int64 Source #

toSFloat :: SRoundingMode -> SBV Int64 -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Int64 Source #

toSDouble :: SRoundingMode -> SBV Int64 -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Int64 Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Int64 -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Int8 Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Int8 Source #

toSFloat :: SRoundingMode -> SBV Int8 -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Int8 Source #

toSDouble :: SRoundingMode -> SBV Int8 -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Int8 Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Int8 -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Word16 Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Word16 Source #

toSFloat :: SRoundingMode -> SBV Word16 -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Word16 Source #

toSDouble :: SRoundingMode -> SBV Word16 -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Word16 Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Word16 -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Word32 Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Word32 Source #

toSFloat :: SRoundingMode -> SBV Word32 -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Word32 Source #

toSDouble :: SRoundingMode -> SBV Word32 -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Word32 Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Word32 -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Word64 Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Word64 Source #

toSFloat :: SRoundingMode -> SBV Word64 -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Word64 Source #

toSDouble :: SRoundingMode -> SBV Word64 -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Word64 Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Word64 -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Word8 Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Word8 Source #

toSFloat :: SRoundingMode -> SBV Word8 -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Word8 Source #

toSDouble :: SRoundingMode -> SBV Word8 -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Word8 Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Word8 -> SFloatingPoint eb sb Source #

IEEEFloatConvertible AlgReal Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV AlgReal Source #

toSFloat :: SRoundingMode -> SBV AlgReal -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV AlgReal Source #

toSDouble :: SRoundingMode -> SBV AlgReal -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV AlgReal Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV AlgReal -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Integer Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Integer Source #

toSFloat :: SRoundingMode -> SBV Integer -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Integer Source #

toSDouble :: SRoundingMode -> SBV Integer -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Integer Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Integer -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Double Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Double Source #

toSFloat :: SRoundingMode -> SBV Double -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Double Source #

toSDouble :: SRoundingMode -> SBV Double -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Double Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Double -> SFloatingPoint eb sb Source #

IEEEFloatConvertible Float Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV Float Source #

toSFloat :: SRoundingMode -> SBV Float -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV Float Source #

toSDouble :: SRoundingMode -> SBV Float -> SDouble Source #

fromSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SFloatingPoint eb sb -> SBV Float Source #

toSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). ValidFloat eb sb => SRoundingMode -> SBV Float -> SFloatingPoint eb sb Source #

ValidFloat eb sb => IEEEFloatConvertible (FloatingPoint eb sb) Source # |

Instance details

Defined in Data.SBV.Core.Floating

Methods

fromSFloat :: SRoundingMode -> SFloat -> SBV (FloatingPoint eb sb) Source #

toSFloat :: SRoundingMode -> SBV (FloatingPoint eb sb) -> SFloat Source #

fromSDouble :: SRoundingMode -> SDouble -> SBV (FloatingPoint eb sb) Source #

toSDouble :: SRoundingMode -> SBV (FloatingPoint eb sb) -> SDouble Source #

fromSFloatingPoint :: forall (eb0 :: Nat) (sb0 :: Nat). ValidFloat eb0 sb0 => SRoundingMode -> SFloatingPoint eb0 sb0 -> SBV (FloatingPoint eb sb) Source #

toSFloatingPoint :: forall (eb0 :: Nat) (sb0 :: Nat). ValidFloat eb0 sb0 => SRoundingMode -> SBV (FloatingPoint eb sb) -> SFloatingPoint eb0 sb0 Source #

## Bit-pattern conversions

sFloatAsSWord32 :: SFloat -> SWord32 Source #

Convert an `SFloat` to an `SWord32`, preserving the bit-correspondence. Note that since the representation for `NaN`s are not unique, this function will return a symbolic value when given a concrete `NaN`.

Implementation note: Since there's no corresponding function in SMTLib for conversion to bit-representation due to partiality, we use a translation trick by allocating a new word variable, converting it to float, and requiring it to be equivalent to the input. In code-generation mode, we simply map it to a simple conversion.

sWord32AsSFloat :: SWord32 -> SFloat Source #

Reinterpret the bits in a 32-bit word as a single-precision floating point number

sDoubleAsSWord64 :: SDouble -> SWord64 Source #

Convert an `SDouble` to an `SWord64`, preserving the bit-correspondence. Note that since the representation for `NaN`s are not unique, this function will return a symbolic value when given a concrete `NaN`.

See the implementation note for `sFloatAsSWord32`, as it applies here as well.

sWord64AsSDouble :: SWord64 -> SDouble Source #

Reinterpret the bits in a 32-bit word as a single-precision floating point number

sFloatingPointAsSWord :: forall eb sb. (ValidFloat eb sb, KnownNat (eb + sb), BVIsNonZero (eb + sb)) => SFloatingPoint eb sb -> SWord (eb + sb) Source #

Convert a float to the word containing the corresponding bit pattern

sWordAsSFloatingPoint :: forall eb sb. (KnownNat (eb + sb), BVIsNonZero (eb + sb), ValidFloat eb sb) => SWord (eb + sb) -> SFloatingPoint eb sb Source #

Convert a word to an arbitrary float, by reinterpreting the bits of the word as the corresponding bits of the float.

## Extracting bit patterns from floats

blastSFloat :: SFloat -> (SBool, [SBool], [SBool]) Source #

Extract the sign/exponent/mantissa of a single-precision float. The output will have 8 bits in the second argument for exponent, and 23 in the third for the mantissa.

blastSDouble :: SDouble -> (SBool, [SBool], [SBool]) Source #

Extract the sign/exponent/mantissa of a single-precision float. The output will have 11 bits in the second argument for exponent, and 52 in the third for the mantissa.

blastSFloatingPoint :: forall eb sb. (ValidFloat eb sb, KnownNat (eb + sb), BVIsNonZero (eb + sb)) => SFloatingPoint eb sb -> (SBool, [SBool], [SBool]) Source #

Extract the sign/exponent/mantissa of an arbitrary precision float. The output will have `eb` bits in the second argument for exponent, and `sb-1` bits in the third for mantissa.

# Enumerations

mkSymbolicEnumeration :: Name -> Q [Dec] Source #

Make an enumeration a symbolic type.

# Uninterpreted sorts, axioms, constants, and functions

mkUninterpretedSort :: Name -> Q [Dec] Source #

Make an uninterpred sort.

class SMTDefinable a where Source #

SMT definable constants and functions, which can also be uninterpeted. This class captures functions that we can generate standalone-code for in the SMT solver. Note that we also allow uninterpreted constants and functions too. An uninterpreted constant is a value that is indexed by its name. The only property the prover assumes -- about these values are that they are equivalent to themselves; i.e., (for functions) they return the same results when applied to same arguments. We support uninterpreted-functions as a general means of black-box'ing operations that are irrelevant for the purposes of the proof; i.e., when the proofs can be performed without any knowledge about the function itself.

Minimal complete definition: `sbvDefineValue`. However, most instances in practice are already provided by SBV, so end-users should not need to define their own instances.

Minimal complete definition

sbvDefineValue

Methods

smtFunction :: Lambda Symbolic a => String -> a -> a Source #

Generate the code for this value as an SMTLib function, instead of the usual unrolling semantics. This is useful for generating sub-functions in generated SMTLib problem, or handling recursive (and mutually-recursive) definitions that wouldn't terminate in an unrolling symbolic simulation context.

IMPORTANT NOTE The string argument names this function. Note that SBV will identify this function with that name, i.e., if you use this function twice (or use it recursively), it will simply assume this name uniquely identifies the function being defined. Hence, the user has to assure that this string is unique amongst all the functions you use. Furthermore, if the call to `smtFunction` happens in the scope of a parameter, you must make sure the string is chosen to keep it unique per parameter value. For instance, if you have:

      bar :: SInteger -> SInteger -> SInteger
      bar k = smtFunction "bar" (x -> x+k)   -- Note the capture of k!

and you call `bar 2` and `bar 3`, you *will* get the same SMTLib function. Obviously this is unsound. The reason is that the parameter value isn't captured by the name. In general, you should simply not do this, but if you must, have a concrete argument to make sure you can create a unique name. Something like:

      bar :: String -> SInteger -> SInteger -> SInteger
      bar tag k = smtFunction ("bar_" ++ tag) (x -> x+k)   -- Tag should make the name unique!

Then, make sure you use `bar "two" 2` and `bar "three" 3` etc. to preserve the invariant.

Note that this is a design choice, to keep function creation as easy to use as possible. SBV could've made `smtFunction` a monadic call and generated the name itself to avoid all these issues. But the ergonomics of that is worse, and doesn't fit with the general design philosophy. If you can think of a solution (perhaps using some nifty GHC tricks?) to avoid this issue without making `smtFunction` return a monadic result, please get in touch!

uninterpret :: String -> a Source #

Uninterpret a value, i.e., add this value as a completely undefined value/function that the solver is free to instantiate to satisfy other constraints.

cgUninterpret :: String -> [String] -> a -> a Source #

Uninterpret a value, only for the purposes of code-generation. For execution and verification the value is used as is. For code-generation, the alternate definition is used. This is useful when we want to take advantage of native libraries on the target languages.

sbvDefineValue :: String -> UIKind a -> a Source #

Most generalized form of uninterpretation, this function should not be needed by end-user-code, but is rather useful for the library development.

sym :: String -> a Source #

A synonym for `uninterpret`. Allows us to create variables without having to call `free` explicitly, i.e., without being in the symbolic monad.

#### Instances

Instances details

HasKind a => SMTDefinable (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods smtFunction :: String -> SBV a -> SBV a Source # uninterpret :: String -> SBV a Source # cgUninterpret :: String -> [String] -> SBV a -> SBV a Source # sbvDefineValue :: String -> UIKind (SBV a) -> SBV a Source # sym :: String -> SBV a Source #
(SymVal b, HasKind a) => SMTDefinable (SBV b -> SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods smtFunction :: String -> (SBV b -> SBV a) -> SBV b -> SBV a Source # uninterpret :: String -> SBV b -> SBV a Source # cgUninterpret :: String -> [String] -> (SBV b -> SBV a) -> SBV b -> SBV a Source # sbvDefineValue :: String -> UIKind (SBV b -> SBV a) -> SBV b -> SBV a Source # sym :: String -> SBV b -> SBV a Source #
(SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV c -> SBV b -> SBV a) -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV c -> SBV b -> SBV a) -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV c -> SBV b -> SBV a) -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV c -> SBV b -> SBV a Source #

(SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV d -> SBV c -> SBV b -> SBV a) -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV d -> SBV c -> SBV b -> SBV a) -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV d -> SBV c -> SBV b -> SBV a) -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV c, SBV b) -> SBV a) -> (SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV c, SBV b) -> SBV a) -> (SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV c, SBV b) -> SBV a) -> (SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV c, SBV b) -> SBV a Source #

(SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV d, SBV c, SBV b) -> SBV a) -> (SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV d, SBV c, SBV b) -> SBV a) -> (SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV d, SBV c, SBV b) -> SBV a) -> (SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

# Properties, proofs, and satisfiability

type Predicate = Symbolic SBool Source #

A predicate is a symbolic program that returns a (symbolic) boolean value. For all intents and purposes, it can be treated as an n-ary function from symbolic-values to a boolean. The `Symbolic` monad captures the underlying representation, and can/should be ignored by the users of the library, unless you are building further utilities on top of SBV itself. Instead, simply use the `Predicate` type when necessary.

type ConstraintSet = Symbolic () Source #

A constraint set is a symbolic program that returns no values. The idea is that the constraints/min-max goals will serve as the collection of constraints that will be used for sat/optimize calls.

class ExtractIO m => ProvableM m a where Source #

A type `a` is provable if we can turn it into a predicate, i.e., it has to return a boolean. This class captures essentially prove calls.

Minimal complete definition

proofArgReduce

Methods

proofArgReduce :: a -> SymbolicT m SBool Source #

Reduce an arg, for proof purposes.

prove :: a -> m ThmResult Source #

Generalization of `prove`

proveWith :: SMTConfig -> a -> m ThmResult Source #

Generalization of `proveWith`

dprove :: a -> m ThmResult Source #

Generalization of `dprove`

dproveWith :: SMTConfig -> a -> m ThmResult Source #

Generalization of `dproveWith`

isVacuousProof :: a -> m Bool Source #

Generalization of `isVacuousProof`

isVacuousProofWith :: SMTConfig -> a -> m Bool Source #

Generalization of `isVacuousProofWith`

isTheorem :: a -> m Bool Source #

Generalization of `isTheorem`

isTheoremWith :: SMTConfig -> a -> m Bool Source #

Generalization of `isTheoremWith`

#### Instances

Instances details

ExtractIO m => ProvableM m SBool Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: SBool -> SymbolicT m SBool Source #

prove :: SBool -> m ThmResult Source #

proveWith :: SMTConfig -> SBool -> m ThmResult Source #

dprove :: SBool -> m ThmResult Source #

dproveWith :: SMTConfig -> SBool -> m ThmResult Source #

isVacuousProof :: SBool -> m Bool Source #

isVacuousProofWith :: SMTConfig -> SBool -> m Bool Source #

isTheorem :: SBool -> m Bool Source #

isTheoremWith :: SMTConfig -> SBool -> m Bool Source #

ExtractIO m => ProvableM m (SymbolicT m SBool) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: SymbolicT m SBool -> SymbolicT m SBool Source #

prove :: SymbolicT m SBool -> m ThmResult Source #

proveWith :: SMTConfig -> SymbolicT m SBool -> m ThmResult Source #

dprove :: SymbolicT m SBool -> m ThmResult Source #

dproveWith :: SMTConfig -> SymbolicT m SBool -> m ThmResult Source #

isVacuousProof :: SymbolicT m SBool -> m Bool Source #

isVacuousProofWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

isTheorem :: SymbolicT m SBool -> m Bool Source #

isTheoremWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

(ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (Exists nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (Exists nm a -> r) -> SymbolicT m SBool Source #

prove :: (Exists nm a -> r) -> m ThmResult Source #

proveWith :: SMTConfig -> (Exists nm a -> r) -> m ThmResult Source #

dprove :: (Exists nm a -> r) -> m ThmResult Source #

dproveWith :: SMTConfig -> (Exists nm a -> r) -> m ThmResult Source #

isVacuousProof :: (Exists nm a -> r) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (Exists nm a -> r) -> m Bool Source #

isTheorem :: (Exists nm a -> r) -> m Bool Source #

isTheoremWith :: SMTConfig -> (Exists nm a -> r) -> m Bool Source #

(KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (ExistsN n nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (ExistsN n nm a -> r) -> SymbolicT m SBool Source #

prove :: (ExistsN n nm a -> r) -> m ThmResult Source #

proveWith :: SMTConfig -> (ExistsN n nm a -> r) -> m ThmResult Source #

dprove :: (ExistsN n nm a -> r) -> m ThmResult Source #

dproveWith :: SMTConfig -> (ExistsN n nm a -> r) -> m ThmResult Source #

isVacuousProof :: (ExistsN n nm a -> r) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (ExistsN n nm a -> r) -> m Bool Source #

isTheorem :: (ExistsN n nm a -> r) -> m Bool Source #

isTheoremWith :: SMTConfig -> (ExistsN n nm a -> r) -> m Bool Source #

(ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r, EqSymbolic (SBV a)) => ProvableM m (ExistsUnique nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (ExistsUnique nm a -> r) -> SymbolicT m SBool Source #

prove :: (ExistsUnique nm a -> r) -> m ThmResult Source #

proveWith :: SMTConfig -> (ExistsUnique nm a -> r) -> m ThmResult Source #

dprove :: (ExistsUnique nm a -> r) -> m ThmResult Source #

dproveWith :: SMTConfig -> (ExistsUnique nm a -> r) -> m ThmResult Source #

isVacuousProof :: (ExistsUnique nm a -> r) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (ExistsUnique nm a -> r) -> m Bool Source #

isTheorem :: (ExistsUnique nm a -> r) -> m Bool Source #

isTheoremWith :: SMTConfig -> (ExistsUnique nm a -> r) -> m Bool Source #

(ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (Forall nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (Forall nm a -> r) -> SymbolicT m SBool Source #

prove :: (Forall nm a -> r) -> m ThmResult Source #

proveWith :: SMTConfig -> (Forall nm a -> r) -> m ThmResult Source #

dprove :: (Forall nm a -> r) -> m ThmResult Source #

dproveWith :: SMTConfig -> (Forall nm a -> r) -> m ThmResult Source #

isVacuousProof :: (Forall nm a -> r) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (Forall nm a -> r) -> m Bool Source #

isTheorem :: (Forall nm a -> r) -> m Bool Source #

isTheoremWith :: SMTConfig -> (Forall nm a -> r) -> m Bool Source #

(KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (ForallN n nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (ForallN n nm a -> r) -> SymbolicT m SBool Source #

prove :: (ForallN n nm a -> r) -> m ThmResult Source #

proveWith :: SMTConfig -> (ForallN n nm a -> r) -> m ThmResult Source #

dprove :: (ForallN n nm a -> r) -> m ThmResult Source #

dproveWith :: SMTConfig -> (ForallN n nm a -> r) -> m ThmResult Source #

isVacuousProof :: (ForallN n nm a -> r) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (ForallN n nm a -> r) -> m Bool Source #

isTheorem :: (ForallN n nm a -> r) -> m Bool Source #

isTheoremWith :: SMTConfig -> (ForallN n nm a -> r) -> m Bool Source #

(HasKind a, HasKind b, ProvableM m p) => ProvableM m (SArray a b -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (SArray a b -> p) -> SymbolicT m SBool Source #

prove :: (SArray a b -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> (SArray a b -> p) -> m ThmResult Source #

dprove :: (SArray a b -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> (SArray a b -> p) -> m ThmResult Source #

isVacuousProof :: (SArray a b -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (SArray a b -> p) -> m Bool Source #

isTheorem :: (SArray a b -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> (SArray a b -> p) -> m Bool Source #

(SymVal a, ProvableM m p) => ProvableM m (SBV a -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (SBV a -> p) -> SymbolicT m SBool Source #

prove :: (SBV a -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> (SBV a -> p) -> m ThmResult Source #

dprove :: (SBV a -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> (SBV a -> p) -> m ThmResult Source #

isVacuousProof :: (SBV a -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (SBV a -> p) -> m Bool Source #

isTheorem :: (SBV a -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> (SBV a -> p) -> m Bool Source #

(SymVal a, SymVal b, ProvableM m p) => ProvableM m ((SBV a, SBV b) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

type Provable = ProvableM IO Source #

`Provable` is specialization of `ProvableM` to the `IO` monad. Unless you are using transformers explicitly, this is the type you should prefer.

class ExtractIO m => SatisfiableM m a where Source #

A type `a` is satisfiable if it has constraints, potentially returning a boolean. This class captures essentially sat and optimize calls.

Minimal complete definition

satArgReduce

Methods

satArgReduce :: a -> SymbolicT m SBool Source #

Reduce an arg, for sat purposes.

sat :: a -> m SatResult Source #

Generalization of `sat`

satWith :: SMTConfig -> a -> m SatResult Source #

Generalization of `satWith`

dsat :: a -> m SatResult Source #

Generalization of `sat`

dsatWith :: SMTConfig -> a -> m SatResult Source #

Generalization of `satWith`

allSat :: a -> m AllSatResult Source #

Generalization of `allSat`

allSatWith :: SMTConfig -> a -> m AllSatResult Source #

Generalization of `allSatWith`

isSatisfiable :: a -> m Bool Source #

Generalization of `isSatisfiable`

isSatisfiableWith :: SMTConfig -> a -> m Bool Source #

Generalization of `isSatisfiableWith`

optimize :: OptimizeStyle -> a -> m OptimizeResult Source #

Generalization of `optimize`

optimizeWith :: SMTConfig -> OptimizeStyle -> a -> m OptimizeResult Source #

Generalization of `optimizeWith`

#### Instances

Instances details

ExtractIO m => SatisfiableM m SBool Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: SBool -> SymbolicT m SBool Source #

sat :: SBool -> m SatResult Source #

satWith :: SMTConfig -> SBool -> m SatResult Source #

dsat :: SBool -> m SatResult Source #

dsatWith :: SMTConfig -> SBool -> m SatResult Source #

allSat :: SBool -> m AllSatResult Source #

allSatWith :: SMTConfig -> SBool -> m AllSatResult Source #

isSatisfiable :: SBool -> m Bool Source #

isSatisfiableWith :: SMTConfig -> SBool -> m Bool Source #

optimize :: OptimizeStyle -> SBool -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> SBool -> m OptimizeResult Source #

ExtractIO m => SatisfiableM m (SymbolicT m SBool) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: SymbolicT m SBool -> SymbolicT m SBool Source #

sat :: SymbolicT m SBool -> m SatResult Source #

satWith :: SMTConfig -> SymbolicT m SBool -> m SatResult Source #

dsat :: SymbolicT m SBool -> m SatResult Source #

dsatWith :: SMTConfig -> SymbolicT m SBool -> m SatResult Source #

allSat :: SymbolicT m SBool -> m AllSatResult Source #

allSatWith :: SMTConfig -> SymbolicT m SBool -> m AllSatResult Source #

isSatisfiable :: SymbolicT m SBool -> m Bool Source #

isSatisfiableWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

optimize :: OptimizeStyle -> SymbolicT m SBool -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> SymbolicT m SBool -> m OptimizeResult Source #

ExtractIO m => SatisfiableM m (SymbolicT m ()) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: SymbolicT m () -> SymbolicT m SBool Source #

sat :: SymbolicT m () -> m SatResult Source #

satWith :: SMTConfig -> SymbolicT m () -> m SatResult Source #

dsat :: SymbolicT m () -> m SatResult Source #

dsatWith :: SMTConfig -> SymbolicT m () -> m SatResult Source #

allSat :: SymbolicT m () -> m AllSatResult Source #

allSatWith :: SMTConfig -> SymbolicT m () -> m AllSatResult Source #

isSatisfiable :: SymbolicT m () -> m Bool Source #

isSatisfiableWith :: SMTConfig -> SymbolicT m () -> m Bool Source #

optimize :: OptimizeStyle -> SymbolicT m () -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> SymbolicT m () -> m OptimizeResult Source #

(ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (Exists nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (Exists nm a -> r) -> SymbolicT m SBool Source #

sat :: (Exists nm a -> r) -> m SatResult Source #

satWith :: SMTConfig -> (Exists nm a -> r) -> m SatResult Source #

dsat :: (Exists nm a -> r) -> m SatResult Source #

dsatWith :: SMTConfig -> (Exists nm a -> r) -> m SatResult Source #

allSat :: (Exists nm a -> r) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (Exists nm a -> r) -> m AllSatResult Source #

isSatisfiable :: (Exists nm a -> r) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (Exists nm a -> r) -> m Bool Source #

optimize :: OptimizeStyle -> (Exists nm a -> r) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (Exists nm a -> r) -> m OptimizeResult Source #

(KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (ExistsN n nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (ExistsN n nm a -> r) -> SymbolicT m SBool Source #

sat :: (ExistsN n nm a -> r) -> m SatResult Source #

satWith :: SMTConfig -> (ExistsN n nm a -> r) -> m SatResult Source #

dsat :: (ExistsN n nm a -> r) -> m SatResult Source #

dsatWith :: SMTConfig -> (ExistsN n nm a -> r) -> m SatResult Source #

allSat :: (ExistsN n nm a -> r) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (ExistsN n nm a -> r) -> m AllSatResult Source #

isSatisfiable :: (ExistsN n nm a -> r) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (ExistsN n nm a -> r) -> m Bool Source #

optimize :: OptimizeStyle -> (ExistsN n nm a -> r) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (ExistsN n nm a -> r) -> m OptimizeResult Source #

(ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r, EqSymbolic (SBV a)) => SatisfiableM m (ExistsUnique nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (ExistsUnique nm a -> r) -> SymbolicT m SBool Source #

sat :: (ExistsUnique nm a -> r) -> m SatResult Source #

satWith :: SMTConfig -> (ExistsUnique nm a -> r) -> m SatResult Source #

dsat :: (ExistsUnique nm a -> r) -> m SatResult Source #

dsatWith :: SMTConfig -> (ExistsUnique nm a -> r) -> m SatResult Source #

allSat :: (ExistsUnique nm a -> r) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (ExistsUnique nm a -> r) -> m AllSatResult Source #

isSatisfiable :: (ExistsUnique nm a -> r) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (ExistsUnique nm a -> r) -> m Bool Source #

optimize :: OptimizeStyle -> (ExistsUnique nm a -> r) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (ExistsUnique nm a -> r) -> m OptimizeResult Source #

(ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (Forall nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (Forall nm a -> r) -> SymbolicT m SBool Source #

sat :: (Forall nm a -> r) -> m SatResult Source #

satWith :: SMTConfig -> (Forall nm a -> r) -> m SatResult Source #

dsat :: (Forall nm a -> r) -> m SatResult Source #

dsatWith :: SMTConfig -> (Forall nm a -> r) -> m SatResult Source #

allSat :: (Forall nm a -> r) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (Forall nm a -> r) -> m AllSatResult Source #

isSatisfiable :: (Forall nm a -> r) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (Forall nm a -> r) -> m Bool Source #

optimize :: OptimizeStyle -> (Forall nm a -> r) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (Forall nm a -> r) -> m OptimizeResult Source #

(KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (ForallN n nm a -> r) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (ForallN n nm a -> r) -> SymbolicT m SBool Source #

sat :: (ForallN n nm a -> r) -> m SatResult Source #

satWith :: SMTConfig -> (ForallN n nm a -> r) -> m SatResult Source #

dsat :: (ForallN n nm a -> r) -> m SatResult Source #

dsatWith :: SMTConfig -> (ForallN n nm a -> r) -> m SatResult Source #

allSat :: (ForallN n nm a -> r) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (ForallN n nm a -> r) -> m AllSatResult Source #

isSatisfiable :: (ForallN n nm a -> r) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (ForallN n nm a -> r) -> m Bool Source #

optimize :: OptimizeStyle -> (ForallN n nm a -> r) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (ForallN n nm a -> r) -> m OptimizeResult Source #

(HasKind a, HasKind b, SatisfiableM m p) => SatisfiableM m (SArray a b -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (SArray a b -> p) -> SymbolicT m SBool Source #

sat :: (SArray a b -> p) -> m SatResult Source #

satWith :: SMTConfig -> (SArray a b -> p) -> m SatResult Source #

dsat :: (SArray a b -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> (SArray a b -> p) -> m SatResult Source #

allSat :: (SArray a b -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (SArray a b -> p) -> m AllSatResult Source #

isSatisfiable :: (SArray a b -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (SArray a b -> p) -> m Bool Source #

optimize :: OptimizeStyle -> (SArray a b -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (SArray a b -> p) -> m OptimizeResult Source #

(SymVal a, SatisfiableM m p) => SatisfiableM m (SBV a -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (SBV a -> p) -> SymbolicT m SBool Source #

sat :: (SBV a -> p) -> m SatResult Source #

satWith :: SMTConfig -> (SBV a -> p) -> m SatResult Source #

dsat :: (SBV a -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> (SBV a -> p) -> m SatResult Source #

allSat :: (SBV a -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (SBV a -> p) -> m AllSatResult Source #

isSatisfiable :: (SBV a -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (SBV a -> p) -> m Bool Source #

optimize :: OptimizeStyle -> (SBV a -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (SBV a -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m OptimizeResult Source #

type Satisfiable = SatisfiableM IO Source #

`Satisfiable` is specialization of `SatisfiableM` to the `IO` monad. Unless you are using transformers explicitly, this is the type you should prefer.

generateSMTBenchmarkSat :: SatisfiableM m a => a -> m String Source #

Create an SMT-Lib2 benchmark, for a SAT query.

generateSMTBenchmarkProof :: ProvableM m a => a -> m String Source #

Create an SMT-Lib2 benchmark, for a Proof query.

solve :: MonadSymbolic m => [SBool] -> m SBool Source #

Generalization of `solve`

# Constraints

## General constraints

constrain :: (SolverContext m, QuantifiedBool a) => a -> m () Source #

Add a constraint, any satisfying instance must satisfy this condition.

softConstrain :: (SolverContext m, QuantifiedBool a) => a -> m () Source #

Add a soft constraint. The solver will try to satisfy this condition if possible, but won't if it cannot.

## Constraint Vacuity

## Named constraints and attributes

namedConstraint :: (SolverContext m, QuantifiedBool a) => String -> a -> m () Source #

Add a named constraint. The name is used in unsat-core extraction.

constrainWithAttribute :: (SolverContext m, QuantifiedBool a) => [(String, String)] -> a -> m () Source #

Add a constraint, with arbitrary attributes.

## Unsat cores

## Cardinality constraints

pbAtMost :: [SBool] -> Int -> SBool Source #

`sTrue` if at most `k` of the input arguments are `sTrue`

pbAtLeast :: [SBool] -> Int -> SBool Source #

`sTrue` if at least `k` of the input arguments are `sTrue`

pbExactly :: [SBool] -> Int -> SBool Source #

`sTrue` if exactly `k` of the input arguments are `sTrue`

pbLe :: [(Int, SBool)] -> Int -> SBool Source #

`sTrue` if the sum of coefficients for `sTrue` elements is at most `k`. Generalizes `pbAtMost`.

pbGe :: [(Int, SBool)] -> Int -> SBool Source #

`sTrue` if the sum of coefficients for `sTrue` elements is at least `k`. Generalizes `pbAtLeast`.

pbEq :: [(Int, SBool)] -> Int -> SBool Source #

`sTrue` if the sum of coefficients for `sTrue` elements is exactly least `k`. Useful for coding exactly K-of-N constraints, and in particular mutex constraints.

pbMutexed :: [SBool] -> SBool Source #

`sTrue` if there is at most one set bit

pbStronglyMutexed :: [SBool] -> SBool Source #

`sTrue` if there is exactly one set bit

# Checking safety

sAssert :: HasKind a => Maybe CallStack -> String -> SBool -> SBV a -> SBV a Source #

Symbolic assert. Check that the given boolean condition is always `sTrue` in the given path. The optional first argument can be used to provide call-stack info via GHC's location facilities.

isSafe :: SafeResult -> Bool Source #

Check if a safe-call was safe or not, turning a `SafeResult` to a Bool.

class ExtractIO m => SExecutable m a where Source #

Symbolically executable program fragments. This class is mainly used for `safe` calls, and is sufficiently populated internally to cover most use cases. Users can extend it as they wish to allow `safe` checks for SBV programs that return/take types that are user-defined.

Minimal complete definition

sName

Methods

sName :: a -> SymbolicT m () Source #

Generalization of `sName`

safe :: a -> m [SafeResult] Source #

Generalization of `safe`

safeWith :: SMTConfig -> a -> m [SafeResult] Source #

Generalization of `safeWith`

#### Instances

Instances details

ExtractIO m => SExecutable m () Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: () -> SymbolicT m () Source # safe :: () -> m [SafeResult] Source # safeWith :: SMTConfig -> () -> m [SafeResult] Source #
ExtractIO m => SExecutable m (SBV a) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: SBV a -> SymbolicT m () Source # safe :: SBV a -> m [SafeResult] Source # safeWith :: SMTConfig -> SBV a -> m [SafeResult] Source #
ExtractIO m => SExecutable m [SBV a] Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: [SBV a] -> SymbolicT m () Source # safe :: [SBV a] -> m [SafeResult] Source # safeWith :: SMTConfig -> [SBV a] -> m [SafeResult] Source #
(ExtractIO m, NFData a) => SExecutable m (SymbolicT m a) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: SymbolicT m a -> SymbolicT m () Source # safe :: SymbolicT m a -> m [SafeResult] Source # safeWith :: SMTConfig -> SymbolicT m a -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b) => SExecutable m (SBV a, SBV b) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b) -> SymbolicT m () Source # safe :: (SBV a, SBV b) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b) -> m [SafeResult] Source #
(SymVal a, SExecutable m p) => SExecutable m (SBV a -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a -> p) -> SymbolicT m () Source # safe :: (SBV a -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SExecutable m p) => SExecutable m ((SBV a, SBV b) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c) => SExecutable m (SBV a, SBV b, SBV c) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c) -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d) => SExecutable m (SBV a, SBV b, SBV c, SBV d) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c, SBV d) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c, SBV d) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d) -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c, SBV d, SBV e) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c, SBV d, SBV e) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d, SBV e) -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e, NFData f, SymVal f) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e, NFData f, SymVal f, NFData g, SymVal g) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> m [SafeResult] Source #

# Quick-checking

sbvQuickCheck :: Symbolic SBool -> IO Bool Source #

Quick check an SBV property. Note that a regular `quickCheck` call will work just as well. Use this variant if you want to receive the boolean result.

# Optimization

## Multiple optimization goals

data OptimizeStyle Source #

Style of optimization. Note that in the pareto case the user is allowed to specify a max number of fronts to query the solver for, since there might potentially be an infinite number of them and there is no way to know exactly how many ahead of time. If `Nothing` is given, SBV will possibly loop forever if the number is really infinite.

Constructors

Lexicographic | Objectives are optimized in the order given, earlier objectives have higher priority.
Independent | Each objective is optimized independently.
Pareto (Maybe Int) | Objectives are optimized according to pareto front: That is, no objective can be made better without making some other worse.

#### Instances

Instances details

Show OptimizeStyle Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> OptimizeStyle -> ShowS Source # show :: OptimizeStyle -> String Source # showList :: [OptimizeStyle] -> ShowS Source #
NFData OptimizeStyle Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: OptimizeStyle -> () Source #
Eq OptimizeStyle Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: OptimizeStyle -> OptimizeStyle -> Bool Source # (/=) :: OptimizeStyle -> OptimizeStyle -> Bool Source #

## Objectives

data Objective a Source #

Objective of optimization. We can minimize, maximize, or give a soft assertion with a penalty for not satisfying it.

Constructors

Minimize String a | Minimize this metric
Maximize String a | Maximize this metric
AssertWithPenalty String a Penalty | A soft assertion, with an associated penalty

#### Instances

Instances details

Functor Objective Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods fmap :: (a -> b) -> Objective a -> Objective b Source # (<$) :: a -> Objective b -> Objective a Source #
Show a => Show (Objective a) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> Objective a -> ShowS Source # show :: Objective a -> String Source # showList :: [Objective a] -> ShowS Source #
NFData a => NFData (Objective a) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Objective a -> () Source #

## Soft assumptions

assertWithPenalty :: MonadSymbolic m => String -> SBool -> Penalty -> m () Source #

Generalization of `assertWithPenalty`

data Penalty Source #

Penalty for a soft-assertion. The default penalty is `1`, with all soft-assertions belonging to the same objective goal. A positive weight and an optional group can be provided by using the `Penalty` constructor.

Constructors

DefaultPenalty | Default: Penalty of `1` and no group attached
Penalty Rational (Maybe String) | Penalty with a weight and an optional group

#### Instances

Instances details

Show Penalty Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> Penalty -> ShowS Source # show :: Penalty -> String Source # showList :: [Penalty] -> ShowS Source #
NFData Penalty Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Penalty -> () Source #

## Field extensions

If an optimization results in an infinity/epsilon value, the returned `CV` value will be in the corresponding extension field.

data ExtCV Source #

A simple expression type over extended values, covering infinity, epsilon and intervals.

Constructors

Infinite Kind |
Epsilon Kind |
Interval ExtCV ExtCV |
BoundedCV CV |
AddExtCV ExtCV ExtCV |
MulExtCV ExtCV ExtCV |

#### Instances

Instances details

Show ExtCV Source # | Show instance, shows with the kind
Instance details Defined in Data.SBV.Core.Concrete Methods showsPrec :: Int -> ExtCV -> ShowS Source # show :: ExtCV -> String Source # showList :: [ExtCV] -> ShowS Source #
HasKind ExtCV Source # | Kind instance for Extended CV

Instance details

Defined in Data.SBV.Core.Concrete

Methods

kindOf :: ExtCV -> Kind Source #

hasSign :: ExtCV -> Bool Source #

intSizeOf :: ExtCV -> Int Source #

isBoolean :: ExtCV -> Bool Source #

isBounded :: ExtCV -> Bool Source #

isReal :: ExtCV -> Bool Source #

isFloat :: ExtCV -> Bool Source #

isDouble :: ExtCV -> Bool Source #

isRational :: ExtCV -> Bool Source #

isFP :: ExtCV -> Bool Source #

isUnbounded :: ExtCV -> Bool Source #

isUserSort :: ExtCV -> Bool Source #

isChar :: ExtCV -> Bool Source #

isString :: ExtCV -> Bool Source #

isList :: ExtCV -> Bool Source #

isSet :: ExtCV -> Bool Source #

isTuple :: ExtCV -> Bool Source #

isMaybe :: ExtCV -> Bool Source #

isEither :: ExtCV -> Bool Source #

showType :: ExtCV -> String Source #

data GeneralizedCV Source #

A generalized CV allows for expressions involving infinite and epsilon values/intervals Used in optimization problems.

Constructors

ExtendedCV ExtCV |
RegularCV CV |

#### Instances

Instances details

Show GeneralizedCV Source # | Show instance for Generalized `CV`
Instance details Defined in Data.SBV.Core.Concrete Methods showsPrec :: Int -> GeneralizedCV -> ShowS Source # show :: GeneralizedCV -> String Source # showList :: [GeneralizedCV] -> ShowS Source #
NFData GeneralizedCV Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: GeneralizedCV -> () Source #
HasKind GeneralizedCV Source # | `Kind` instance for generalized CV

Instance details

Defined in Data.SBV.Core.Concrete

Methods

kindOf :: GeneralizedCV -> Kind Source #

hasSign :: GeneralizedCV -> Bool Source #

intSizeOf :: GeneralizedCV -> Int Source #

isBoolean :: GeneralizedCV -> Bool Source #

isBounded :: GeneralizedCV -> Bool Source #

isReal :: GeneralizedCV -> Bool Source #

isFloat :: GeneralizedCV -> Bool Source #

isDouble :: GeneralizedCV -> Bool Source #

isRational :: GeneralizedCV -> Bool Source #

isFP :: GeneralizedCV -> Bool Source #

isUnbounded :: GeneralizedCV -> Bool Source #

isUserSort :: GeneralizedCV -> Bool Source #

isChar :: GeneralizedCV -> Bool Source #

isString :: GeneralizedCV -> Bool Source #

isList :: GeneralizedCV -> Bool Source #

isSet :: GeneralizedCV -> Bool Source #

isTuple :: GeneralizedCV -> Bool Source #

isMaybe :: GeneralizedCV -> Bool Source #

isEither :: GeneralizedCV -> Bool Source #

showType :: GeneralizedCV -> String Source #

# Model extraction

## Inspecting proof results

newtype ThmResult Source #

A `prove` call results in a `ThmResult`

Constructors

ThmResult SMTResult |

#### Instances

Instances details

Show ThmResult Source # |
Instance details Defined in Data.SBV.SMT.SMT Methods showsPrec :: Int -> ThmResult -> ShowS Source # show :: ThmResult -> String Source # showList :: [ThmResult] -> ShowS Source #
NFData ThmResult Source # |
Instance details Defined in Data.SBV.SMT.SMT Methods rnf :: ThmResult -> () Source #
Modelable ThmResult Source # | `ThmResult` as a generic model provider

Instance details

Defined in Data.SBV.SMT.SMT

Methods

modelExists :: ThmResult -> Bool Source #

getModelAssignment :: SatModel b => ThmResult -> Either String (Bool, b) Source #

getModelDictionary :: ThmResult -> Map String CV Source #

getModelValue :: SymVal b => String -> ThmResult -> Maybe b Source #

getModelUninterpretedValue :: String -> ThmResult -> Maybe String Source #

extractModel :: SatModel b => ThmResult -> Maybe b Source #

getModelObjectives :: ThmResult -> Map String GeneralizedCV Source #

getModelObjectiveValue :: String -> ThmResult -> Maybe GeneralizedCV Source #

getModelUIFuns :: ThmResult -> Map String (SBVType, Either String ([([CV], CV)], CV)) Source #

getModelUIFunValue :: String -> ThmResult -> Maybe (SBVType, Either String ([([CV], CV)], CV)) Source #

newtype SatResult Source #

A `sat` call results in a `SatResult` The reason for having a separate `SatResult` is to have a more meaningful `Show` instance.

Constructors

SatResult SMTResult |

#### Instances

Instances details

Show SatResult Source # |
Instance details Defined in Data.SBV.SMT.SMT Methods showsPrec :: Int -> SatResult -> ShowS Source # show :: SatResult -> String Source # showList :: [SatResult] -> ShowS Source #
NFData SatResult Source # |
Instance details Defined in Data.SBV.SMT.SMT Methods rnf :: SatResult -> () Source #
Modelable SatResult Source # | `SatResult` as a generic model provider

Instance details

Defined in Data.SBV.SMT.SMT

Methods

modelExists :: SatResult -> Bool Source #

getModelAssignment :: SatModel b => SatResult -> Either String (Bool, b) Source #

getModelDictionary :: SatResult -> Map String CV Source #

getModelValue :: SymVal b => String -> SatResult -> Maybe b Source #

getModelUninterpretedValue :: String -> SatResult -> Maybe String Source #

extractModel :: SatModel b => SatResult -> Maybe b Source #

getModelObjectives :: SatResult -> Map String GeneralizedCV Source #

getModelObjectiveValue :: String -> SatResult -> Maybe GeneralizedCV Source #

getModelUIFuns :: SatResult -> Map String (SBVType, Either String ([([CV], CV)], CV)) Source #

getModelUIFunValue :: String -> SatResult -> Maybe (SBVType, Either String ([([CV], CV)], CV)) Source #

data AllSatResult Source #

An `allSat` call results in a `AllSatResult`

Constructors

AllSatResult |

Fields

- allSatMaxModelCountReached :: Bool

  Did we reach the user given model count limit?

- allSatSolverReturnedUnknown :: Bool

  Did the solver report unknown at the end?

- allSatSolverReturnedDSat :: Bool

  Did the solver report delta-satisfiable at the end?

- allSatResults :: [SMTResult]

  All satisfying models

#### Instances

Instances details

Show AllSatResult Source # |
Instance details Defined in Data.SBV.SMT.SMT Methods showsPrec :: Int -> AllSatResult -> ShowS Source # show :: AllSatResult -> String Source # showList :: [AllSatResult] -> ShowS Source #

newtype SafeResult Source #

A `safe` call results in a `SafeResult`

Constructors

SafeResult (Maybe String, String, SMTResult) |

#### Instances

Instances details

Show SafeResult Source # |
Instance details Defined in Data.SBV.SMT.SMT Methods showsPrec :: Int -> SafeResult -> ShowS Source # show :: SafeResult -> String Source # showList :: [SafeResult] -> ShowS Source #

data OptimizeResult Source #

An `optimize` call results in a `OptimizeResult`. In the `ParetoResult` case, the boolean is `True` if we reached pareto-query limit and so there might be more unqueried results remaining. If `False`, it means that we have all the pareto fronts returned. See the `Pareto` `OptimizeStyle` for details.

Constructors

LexicographicResult SMTResult |
ParetoResult (Bool, [SMTResult]) |
IndependentResult [(String, SMTResult)] |

#### Instances

Instances details

Show OptimizeResult Source # |
Instance details Defined in Data.SBV.SMT.SMT Methods showsPrec :: Int -> OptimizeResult -> ShowS Source # show :: OptimizeResult -> String Source # showList :: [OptimizeResult] -> ShowS Source #

data SMTResult Source #

The result of an SMT solver call. Each constructor is tagged with the `SMTConfig` that created it so that further tools can inspect it and build layers of results, if needed. For ordinary uses of the library, this type should not be needed, instead use the accessor functions on it. (Custom Show instances and model extractors.)

Constructors

Unsatisfiable SMTConfig (Maybe [String]) | Unsatisfiable. If unsat-cores are enabled, they will be returned in the second parameter.
Satisfiable SMTConfig SMTModel | Satisfiable with model
DeltaSat SMTConfig (Maybe String) SMTModel | Delta satisfiable with queried string if available and model
SatExtField SMTConfig SMTModel | Prover returned a model, but in an extension field containing Infinite/epsilon
Unknown SMTConfig SMTReasonUnknown | Prover returned unknown, with the given reason
ProofError SMTConfig [String] (Maybe SMTResult) | Prover errored out, with possibly a bogus result

#### Instances

Instances details

NFData SMTResult Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SMTResult -> () Source #
Modelable SMTResult Source # | `SMTResult` as a generic model provider

Instance details

Defined in Data.SBV.SMT.SMT

Methods

modelExists :: SMTResult -> Bool Source #

getModelAssignment :: SatModel b => SMTResult -> Either String (Bool, b) Source #

getModelDictionary :: SMTResult -> Map String CV Source #

getModelValue :: SymVal b => String -> SMTResult -> Maybe b Source #

getModelUninterpretedValue :: String -> SMTResult -> Maybe String Source #

extractModel :: SatModel b => SMTResult -> Maybe b Source #

getModelObjectives :: SMTResult -> Map String GeneralizedCV Source #

getModelObjectiveValue :: String -> SMTResult -> Maybe GeneralizedCV Source #

getModelUIFuns :: SMTResult -> Map String (SBVType, Either String ([([CV], CV)], CV)) Source #

getModelUIFunValue :: String -> SMTResult -> Maybe (SBVType, Either String ([([CV], CV)], CV)) Source #

data SMTReasonUnknown Source #

Reason for reporting unknown.

Constructors

UnknownMemOut |
UnknownIncomplete |
UnknownTimeOut |
UnknownOther String |

#### Instances

Instances details

Show SMTReasonUnknown Source # | Show instance for unknown
Instance details Defined in Data.SBV.Control.Types Methods showsPrec :: Int -> SMTReasonUnknown -> ShowS Source # show :: SMTReasonUnknown -> String Source # showList :: [SMTReasonUnknown] -> ShowS Source #
NFData SMTReasonUnknown Source # | Trivial rnf instance
Instance details Defined in Data.SBV.Control.Types Methods rnf :: SMTReasonUnknown -> () Source #

## Observing expressions

observe :: SymVal a => String -> SBV a -> SBV a Source #

Observe the value of an expression, unconditionally. See `observeIf` for a generalized version.

## Programmable model extraction

class SatModel a where Source #

Instances of `SatModel` can be automatically extracted from models returned by the solvers. The idea is that the sbv infrastructure provides a stream of CV's (constant values) coming from the solver, and the type `a` is interpreted based on these constants. Many typical instances are already provided, so new instances can be declared with relative ease.

Minimum complete definition: `parseCVs`

Minimal complete definition

Nothing

Methods

parseCVs :: [CV] -> Maybe (a, [CV]) Source #

Given a sequence of constant-words, extract one instance of the type `a`, returning the remaining elements untouched. If the next element is not what's expected for this type you should return `Nothing`

default parseCVs :: Read a => [CV] -> Maybe (a, [CV]) Source #

cvtModel :: (a -> Maybe b) -> Maybe (a, [CV]) -> Maybe (b, [CV]) Source #

Given a parsed model instance, transform it using `f`, and return the result. The default definition for this method should be sufficient in most use cases.

#### Instances

Instances details

SatModel Int16 Source # | `Int16` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Int16, [CV]) Source # cvtModel :: (Int16 -> Maybe b) -> Maybe (Int16, [CV]) -> Maybe (b, [CV]) Source #
SatModel Int32 Source # | `Int32` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Int32, [CV]) Source # cvtModel :: (Int32 -> Maybe b) -> Maybe (Int32, [CV]) -> Maybe (b, [CV]) Source #
SatModel Int64 Source # | `Int64` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Int64, [CV]) Source # cvtModel :: (Int64 -> Maybe b) -> Maybe (Int64, [CV]) -> Maybe (b, [CV]) Source #
SatModel Int8 Source # | `Int8` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Int8, [CV]) Source # cvtModel :: (Int8 -> Maybe b) -> Maybe (Int8, [CV]) -> Maybe (b, [CV]) Source #
SatModel Word16 Source # | `Word16` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Word16, [CV]) Source # cvtModel :: (Word16 -> Maybe b) -> Maybe (Word16, [CV]) -> Maybe (b, [CV]) Source #
SatModel Word32 Source # | `Word32` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Word32, [CV]) Source # cvtModel :: (Word32 -> Maybe b) -> Maybe (Word32, [CV]) -> Maybe (b, [CV]) Source #
SatModel Word64 Source # | `Word64` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Word64, [CV]) Source # cvtModel :: (Word64 -> Maybe b) -> Maybe (Word64, [CV]) -> Maybe (b, [CV]) Source #
SatModel Word8 Source # | `Word8` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Word8, [CV]) Source # cvtModel :: (Word8 -> Maybe b) -> Maybe (Word8, [CV]) -> Maybe (b, [CV]) Source #
SatModel AlgReal Source # | `AlgReal` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (AlgReal, [CV]) Source # cvtModel :: (AlgReal -> Maybe b) -> Maybe (AlgReal, [CV]) -> Maybe (b, [CV]) Source #
SatModel CV Source # | `CV` as extracted from a model; trivial definition
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (CV, [CV]) Source # cvtModel :: (CV -> Maybe b) -> Maybe (CV, [CV]) -> Maybe (b, [CV]) Source #
SatModel RoundingMode Source # | A rounding mode, extracted from a model. (Default definition suffices)
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (RoundingMode, [CV]) Source # cvtModel :: (RoundingMode -> Maybe b) -> Maybe (RoundingMode, [CV]) -> Maybe (b, [CV]) Source #
SatModel State Source # |
Instance details Defined in Documentation.SBV.Examples.Lists.BoundedMutex Methods parseCVs :: [CV] -> Maybe (State, [CV]) Source # cvtModel :: (State -> Maybe b) -> Maybe (State, [CV]) -> Maybe (b, [CV]) Source #
SatModel E Source # |
Instance details Defined in Documentation.SBV.Examples.Misc.Enumerate Methods parseCVs :: [CV] -> Maybe (E, [CV]) Source # cvtModel :: (E -> Maybe b) -> Maybe (E, [CV]) -> Maybe (b, [CV]) Source #
SatModel E Source # |
Instance details Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic Methods parseCVs :: [CV] -> Maybe (E, [CV]) Source # cvtModel :: (E -> Maybe b) -> Maybe (E, [CV]) -> Maybe (b, [CV]) Source #
SatModel U Source # |
Instance details Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic Methods parseCVs :: [CV] -> Maybe (U, [CV]) Source # cvtModel :: (U -> Maybe b) -> Maybe (U, [CV]) -> Maybe (b, [CV]) Source #
SatModel V Source # |
Instance details Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic Methods parseCVs :: [CV] -> Maybe (V, [CV]) Source # cvtModel :: (V -> Maybe b) -> Maybe (V, [CV]) -> Maybe (b, [CV]) Source #
SatModel Day Source # |
Instance details Defined in Documentation.SBV.Examples.Optimization.Enumerate Methods parseCVs :: [CV] -> Maybe (Day, [CV]) Source # cvtModel :: (Day -> Maybe b) -> Maybe (Day, [CV]) -> Maybe (b, [CV]) Source #
SatModel Day Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Birthday Methods parseCVs :: [CV] -> Maybe (Day, [CV]) Source # cvtModel :: (Day -> Maybe b) -> Maybe (Day, [CV]) -> Maybe (b, [CV]) Source #
SatModel Month Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Birthday Methods parseCVs :: [CV] -> Maybe (Month, [CV]) Source # cvtModel :: (Month -> Maybe b) -> Maybe (Month, [CV]) -> Maybe (b, [CV]) Source #
SatModel P Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Drinker Methods parseCVs :: [CV] -> Maybe (P, [CV]) Source # cvtModel :: (P -> Maybe b) -> Maybe (P, [CV]) -> Maybe (b, [CV]) Source #
SatModel Beverage Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Fish Methods parseCVs :: [CV] -> Maybe (Beverage, [CV]) Source # cvtModel :: (Beverage -> Maybe b) -> Maybe (Beverage, [CV]) -> Maybe (b, [CV]) Source #
SatModel Color Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Fish Methods parseCVs :: [CV] -> Maybe (Color, [CV]) Source # cvtModel :: (Color -> Maybe b) -> Maybe (Color, [CV]) -> Maybe (b, [CV]) Source #
SatModel Nationality Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Fish Methods parseCVs :: [CV] -> Maybe (Nationality, [CV]) Source # cvtModel :: (Nationality -> Maybe b) -> Maybe (Nationality, [CV]) -> Maybe (b, [CV]) Source #
SatModel Pet Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Fish Methods parseCVs :: [CV] -> Maybe (Pet, [CV]) Source # cvtModel :: (Pet -> Maybe b) -> Maybe (Pet, [CV]) -> Maybe (b, [CV]) Source #
SatModel Sport Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Fish Methods parseCVs :: [CV] -> Maybe (Sport, [CV]) Source # cvtModel :: (Sport -> Maybe b) -> Maybe (Sport, [CV]) -> Maybe (b, [CV]) Source #
SatModel Color Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Garden Methods parseCVs :: [CV] -> Maybe (Color, [CV]) Source # cvtModel :: (Color -> Maybe b) -> Maybe (Color, [CV]) -> Maybe (b, [CV]) Source #
SatModel Color Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.HexPuzzle Methods parseCVs :: [CV] -> Maybe (Color, [CV]) Source # cvtModel :: (Color -> Maybe b) -> Maybe (Color, [CV]) -> Maybe (b, [CV]) Source #
SatModel Identity Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves Methods parseCVs :: [CV] -> Maybe (Identity, [CV]) Source # cvtModel :: (Identity -> Maybe b) -> Maybe (Identity, [CV]) -> Maybe (b, [CV]) Source #
SatModel Inhabitant Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves Methods parseCVs :: [CV] -> Maybe (Inhabitant, [CV]) Source # cvtModel :: (Inhabitant -> Maybe b) -> Maybe (Inhabitant, [CV]) -> Maybe (b, [CV]) Source #
SatModel Statement Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves Methods parseCVs :: [CV] -> Maybe (Statement, [CV]) Source # cvtModel :: (Statement -> Maybe b) -> Maybe (Statement, [CV]) -> Maybe (b, [CV]) Source #
SatModel Location Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Murder Methods parseCVs :: [CV] -> Maybe (Location, [CV]) Source # cvtModel :: (Location -> Maybe b) -> Maybe (Location, [CV]) -> Maybe (b, [CV]) Source #
SatModel Role Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Murder Methods parseCVs :: [CV] -> Maybe (Role, [CV]) Source # cvtModel :: (Role -> Maybe b) -> Maybe (Role, [CV]) -> Maybe (b, [CV]) Source #
SatModel Sex Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Murder Methods parseCVs :: [CV] -> Maybe (Sex, [CV]) Source # cvtModel :: (Sex -> Maybe b) -> Maybe (Sex, [CV]) -> Maybe (b, [CV]) Source #
SatModel Handler Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Orangutans Methods parseCVs :: [CV] -> Maybe (Handler, [CV]) Source # cvtModel :: (Handler -> Maybe b) -> Maybe (Handler, [CV]) -> Maybe (b, [CV]) Source #
SatModel Location Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Orangutans Methods parseCVs :: [CV] -> Maybe (Location, [CV]) Source # cvtModel :: (Location -> Maybe b) -> Maybe (Location, [CV]) -> Maybe (b, [CV]) Source #
SatModel Orangutan Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Orangutans Methods parseCVs :: [CV] -> Maybe (Orangutan, [CV]) Source # cvtModel :: (Orangutan -> Maybe b) -> Maybe (Orangutan, [CV]) -> Maybe (b, [CV]) Source #
SatModel Rabbit Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.Rabbits Methods parseCVs :: [CV] -> Maybe (Rabbit, [CV]) Source # cvtModel :: (Rabbit -> Maybe b) -> Maybe (Rabbit, [CV]) -> Maybe (b, [CV]) Source #
SatModel Location Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.U2Bridge Methods parseCVs :: [CV] -> Maybe (Location, [CV]) Source # cvtModel :: (Location -> Maybe b) -> Maybe (Location, [CV]) -> Maybe (b, [CV]) Source #
SatModel U2Member Source # |
Instance details Defined in Documentation.SBV.Examples.Puzzles.U2Bridge Methods parseCVs :: [CV] -> Maybe (U2Member, [CV]) Source # cvtModel :: (U2Member -> Maybe b) -> Maybe (U2Member, [CV]) -> Maybe (b, [CV]) Source #
SatModel Day Source # |
Instance details Defined in Documentation.SBV.Examples.Queries.Enums Methods parseCVs :: [CV] -> Maybe (Day, [CV]) Source # cvtModel :: (Day -> Maybe b) -> Maybe (Day, [CV]) -> Maybe (b, [CV]) Source #
SatModel BinOp Source # |
Instance details Defined in Documentation.SBV.Examples.Queries.FourFours Methods parseCVs :: [CV] -> Maybe (BinOp, [CV]) Source # cvtModel :: (BinOp -> Maybe b) -> Maybe (BinOp, [CV]) -> Maybe (b, [CV]) Source #
SatModel UnOp Source # |
Instance details Defined in Documentation.SBV.Examples.Queries.FourFours Methods parseCVs :: [CV] -> Maybe (UnOp, [CV]) Source # cvtModel :: (UnOp -> Maybe b) -> Maybe (UnOp, [CV]) -> Maybe (b, [CV]) Source #
SatModel B Source # |
Instance details Defined in Documentation.SBV.Examples.Uninterpreted.Deduce Methods parseCVs :: [CV] -> Maybe (B, [CV]) Source # cvtModel :: (B -> Maybe b) -> Maybe (B, [CV]) -> Maybe (b, [CV]) Source #
SatModel Q Source # |
Instance details Defined in Documentation.SBV.Examples.Uninterpreted.Sort Methods parseCVs :: [CV] -> Maybe (Q, [CV]) Source # cvtModel :: (Q -> Maybe b) -> Maybe (Q, [CV]) -> Maybe (b, [CV]) Source #
SatModel L Source # |
Instance details Defined in Documentation.SBV.Examples.Uninterpreted.UISortAllSat Methods parseCVs :: [CV] -> Maybe (L, [CV]) Source # cvtModel :: (L -> Maybe b) -> Maybe (L, [CV]) -> Maybe (b, [CV]) Source #
SatModel Integer Source # | `Integer` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Integer, [CV]) Source # cvtModel :: (Integer -> Maybe b) -> Maybe (Integer, [CV]) -> Maybe (b, [CV]) Source #
SatModel () Source # | Base case for `SatModel` at unit type. Comes in handy if there are no real variables.
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe ((), [CV]) Source # cvtModel :: (() -> Maybe b) -> Maybe ((), [CV]) -> Maybe (b, [CV]) Source #
SatModel Bool Source # | `Bool` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Bool, [CV]) Source # cvtModel :: (Bool -> Maybe b) -> Maybe (Bool, [CV]) -> Maybe (b, [CV]) Source #
SatModel Char Source # | `Char` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Char, [CV]) Source # cvtModel :: (Char -> Maybe b) -> Maybe (Char, [CV]) -> Maybe (b, [CV]) Source #
SatModel Double Source # | `Double` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Double, [CV]) Source # cvtModel :: (Double -> Maybe b) -> Maybe (Double, [CV]) -> Maybe (b, [CV]) Source #
SatModel Float Source # | `Float` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (Float, [CV]) Source # cvtModel :: (Float -> Maybe b) -> Maybe (Float, [CV]) -> Maybe (b, [CV]) Source #
(KnownNat n, BVIsNonZero n) => SatModel (IntN n) Source # | Constructing models for `IntN`
Instance details Defined in Data.SBV.Core.Sized Methods parseCVs :: [CV] -> Maybe (IntN n, [CV]) Source # cvtModel :: (IntN n -> Maybe b) -> Maybe (IntN n, [CV]) -> Maybe (b, [CV]) Source #
(KnownNat n, BVIsNonZero n) => SatModel (WordN n) Source # | Constructing models for `WordN`
Instance details Defined in Data.SBV.Core.Sized Methods parseCVs :: [CV] -> Maybe (WordN n, [CV]) Source # cvtModel :: (WordN n -> Maybe b) -> Maybe (WordN n, [CV]) -> Maybe (b, [CV]) Source #
SatModel [Char] Source # | `String` as extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe ([Char], [CV]) Source # cvtModel :: ([Char] -> Maybe b) -> Maybe ([Char], [CV]) -> Maybe (b, [CV]) Source #
SatModel a => SatModel [a] Source # | A list of values as extracted from a model. When reading a list, we go as long as we can (maximal-munch). Note that this never fails, as we can always return the empty list!
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe ([a], [CV]) Source # cvtModel :: ([a] -> Maybe b) -> Maybe ([a], [CV]) -> Maybe (b, [CV]) Source #
(KnownNat eb, KnownNat sb) => SatModel (FloatingPoint eb sb) Source # | A general floating-point extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe (FloatingPoint eb sb, [CV]) Source # cvtModel :: (FloatingPoint eb sb -> Maybe b) -> Maybe (FloatingPoint eb sb, [CV]) -> Maybe (b, [CV]) Source #
(SatModel a, SatModel b) => SatModel (a, b) Source # | Tuples extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe ((a, b), [CV]) Source # cvtModel :: ((a, b) -> Maybe b0) -> Maybe ((a, b), [CV]) -> Maybe (b0, [CV]) Source #
(SatModel a, SatModel b, SatModel c) => SatModel (a, b, c) Source # | 3-Tuples extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe ((a, b, c), [CV]) Source # cvtModel :: ((a, b, c) -> Maybe b0) -> Maybe ((a, b, c), [CV]) -> Maybe (b0, [CV]) Source #
(SatModel a, SatModel b, SatModel c, SatModel d) => SatModel (a, b, c, d) Source # | 4-Tuples extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe ((a, b, c, d), [CV]) Source # cvtModel :: ((a, b, c, d) -> Maybe b0) -> Maybe ((a, b, c, d), [CV]) -> Maybe (b0, [CV]) Source #
(SatModel a, SatModel b, SatModel c, SatModel d, SatModel e) => SatModel (a, b, c, d, e) Source # | 5-Tuples extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe ((a, b, c, d, e), [CV]) Source # cvtModel :: ((a, b, c, d, e) -> Maybe b0) -> Maybe ((a, b, c, d, e), [CV]) -> Maybe (b0, [CV]) Source #
(SatModel a, SatModel b, SatModel c, SatModel d, SatModel e, SatModel f) => SatModel (a, b, c, d, e, f) Source # | 6-Tuples extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe ((a, b, c, d, e, f), [CV]) Source # cvtModel :: ((a, b, c, d, e, f) -> Maybe b0) -> Maybe ((a, b, c, d, e, f), [CV]) -> Maybe (b0, [CV]) Source #
(SatModel a, SatModel b, SatModel c, SatModel d, SatModel e, SatModel f, SatModel g) => SatModel (a, b, c, d, e, f, g) Source # | 7-Tuples extracted from a model
Instance details Defined in Data.SBV.SMT.SMT Methods parseCVs :: [CV] -> Maybe ((a, b, c, d, e, f, g), [CV]) Source # cvtModel :: ((a, b, c, d, e, f, g) -> Maybe b0) -> Maybe ((a, b, c, d, e, f, g), [CV]) -> Maybe (b0, [CV]) Source #

class Modelable a where Source #

Various SMT results that we can extract models out of.

Minimal complete definition

modelExists, getModelAssignment, getModelDictionary, getModelObjectives, getModelUIFuns

Methods

modelExists :: a -> Bool Source #

Is there a model?

getModelAssignment :: SatModel b => a -> Either String (Bool, b) Source #

Extract assignments of a model, the result is a tuple where the first argument (if True) indicates whether the model was "probable". (i.e., if the solver returned unknown.)

getModelDictionary :: a -> Map String CV Source #

Extract a model dictionary. Extract a dictionary mapping the variables to their respective values as returned by the SMT solver. Also see `getModelDictionaries`.

getModelValue :: SymVal b => String -> a -> Maybe b Source #

Extract a model value for a given element. Also see `getModelValues`.

getModelUninterpretedValue :: String -> a -> Maybe String Source #

Extract a representative name for the model value of an uninterpreted kind. This is supposed to correspond to the value as computed internally by the SMT solver; and is unportable from solver to solver. Also see `getModelUninterpretedValues`.

extractModel :: SatModel b => a -> Maybe b Source #

A simpler variant of `getModelAssignment` to get a model out without the fuss.

getModelObjectives :: a -> Map String GeneralizedCV Source #

Extract model objective values, for all optimization goals.

getModelObjectiveValue :: String -> a -> Maybe GeneralizedCV Source #

Extract the value of an objective

getModelUIFuns :: a -> Map String (SBVType, Either String ([([CV], CV)], CV)) Source #

Extract model uninterpreted-functions

getModelUIFunValue :: String -> a -> Maybe (SBVType, Either String ([([CV], CV)], CV)) Source #

Extract the value of an uninterpreted-function as an association list

#### Instances

Instances details

Modelable SMTResult Source # | `SMTResult` as a generic model provider

Instance details

Defined in Data.SBV.SMT.SMT

Methods

modelExists :: SMTResult -> Bool Source #

getModelAssignment :: SatModel b => SMTResult -> Either String (Bool, b) Source #

getModelDictionary :: SMTResult -> Map String CV Source #

getModelValue :: SymVal b => String -> SMTResult -> Maybe b Source #

getModelUninterpretedValue :: String -> SMTResult -> Maybe String Source #

extractModel :: SatModel b => SMTResult -> Maybe b Source #

getModelObjectives :: SMTResult -> Map String GeneralizedCV Source #

getModelObjectiveValue :: String -> SMTResult -> Maybe GeneralizedCV Source #

getModelUIFuns :: SMTResult -> Map String (SBVType, Either String ([([CV], CV)], CV)) Source #

getModelUIFunValue :: String -> SMTResult -> Maybe (SBVType, Either String ([([CV], CV)], CV)) Source #

Modelable SatResult Source # | `SatResult` as a generic model provider

Instance details

Defined in Data.SBV.SMT.SMT

Methods

modelExists :: SatResult -> Bool Source #

getModelAssignment :: SatModel b => SatResult -> Either String (Bool, b) Source #

getModelDictionary :: SatResult -> Map String CV Source #

getModelValue :: SymVal b => String -> SatResult -> Maybe b Source #

getModelUninterpretedValue :: String -> SatResult -> Maybe String Source #

extractModel :: SatModel b => SatResult -> Maybe b Source #

getModelObjectives :: SatResult -> Map String GeneralizedCV Source #

getModelObjectiveValue :: String -> SatResult -> Maybe GeneralizedCV Source #

getModelUIFuns :: SatResult -> Map String (SBVType, Either String ([([CV], CV)], CV)) Source #

getModelUIFunValue :: String -> SatResult -> Maybe (SBVType, Either String ([([CV], CV)], CV)) Source #

Modelable ThmResult Source # | `ThmResult` as a generic model provider

Instance details

Defined in Data.SBV.SMT.SMT

Methods

modelExists :: ThmResult -> Bool Source #

getModelAssignment :: SatModel b => ThmResult -> Either String (Bool, b) Source #

getModelDictionary :: ThmResult -> Map String CV Source #

getModelValue :: SymVal b => String -> ThmResult -> Maybe b Source #

getModelUninterpretedValue :: String -> ThmResult -> Maybe String Source #

extractModel :: SatModel b => ThmResult -> Maybe b Source #

getModelObjectives :: ThmResult -> Map String GeneralizedCV Source #

getModelObjectiveValue :: String -> ThmResult -> Maybe GeneralizedCV Source #

getModelUIFuns :: ThmResult -> Map String (SBVType, Either String ([([CV], CV)], CV)) Source #

getModelUIFunValue :: String -> ThmResult -> Maybe (SBVType, Either String ([([CV], CV)], CV)) Source #

displayModels :: SatModel a => ([(Bool, a)] -> [(Bool, a)]) -> (Int -> (Bool, a) -> IO ()) -> AllSatResult -> IO Int Source #

Given an `allSat` call, we typically want to iterate over it and print the results in sequence. The `displayModels` function automates this task by calling `disp` on each result, consecutively. The first `Int` argument to `disp` 'is the current model number. The second argument is a tuple, where the first element indicates whether the model is alleged (i.e., if the solver is not sure, returning Unknown). The arrange argument can sort the results in any way you like, if necessary.

extractModels :: SatModel a => AllSatResult -> [a] Source #

Return all the models from an `allSat` call, similar to `extractModel` but is suitable for the case of multiple results.

getModelDictionaries :: AllSatResult -> [Map String CV] Source #

Get dictionaries from an all-sat call. Similar to `getModelDictionary`.

getModelValues :: SymVal b => String -> AllSatResult -> [Maybe b] Source #

Extract value of a variable from an all-sat call. Similar to `getModelValue`.

getModelUninterpretedValues :: String -> AllSatResult -> [Maybe String] Source #

Extract value of an uninterpreted variable from an all-sat call. Similar to `getModelUninterpretedValue`.

# SMT Interface

data SMTConfig Source #

Solver configuration. See also `z3`, `yices`, `cvc4`, `boolector`, `mathSAT`, etc. which are instantiations of this type for those solvers, with reasonable defaults. In particular, custom configuration can be created by varying those values. (Such as `z3{verbose=True}`.)

Most fields are self explanatory. The notion of precision for printing algebraic reals stems from the fact that such values does not necessarily have finite decimal representations, and hence we have to stop printing at some depth. It is important to emphasize that such values always have infinite precision internally. The issue is merely with how we print such an infinite precision value on the screen. The field `printRealPrec` controls the printing precision, by specifying the number of digits after the decimal point. The default value is 16, but it can be set to any positive integer.

When printing, SBV will add the suffix `...` at the end of a real-value, if the given bound is not sufficient to represent the real-value exactly. Otherwise, the number will be written out in standard decimal notation. Note that SBV will always print the whole value if it is precise (i.e., if it fits in a finite number of digits), regardless of the precision limit. The limit only applies if the representation of the real value is not finite, i.e., if it is not rational.

The `printBase` field can be used to print numbers in base 2, 10, or 16.

The `crackNum` field can be used to display numbers in detail, all its bits and how they are laid out in memory. Works with all bounded number types (i.e., SWord and SInt), but also with floats. It is particularly useful with floating-point numbers, as it shows you how they are laid out in memory following the IEEE754 rules.

Constructors

SMTConfig |

Fields

- verbose :: Bool

  Debug mode

- timing :: Timing

  Print timing information on how long different phases took (construction, solving, etc.)

- printBase :: Int

  Print integral literals in this base (2, 10, and 16 are supported.)

- printRealPrec :: Int

  Print algebraic real values with this precision. (SReal, default: 16)

- crackNum :: Bool

  For each numeric value, show it in detail in the model with its bits spliced out. Good for floats.

- satCmd :: String

  Usually "(check-sat)". However, users might tweak it based on solver characteristics.

- allSatMaxModelCount :: Maybe Int

  In a `allSat` call, return at most this many models. If nothing, return all.

- allSatPrintAlong :: Bool

  In a `allSat` call, print models as they are found.

- allSatTrackUFs :: Bool

  In a `allSat` call, should we try to extract values of uninterpreted functions?

- isNonModelVar :: String -> Bool

  When constructing a model, ignore variables whose name satisfy this predicate. (Default: (const False), i.e., don't ignore anything)

- validateModel :: Bool

  If set, SBV will attempt to validate the model it gets back from the solver.

- optimizeValidateConstraints :: Bool

  Validate optimization results. NB: Does NOT make sure the model is optimal, just checks they satisfy the constraints.

- transcript :: Maybe FilePath

  If Just, the entire interaction will be recorded as a playable file (for debugging purposes mostly)

- smtLibVersion :: SMTLibVersion

  What version of SMT-lib we use for the tool

- dsatPrecision :: Maybe Double

  Delta-sat precision

- solver :: SMTSolver

  The actual SMT solver.

- extraArgs :: [String]

  Extra command line arguments to pass to the solver.

- roundingMode :: RoundingMode

  Rounding mode to use for floating-point conversions

- solverSetOptions :: [SMTOption]

  Options to set as we start the solver

- ignoreExitCode :: Bool

  If true, we shall ignore the exit code upon exit. Otherwise we require ExitSuccess.

- redirectVerbose :: Maybe FilePath

  Redirect the verbose output to this file if given. If Nothing, stdout is implied.

#### Instances

Instances details

Show SMTConfig Source # | We show the name of the solver for the config. Arguably this is misleading, but better than nothing.
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SMTConfig -> ShowS Source # show :: SMTConfig -> String Source # showList :: [SMTConfig] -> ShowS Source #
NFData SMTConfig Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SMTConfig -> () Source #

data Timing Source #

Specify how to save timing information, if at all.

Constructors

NoTiming |
PrintTiming |
SaveTiming (IORef NominalDiffTime) |

data SMTLibVersion Source #

Representation of SMTLib Program versions. As of June 2015, we're dropping support for SMTLib1, and supporting SMTLib2 only. We keep this data-type around in case SMTLib3 comes along and we want to support 2 and 3 simultaneously.

Constructors

SMTLib2 |

#### Instances

Instances details

Bounded SMTLibVersion Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods minBound :: SMTLibVersion Source # maxBound :: SMTLibVersion Source #
Enum SMTLibVersion Source # |

Instance details

Defined in Data.SBV.Core.Symbolic

Methods

succ :: SMTLibVersion -> SMTLibVersion Source #

pred :: SMTLibVersion -> SMTLibVersion Source #

toEnum :: Int -> SMTLibVersion Source #

fromEnum :: SMTLibVersion -> Int Source #

enumFrom :: SMTLibVersion -> [SMTLibVersion] Source #

enumFromThen :: SMTLibVersion -> SMTLibVersion -> [SMTLibVersion] Source #

enumFromTo :: SMTLibVersion -> SMTLibVersion -> [SMTLibVersion] Source #

enumFromThenTo :: SMTLibVersion -> SMTLibVersion -> SMTLibVersion -> [SMTLibVersion] Source #

Show SMTLibVersion Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SMTLibVersion -> ShowS Source # show :: SMTLibVersion -> String Source # showList :: [SMTLibVersion] -> ShowS Source #
NFData SMTLibVersion Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SMTLibVersion -> () Source #
Eq SMTLibVersion Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: SMTLibVersion -> SMTLibVersion -> Bool Source # (/=) :: SMTLibVersion -> SMTLibVersion -> Bool Source #

data Solver Source #

Solvers that SBV is aware of

Constructors

ABC |
Boolector |
Bitwuzla |
CVC4 |
CVC5 |
DReal |
MathSAT |
Yices |
Z3 |

#### Instances

Instances details

Bounded Solver Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods minBound :: Solver Source # maxBound :: Solver Source #
Enum Solver Source # |

Instance details

Defined in Data.SBV.Core.Symbolic

Methods

succ :: Solver -> Solver Source #

pred :: Solver -> Solver Source #

toEnum :: Int -> Solver Source #

fromEnum :: Solver -> Int Source #

enumFrom :: Solver -> [Solver] Source #

enumFromThen :: Solver -> Solver -> [Solver] Source #

enumFromTo :: Solver -> Solver -> [Solver] Source #

enumFromThenTo :: Solver -> Solver -> Solver -> [Solver] Source #

Show Solver Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> Solver -> ShowS Source # show :: Solver -> String Source # showList :: [Solver] -> ShowS Source #

data SMTSolver Source #

An SMT solver

Constructors

SMTSolver |

Fields

- name :: Solver

  The solver in use

- executable :: String

  The path to its executable

- preprocess :: String -> String

  Each line sent to the solver will be passed through this function (typically id)

- options :: SMTConfig -> [String]

  Options to provide to the solver

- engine :: SMTEngine

  The solver engine, responsible for interpreting solver output

- capabilities :: SolverCapabilities

  Various capabilities of the solver

## Controlling verbosity

## Solvers

boolector :: SMTConfig Source #

Default configuration for the Boolector SMT solver

bitwuzla :: SMTConfig Source #

Default configuration for the Bitwuzla SMT solver

cvc4 :: SMTConfig Source #

Default configuration for the CVC4 SMT Solver.

cvc5 :: SMTConfig Source #

Default configuration for the CVC5 SMT Solver.

dReal :: SMTConfig Source #

Default configuration for the Yices SMT Solver.

yices :: SMTConfig Source #

Default configuration for the Yices SMT Solver.

z3 :: SMTConfig Source #

Default configuration for the Z3 SMT solver

mathSAT :: SMTConfig Source #

Default configuration for the MathSAT SMT solver

abc :: SMTConfig Source #

Default configuration for the ABC synthesis and verification tool.

## Configurations

defaultSolverConfig :: Solver -> SMTConfig Source #

The default configs corresponding to supported SMT solvers

defaultSMTCfg :: SMTConfig Source #

The default solver used by SBV. This is currently set to z3.

sbvCheckSolverInstallation :: SMTConfig -> IO Bool Source #

Check whether the given solver is installed and is ready to go. This call does a simple call to the solver to ensure all is well.

getAvailableSolvers :: IO [SMTConfig] Source #

Return the known available solver configs, installed on your machine.

setLogic :: SolverContext m => Logic -> m () Source #

Set the logic.

data Logic Source #

SMT-Lib logics. If left unspecified SBV will pick the logic based on what it determines is needed. However, the user can override this choice using a call to `setLogic` This is especially handy if one is experimenting with custom logics that might be supported on new solvers. See http://smtlib.cs.uiowa.edu/logics.shtml for the official list.

Constructors

AUFLIA | Formulas over the theory of linear integer arithmetic and arrays extended with free sort and function symbols but restricted to arrays with integer indices and values.
AUFLIRA | Linear formulas with free sort and function symbols over one- and two-dimentional arrays of integer index and real value.
AUFNIRA | Formulas with free function and predicate symbols over a theory of arrays of arrays of integer index and real value.
LRA | Linear formulas in linear real arithmetic.
QF_ABV | Quantifier-free formulas over the theory of bitvectors and bitvector arrays.
QF_AUFBV | Quantifier-free formulas over the theory of bitvectors and bitvector arrays extended with free sort and function symbols.
QF_AUFLIA | Quantifier-free linear formulas over the theory of integer arrays extended with free sort and function symbols.
QF_AX | Quantifier-free formulas over the theory of arrays with extensionality.
QF_BV | Quantifier-free formulas over the theory of fixed-size bitvectors.
QF_IDL | Difference Logic over the integers. Boolean combinations of inequations of the form x - y < b where x and y are integer variables and b is an integer constant.
QF_LIA | Unquantified linear integer arithmetic. In essence, Boolean combinations of inequations between linear polynomials over integer variables.
QF_LRA | Unquantified linear real arithmetic. In essence, Boolean combinations of inequations between linear polynomials over real variables.
QF_NIA | Quantifier-free integer arithmetic.
QF_NRA | Quantifier-free real arithmetic.
QF_RDL | Difference Logic over the reals. In essence, Boolean combinations of inequations of the form x - y < b where x and y are real variables and b is a rational constant.
QF_UF | Unquantified formulas built over a signature of uninterpreted (i.e., free) sort and function symbols.
QF_UFBV | Unquantified formulas over bitvectors with uninterpreted sort function and symbols.
QF_UFIDL | Difference Logic over the integers (in essence) but with uninterpreted sort and function symbols.
QF_UFLIA | Unquantified linear integer arithmetic with uninterpreted sort and function symbols.
QF_UFLRA | Unquantified linear real arithmetic with uninterpreted sort and function symbols.
QF_UFNRA | Unquantified non-linear real arithmetic with uninterpreted sort and function symbols.
QF_UFNIRA | Unquantified non-linear real integer arithmetic with uninterpreted sort and function symbols.
UFLRA | Linear real arithmetic with uninterpreted sort and function symbols.
UFNIA | Non-linear integer arithmetic with uninterpreted sort and function symbols.
QF_FPBV | Quantifier-free formulas over the theory of floating point numbers, arrays, and bit-vectors.
QF_FP | Quantifier-free formulas over the theory of floating point numbers.
QF_FD | Quantifier-free finite domains.
QF_S | Quantifier-free formulas over the theory of strings.
Logic_ALL | The catch-all value.
Logic_NONE | Use this value when you want SBV to simply not set the logic.
CustomLogic String | In case you need a really custom string!

#### Instances

Instances details

Show Logic Source # |
Instance details Defined in Data.SBV.Control.Types Methods showsPrec :: Int -> Logic -> ShowS Source # show :: Logic -> String Source # showList :: [Logic] -> ShowS Source #

setOption :: SolverContext m => SMTOption -> m () Source #

Set an option.

setInfo :: SolverContext m => String -> [String] -> m () Source #

Set info. Example: `setInfo ":status" ["unsat"]`.

setTimeOut :: SolverContext m => Integer -> m () Source #

Set a solver time-out value, in milli-seconds. This function essentially translates to the SMTLib call `(set-info :timeout val)`, and your backend solver may or may not support it! The amount given is in milliseconds. Also see the function `timeOut` for finer level control of time-outs, directly from SBV.

## SBV exceptions

data SBVException Source #

An exception thrown from SBV. If the solver ever responds with a non-success value for a command, SBV will throw an `SBVException`, it so the user can process it as required. The provided `Show` instance will render the failure nicely. Note that if you ever catch this exception, the solver is no longer alive: You should either -- throw the exception up, or do other proper clean-up before continuing.

Constructors

SBVException |

Fields

- sbvExceptionDescription :: String
- sbvExceptionSent :: Maybe String
- sbvExceptionExpected :: Maybe String
- sbvExceptionReceived :: Maybe String
- sbvExceptionStdOut :: Maybe String
- sbvExceptionStdErr :: Maybe String
- sbvExceptionExitCode :: Maybe ExitCode
- sbvExceptionConfig :: SMTConfig
- sbvExceptionReason :: Maybe [String]
- sbvExceptionHint :: Maybe [String]

#### Instances

Instances details

Exception SBVException Source # | SBVExceptions are throwable. A simple "show" will render this exception nicely though of course you can inspect the individual fields as necessary.
Instance details Defined in Data.SBV.SMT.Utils Methods toException :: SBVException -> SomeException Source # fromException :: SomeException -> Maybe SBVException Source # displayException :: SBVException -> String Source #
Show SBVException Source # | A fairly nice rendering of the exception, for display purposes.
Instance details Defined in Data.SBV.SMT.Utils Methods showsPrec :: Int -> SBVException -> ShowS Source # show :: SBVException -> String Source # showList :: [SBVException] -> ShowS Source #

# Abstract SBV type

data SBV a Source #

The Symbolic value. The parameter `a` is phantom, but is extremely important in keeping the user interface strongly typed.

#### Instances

Instances details

Testable SBool Source # |
Instance details Defined in Data.SBV.Core.Model Methods property :: SBool -> Property Source # propertyForAllShrinkShow :: Gen a -> (a -> [a]) -> (a -> [String]) -> (a -> SBool) -> Property Source #
IsString SString Source # |
Instance details Defined in Data.SBV.Core.Model Methods fromString :: String -> SString Source #
Floating SReal Source # | SReal Floating instance, used in conjunction with the dReal solver for delta-satisfiability. Note that we do not constant fold these values (except for pi), as Haskell doesn't really have any means of computing them for arbitrary rationals.

Instance details

Defined in Data.SBV.Core.Model

Methods

pi :: SReal Source #

exp :: SReal -> SReal Source #

log :: SReal -> SReal Source #

sqrt :: SReal -> SReal Source #

(**) :: SReal -> SReal -> SReal Source #

logBase :: SReal -> SReal -> SReal Source #

sin :: SReal -> SReal Source #

cos :: SReal -> SReal Source #

tan :: SReal -> SReal Source #

asin :: SReal -> SReal Source #

acos :: SReal -> SReal Source #

atan :: SReal -> SReal Source #

sinh :: SReal -> SReal Source #

cosh :: SReal -> SReal Source #

tanh :: SReal -> SReal Source #

asinh :: SReal -> SReal Source #

acosh :: SReal -> SReal Source #

atanh :: SReal -> SReal Source #

log1p :: SReal -> SReal Source #

expm1 :: SReal -> SReal Source #

log1pexp :: SReal -> SReal Source #

log1mexp :: SReal -> SReal Source #

QNot SBool Source # | Base case; pure symbolic boolean
Instance details Defined in Data.SBV.Core.Data Associated Types type NegatesTo SBool Source # Methods qNot :: SBool -> NegatesTo SBool Source #
QuantifiedBool SBool Source # | Base case of quantification, simple booleans
Instance details Defined in Data.SBV.Core.Data Methods quantifiedBool :: SBool -> SBool Source #
SDivisible SInt16 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInt16 -> SInt16 -> (SInt16, SInt16) Source # sDivMod :: SInt16 -> SInt16 -> (SInt16, SInt16) Source # sQuot :: SInt16 -> SInt16 -> SInt16 Source # sRem :: SInt16 -> SInt16 -> SInt16 Source # sDiv :: SInt16 -> SInt16 -> SInt16 Source # sMod :: SInt16 -> SInt16 -> SInt16 Source #
SDivisible SInt32 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInt32 -> SInt32 -> (SInt32, SInt32) Source # sDivMod :: SInt32 -> SInt32 -> (SInt32, SInt32) Source # sQuot :: SInt32 -> SInt32 -> SInt32 Source # sRem :: SInt32 -> SInt32 -> SInt32 Source # sDiv :: SInt32 -> SInt32 -> SInt32 Source # sMod :: SInt32 -> SInt32 -> SInt32 Source #
SDivisible SInt64 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInt64 -> SInt64 -> (SInt64, SInt64) Source # sDivMod :: SInt64 -> SInt64 -> (SInt64, SInt64) Source # sQuot :: SInt64 -> SInt64 -> SInt64 Source # sRem :: SInt64 -> SInt64 -> SInt64 Source # sDiv :: SInt64 -> SInt64 -> SInt64 Source # sMod :: SInt64 -> SInt64 -> SInt64 Source #
SDivisible SInt8 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInt8 -> SInt8 -> (SInt8, SInt8) Source # sDivMod :: SInt8 -> SInt8 -> (SInt8, SInt8) Source # sQuot :: SInt8 -> SInt8 -> SInt8 Source # sRem :: SInt8 -> SInt8 -> SInt8 Source # sDiv :: SInt8 -> SInt8 -> SInt8 Source # sMod :: SInt8 -> SInt8 -> SInt8 Source #
SDivisible SInteger Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SInteger -> SInteger -> (SInteger, SInteger) Source # sDivMod :: SInteger -> SInteger -> (SInteger, SInteger) Source # sQuot :: SInteger -> SInteger -> SInteger Source # sRem :: SInteger -> SInteger -> SInteger Source # sDiv :: SInteger -> SInteger -> SInteger Source # sMod :: SInteger -> SInteger -> SInteger Source #
SDivisible SWord16 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SWord16 -> SWord16 -> (SWord16, SWord16) Source # sDivMod :: SWord16 -> SWord16 -> (SWord16, SWord16) Source # sQuot :: SWord16 -> SWord16 -> SWord16 Source # sRem :: SWord16 -> SWord16 -> SWord16 Source # sDiv :: SWord16 -> SWord16 -> SWord16 Source # sMod :: SWord16 -> SWord16 -> SWord16 Source #
SDivisible SWord32 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SWord32 -> SWord32 -> (SWord32, SWord32) Source # sDivMod :: SWord32 -> SWord32 -> (SWord32, SWord32) Source # sQuot :: SWord32 -> SWord32 -> SWord32 Source # sRem :: SWord32 -> SWord32 -> SWord32 Source # sDiv :: SWord32 -> SWord32 -> SWord32 Source # sMod :: SWord32 -> SWord32 -> SWord32 Source #
SDivisible SWord64 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SWord64 -> SWord64 -> (SWord64, SWord64) Source # sDivMod :: SWord64 -> SWord64 -> (SWord64, SWord64) Source # sQuot :: SWord64 -> SWord64 -> SWord64 Source # sRem :: SWord64 -> SWord64 -> SWord64 Source # sDiv :: SWord64 -> SWord64 -> SWord64 Source # sMod :: SWord64 -> SWord64 -> SWord64 Source #
SDivisible SWord8 Source # |
Instance details Defined in Data.SBV.Core.Model Methods sQuotRem :: SWord8 -> SWord8 -> (SWord8, SWord8) Source # sDivMod :: SWord8 -> SWord8 -> (SWord8, SWord8) Source # sQuot :: SWord8 -> SWord8 -> SWord8 Source # sRem :: SWord8 -> SWord8 -> SWord8 Source # sDiv :: SWord8 -> SWord8 -> SWord8 Source # sMod :: SWord8 -> SWord8 -> SWord8 Source #
RegExpMatchable SChar Source # | Matching a character simply means the singleton string matches the regex.
Instance details Defined in Data.SBV.RegExp Methods match :: SChar -> RegExp -> SBool Source #
RegExpMatchable SString Source # | Matching symbolic strings.
Instance details Defined in Data.SBV.RegExp Methods match :: SString -> RegExp -> SBool Source #
ArithOverflow SInt16 Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SInt16 -> SInt16 -> (SBool, SBool) Source # bvSubO :: SInt16 -> SInt16 -> (SBool, SBool) Source # bvMulO :: SInt16 -> SInt16 -> (SBool, SBool) Source # bvMulOFast :: SInt16 -> SInt16 -> (SBool, SBool) Source # bvDivO :: SInt16 -> SInt16 -> (SBool, SBool) Source # bvNegO :: SInt16 -> (SBool, SBool) Source #
ArithOverflow SInt32 Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SInt32 -> SInt32 -> (SBool, SBool) Source # bvSubO :: SInt32 -> SInt32 -> (SBool, SBool) Source # bvMulO :: SInt32 -> SInt32 -> (SBool, SBool) Source # bvMulOFast :: SInt32 -> SInt32 -> (SBool, SBool) Source # bvDivO :: SInt32 -> SInt32 -> (SBool, SBool) Source # bvNegO :: SInt32 -> (SBool, SBool) Source #
ArithOverflow SInt64 Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SInt64 -> SInt64 -> (SBool, SBool) Source # bvSubO :: SInt64 -> SInt64 -> (SBool, SBool) Source # bvMulO :: SInt64 -> SInt64 -> (SBool, SBool) Source # bvMulOFast :: SInt64 -> SInt64 -> (SBool, SBool) Source # bvDivO :: SInt64 -> SInt64 -> (SBool, SBool) Source # bvNegO :: SInt64 -> (SBool, SBool) Source #
ArithOverflow SInt8 Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SInt8 -> SInt8 -> (SBool, SBool) Source # bvSubO :: SInt8 -> SInt8 -> (SBool, SBool) Source # bvMulO :: SInt8 -> SInt8 -> (SBool, SBool) Source # bvMulOFast :: SInt8 -> SInt8 -> (SBool, SBool) Source # bvDivO :: SInt8 -> SInt8 -> (SBool, SBool) Source # bvNegO :: SInt8 -> (SBool, SBool) Source #
ArithOverflow SWord16 Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SWord16 -> SWord16 -> (SBool, SBool) Source # bvSubO :: SWord16 -> SWord16 -> (SBool, SBool) Source # bvMulO :: SWord16 -> SWord16 -> (SBool, SBool) Source # bvMulOFast :: SWord16 -> SWord16 -> (SBool, SBool) Source # bvDivO :: SWord16 -> SWord16 -> (SBool, SBool) Source # bvNegO :: SWord16 -> (SBool, SBool) Source #
ArithOverflow SWord32 Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SWord32 -> SWord32 -> (SBool, SBool) Source # bvSubO :: SWord32 -> SWord32 -> (SBool, SBool) Source # bvMulO :: SWord32 -> SWord32 -> (SBool, SBool) Source # bvMulOFast :: SWord32 -> SWord32 -> (SBool, SBool) Source # bvDivO :: SWord32 -> SWord32 -> (SBool, SBool) Source # bvNegO :: SWord32 -> (SBool, SBool) Source #
ArithOverflow SWord64 Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SWord64 -> SWord64 -> (SBool, SBool) Source # bvSubO :: SWord64 -> SWord64 -> (SBool, SBool) Source # bvMulO :: SWord64 -> SWord64 -> (SBool, SBool) Source # bvMulOFast :: SWord64 -> SWord64 -> (SBool, SBool) Source # bvDivO :: SWord64 -> SWord64 -> (SBool, SBool) Source # bvNegO :: SWord64 -> (SBool, SBool) Source #
ArithOverflow SWord8 Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SWord8 -> SWord8 -> (SBool, SBool) Source # bvSubO :: SWord8 -> SWord8 -> (SBool, SBool) Source # bvMulO :: SWord8 -> SWord8 -> (SBool, SBool) Source # bvMulOFast :: SWord8 -> SWord8 -> (SBool, SBool) Source # bvDivO :: SWord8 -> SWord8 -> (SBool, SBool) Source # bvNegO :: SWord8 -> (SBool, SBool) Source #
Polynomial SWord16 Source # |

Instance details

Defined in Data.SBV.Tools.Polynomial

Methods

polynomial :: [Int] -> SWord16 Source #

pAdd :: SWord16 -> SWord16 -> SWord16 Source #

pMult :: (SWord16, SWord16, [Int]) -> SWord16 Source #

pDiv :: SWord16 -> SWord16 -> SWord16 Source #

pMod :: SWord16 -> SWord16 -> SWord16 Source #

pDivMod :: SWord16 -> SWord16 -> (SWord16, SWord16) Source #

showPoly :: SWord16 -> String Source #

showPolynomial :: Bool -> SWord16 -> String Source #

Polynomial SWord32 Source # |

Instance details

Defined in Data.SBV.Tools.Polynomial

Methods

polynomial :: [Int] -> SWord32 Source #

pAdd :: SWord32 -> SWord32 -> SWord32 Source #

pMult :: (SWord32, SWord32, [Int]) -> SWord32 Source #

pDiv :: SWord32 -> SWord32 -> SWord32 Source #

pMod :: SWord32 -> SWord32 -> SWord32 Source #

pDivMod :: SWord32 -> SWord32 -> (SWord32, SWord32) Source #

showPoly :: SWord32 -> String Source #

showPolynomial :: Bool -> SWord32 -> String Source #

Polynomial SWord64 Source # |

Instance details

Defined in Data.SBV.Tools.Polynomial

Methods

polynomial :: [Int] -> SWord64 Source #

pAdd :: SWord64 -> SWord64 -> SWord64 Source #

pMult :: (SWord64, SWord64, [Int]) -> SWord64 Source #

pDiv :: SWord64 -> SWord64 -> SWord64 Source #

pMod :: SWord64 -> SWord64 -> SWord64 Source #

pDivMod :: SWord64 -> SWord64 -> (SWord64, SWord64) Source #

showPoly :: SWord64 -> String Source #

showPolynomial :: Bool -> SWord64 -> String Source #

Polynomial SWord8 Source # |

Instance details

Defined in Data.SBV.Tools.Polynomial

Methods

polynomial :: [Int] -> SWord8 Source #

pAdd :: SWord8 -> SWord8 -> SWord8 Source #

pMult :: (SWord8, SWord8, [Int]) -> SWord8 Source #

pDiv :: SWord8 -> SWord8 -> SWord8 Source #

pMod :: SWord8 -> SWord8 -> SWord8 Source #

pDivMod :: SWord8 -> SWord8 -> (SWord8, SWord8) Source #

showPoly :: SWord8 -> String Source #

showPolynomial :: Bool -> SWord8 -> String Source #

MonadSymbolic m => Constraint m SBool Source # | Base case: simple booleans
Instance details Defined in Data.SBV.Core.Data Methods mkConstraint :: State -> SBool -> m () Source #
ExtractIO m => ProvableM m SBool Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: SBool -> SymbolicT m SBool Source #

prove :: SBool -> m ThmResult Source #

proveWith :: SMTConfig -> SBool -> m ThmResult Source #

dprove :: SBool -> m ThmResult Source #

dproveWith :: SMTConfig -> SBool -> m ThmResult Source #

isVacuousProof :: SBool -> m Bool Source #

isVacuousProofWith :: SMTConfig -> SBool -> m Bool Source #

isTheorem :: SBool -> m Bool Source #

isTheoremWith :: SMTConfig -> SBool -> m Bool Source #

ExtractIO m => SatisfiableM m SBool Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: SBool -> SymbolicT m SBool Source #

sat :: SBool -> m SatResult Source #

satWith :: SMTConfig -> SBool -> m SatResult Source #

dsat :: SBool -> m SatResult Source #

dsatWith :: SMTConfig -> SBool -> m SatResult Source #

allSat :: SBool -> m AllSatResult Source #

allSatWith :: SMTConfig -> SBool -> m AllSatResult Source #

isSatisfiable :: SBool -> m Bool Source #

isSatisfiableWith :: SMTConfig -> SBool -> m Bool Source #

optimize :: OptimizeStyle -> SBool -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> SBool -> m OptimizeResult Source #

MonadSymbolic m => Lambda m (SBV a) Source # | Base case, simple values
Instance details Defined in Data.SBV.Core.Data Methods mkLambda :: State -> SBV a -> m () Source #
Fresh IO (S SInteger) Source # | `Fresh` instance for our state
Instance details Defined in Documentation.SBV.Examples.ProofTools.BMC Methods fresh :: QueryT IO (S SInteger) Source #
Fresh IO (S SInteger) Source # | `Fresh` instance for our state
Instance details Defined in Documentation.SBV.Examples.ProofTools.Fibonacci Methods fresh :: QueryT IO (S SInteger) Source #
Fresh IO (S SInteger) Source # | `Fresh` instance for our state
Instance details Defined in Documentation.SBV.Examples.ProofTools.Strengthen Methods fresh :: QueryT IO (S SInteger) Source #
Fresh IO (S SInteger) Source # | `Fresh` instance for our state
Instance details Defined in Documentation.SBV.Examples.ProofTools.Sum Methods fresh :: QueryT IO (S SInteger) Source #
SymVal a => Fresh IO (IncS (SBV a)) Source # | `Fresh` instance for the program state
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Basics Methods fresh :: QueryT IO (IncS (SBV a)) Source #
SymVal a => Fresh IO (FibS (SBV a)) Source # | `Fresh` instance for the program state
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Fib Methods fresh :: QueryT IO (FibS (SBV a)) Source #
SymVal a => Fresh IO (GCDS (SBV a)) Source # | `Fresh` instance for the program state
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.GCD Methods fresh :: QueryT IO (GCDS (SBV a)) Source #
SymVal a => Fresh IO (DivS (SBV a)) Source # | `Fresh` instance for the program state
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.IntDiv Methods fresh :: QueryT IO (DivS (SBV a)) Source #
SymVal a => Fresh IO (SqrtS (SBV a)) Source # | `Fresh` instance for the program state
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.IntSqrt Methods fresh :: QueryT IO (SqrtS (SBV a)) Source #
SymVal a => Fresh IO (SumS (SBV a)) Source # | `Fresh` instance for the program state
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Sum Methods fresh :: QueryT IO (SumS (SBV a)) Source #
(MonadIO m, SymVal a) => Queriable m (SBV a) Source # | Generic `Queriable` instance for `SymVal` values
Instance details Defined in Data.SBV.Control.Utils Associated Types type QueryResult (SBV a) Source # Methods create :: QueryT m (SBV a) Source # project :: SBV a -> QueryT m (QueryResult (SBV a)) Source # embed :: QueryResult (SBV a) -> QueryT m (SBV a) Source #
(MonadIO m, SymVal a, Foldable t, Traversable t, Fresh m (t (SBV a))) => Queriable m (t (SBV a)) Source # | Generic `Queriable` instance for things that are `Fresh` and look like containers:
Instance details Defined in Data.SBV.Control.Utils Associated Types type QueryResult (t (SBV a)) Source # Methods create :: QueryT m (t (SBV a)) Source # project :: t (SBV a) -> QueryT m (QueryResult (t (SBV a))) Source # embed :: QueryResult (t (SBV a)) -> QueryT m (t (SBV a)) Source #
ExtractIO m => SExecutable m (SBV a) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: SBV a -> SymbolicT m () Source # safe :: SBV a -> m [SafeResult] Source # safeWith :: SMTConfig -> SBV a -> m [SafeResult] Source #
ExtractIO m => SExecutable m [SBV a] Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: [SBV a] -> SymbolicT m () Source # safe :: [SBV a] -> m [SafeResult] Source # safeWith :: SMTConfig -> [SBV a] -> m [SafeResult] Source #
(SymVal a, Lambda m r) => Lambda m (SBV a -> r) Source # | Functions
Instance details Defined in Data.SBV.Core.Data Methods mkLambda :: State -> (SBV a -> r) -> m () Source #
ExtractIO m => ProvableM m (SymbolicT m SBool) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: SymbolicT m SBool -> SymbolicT m SBool Source #

prove :: SymbolicT m SBool -> m ThmResult Source #

proveWith :: SMTConfig -> SymbolicT m SBool -> m ThmResult Source #

dprove :: SymbolicT m SBool -> m ThmResult Source #

dproveWith :: SMTConfig -> SymbolicT m SBool -> m ThmResult Source #

isVacuousProof :: SymbolicT m SBool -> m Bool Source #

isVacuousProofWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

isTheorem :: SymbolicT m SBool -> m Bool Source #

isTheoremWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

(SymVal a, ProvableM m p) => ProvableM m (SBV a -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (SBV a -> p) -> SymbolicT m SBool Source #

prove :: (SBV a -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> (SBV a -> p) -> m ThmResult Source #

dprove :: (SBV a -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> (SBV a -> p) -> m ThmResult Source #

isVacuousProof :: (SBV a -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (SBV a -> p) -> m Bool Source #

isTheorem :: (SBV a -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> (SBV a -> p) -> m Bool Source #

(SymVal a, SymVal b, ProvableM m p) => ProvableM m ((SBV a, SBV b) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b) => SExecutable m (SBV a, SBV b) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b) -> SymbolicT m () Source # safe :: (SBV a, SBV b) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b) -> m [SafeResult] Source #
(SymVal a, SExecutable m p) => SExecutable m (SBV a -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a -> p) -> SymbolicT m () Source # safe :: (SBV a -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SExecutable m p) => SExecutable m ((SBV a, SBV b) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m [SafeResult] Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SymbolicT m () Source # safe :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m [SafeResult] Source #
ExtractIO m => SatisfiableM m (SymbolicT m SBool) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: SymbolicT m SBool -> SymbolicT m SBool Source #

sat :: SymbolicT m SBool -> m SatResult Source #

satWith :: SMTConfig -> SymbolicT m SBool -> m SatResult Source #

dsat :: SymbolicT m SBool -> m SatResult Source #

dsatWith :: SMTConfig -> SymbolicT m SBool -> m SatResult Source #

allSat :: SymbolicT m SBool -> m AllSatResult Source #

allSatWith :: SMTConfig -> SymbolicT m SBool -> m AllSatResult Source #

isSatisfiable :: SymbolicT m SBool -> m Bool Source #

isSatisfiableWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

optimize :: OptimizeStyle -> SymbolicT m SBool -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> SymbolicT m SBool -> m OptimizeResult Source #

(SymVal a, SatisfiableM m p) => SatisfiableM m (SBV a -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (SBV a -> p) -> SymbolicT m SBool Source #

sat :: (SBV a -> p) -> m SatResult Source #

satWith :: SMTConfig -> (SBV a -> p) -> m SatResult Source #

dsat :: (SBV a -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> (SBV a -> p) -> m SatResult Source #

allSat :: (SBV a -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (SBV a -> p) -> m AllSatResult Source #

isSatisfiable :: (SBV a -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (SBV a -> p) -> m Bool Source #

optimize :: OptimizeStyle -> (SBV a -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (SBV a -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m OptimizeResult Source #

(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c) => SExecutable m (SBV a, SBV b, SBV c) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c) -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d) => SExecutable m (SBV a, SBV b, SBV c, SBV d) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c, SBV d) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c, SBV d) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d) -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c, SBV d, SBV e) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c, SBV d, SBV e) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d, SBV e) -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e, NFData f, SymVal f) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> m [SafeResult] Source #
(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e, NFData f, SymVal f, NFData g, SymVal g) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> SymbolicT m () Source # safe :: (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> m [SafeResult] Source #
(SymVal a, Arbitrary a) => Arbitrary (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods arbitrary :: Gen (SBV a) Source # shrink :: SBV a -> [SBV a] Source #
Testable (Symbolic SBool) Source # |
Instance details Defined in Data.SBV.Core.Model Methods property :: Symbolic SBool -> Property Source # propertyForAllShrinkShow :: Gen a -> (a -> [a]) -> (a -> [String]) -> (a -> Symbolic SBool) -> Property Source #
(Ord a, Num a, Bits a, SymVal a) => Bits (SBV a) Source # | Using `popCount` or `testBit` on non-concrete values will result in an error. Use `sPopCount` or `sTestBit` instead.

Instance details

Defined in Data.SBV.Core.Model

Methods

(.&.) :: SBV a -> SBV a -> SBV a Source #

(.|.) :: SBV a -> SBV a -> SBV a Source #

xor :: SBV a -> SBV a -> SBV a Source #

complement :: SBV a -> SBV a Source #

shift :: SBV a -> Int -> SBV a Source #

rotate :: SBV a -> Int -> SBV a Source #

zeroBits :: SBV a Source #

bit :: Int -> SBV a Source #

setBit :: SBV a -> Int -> SBV a Source #

clearBit :: SBV a -> Int -> SBV a Source #

complementBit :: SBV a -> Int -> SBV a Source #

testBit :: SBV a -> Int -> Bool Source #

bitSizeMaybe :: SBV a -> Maybe Int Source #

bitSize :: SBV a -> Int Source #

isSigned :: SBV a -> Bool Source #

shiftL :: SBV a -> Int -> SBV a Source #

unsafeShiftL :: SBV a -> Int -> SBV a Source #

shiftR :: SBV a -> Int -> SBV a Source #

unsafeShiftR :: SBV a -> Int -> SBV a Source #

rotateL :: SBV a -> Int -> SBV a Source #

rotateR :: SBV a -> Int -> SBV a Source #

popCount :: SBV a -> Int Source #

(SymVal a, Bounded a) => Bounded (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods minBound :: SBV a Source # maxBound :: SBV a Source #
(Show a, Bounded a, Integral a, Num a, SymVal a) => Enum (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods succ :: SBV a -> SBV a Source # pred :: SBV a -> SBV a Source # toEnum :: Int -> SBV a Source # fromEnum :: SBV a -> Int Source # enumFrom :: SBV a -> [SBV a] Source # enumFromThen :: SBV a -> SBV a -> [SBV a] Source # enumFromTo :: SBV a -> SBV a -> [SBV a] Source # enumFromThenTo :: SBV a -> SBV a -> SBV a -> [SBV a] Source #

(Ord a, SymVal a, Fractional a, Floating a) => Floating (SBV a) Source #

Define Floating instance on SBV's; only for base types that are already floating; i.e., `SFloat`, `SDouble`, and `SReal`. (See the separate definition below for `SFloatingPoint`.) Note that unless you use delta-sat via `dReal` on `SReal`, most of the fields are "undefined" for symbolic values. We will add methods as they are supported by SMTLib. Currently, the only symbolically available function in this class is `sqrt` for `SFloat`, `SDouble` and `SFloatingPoint`.

Instance details

Defined in Data.SBV.Core.Model

Methods

pi :: SBV a Source #

exp :: SBV a -> SBV a Source #

log :: SBV a -> SBV a Source #

sqrt :: SBV a -> SBV a Source #

(**) :: SBV a -> SBV a -> SBV a Source #

logBase :: SBV a -> SBV a -> SBV a Source #

sin :: SBV a -> SBV a Source #

cos :: SBV a -> SBV a Source #

tan :: SBV a -> SBV a Source #

asin :: SBV a -> SBV a Source #

acos :: SBV a -> SBV a Source #

atan :: SBV a -> SBV a Source #

sinh :: SBV a -> SBV a Source #

cosh :: SBV a -> SBV a Source #

tanh :: SBV a -> SBV a Source #

asinh :: SBV a -> SBV a Source #

acosh :: SBV a -> SBV a Source #

atanh :: SBV a -> SBV a Source #

log1p :: SBV a -> SBV a Source #

expm1 :: SBV a -> SBV a Source #

log1pexp :: SBV a -> SBV a Source #

log1mexp :: SBV a -> SBV a Source #

Generic (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Data Associated Types type Rep (SBV a) :: Type -> Type Source # Methods from :: SBV a -> Rep (SBV a) x Source # to :: Rep (SBV a) x -> SBV a Source #
SymVal [a] => IsList (SList a) Source # | IsList instance allows list literals to be written compactly.
Instance details Defined in Data.SBV.Core.Data Associated Types type Item (SList a) Source # Methods fromList :: [Item (SList a)] -> SList a Source # fromListN :: Int -> [Item (SList a)] -> SList a Source # toList :: SList a -> [Item (SList a)] Source #
(Ord a, SymVal a, Num a) => Num (SBV (Maybe a)) Source # | Custom `Num` instance over `SMaybe`

Instance details

Defined in Data.SBV.Maybe

Methods

(+) :: SBV (Maybe a) -> SBV (Maybe a) -> SBV (Maybe a) Source #

(-) :: SBV (Maybe a) -> SBV (Maybe a) -> SBV (Maybe a) Source #

(*) :: SBV (Maybe a) -> SBV (Maybe a) -> SBV (Maybe a) Source #

negate :: SBV (Maybe a) -> SBV (Maybe a) Source #

abs :: SBV (Maybe a) -> SBV (Maybe a) Source #

signum :: SBV (Maybe a) -> SBV (Maybe a) Source #

fromInteger :: Integer -> SBV (Maybe a) Source #

(Ord a, Num a, SymVal a) => Num (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (+) :: SBV a -> SBV a -> SBV a Source # (-) :: SBV a -> SBV a -> SBV a Source # (*) :: SBV a -> SBV a -> SBV a Source # negate :: SBV a -> SBV a Source # abs :: SBV a -> SBV a Source # signum :: SBV a -> SBV a Source # fromInteger :: Integer -> SBV a Source #
(Ord a, SymVal a, Fractional a) => Fractional (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (/) :: SBV a -> SBV a -> SBV a Source # recip :: SBV a -> SBV a Source # fromRational :: Rational -> SBV a Source #
Show (SBV a) Source # | A `Show` instance is not particularly "desirable," when the value is symbolic, but we do need this instance as otherwise we cannot simply evaluate Haskell functions that return symbolic values and have their constant values printed easily!
Instance details Defined in Data.SBV.Core.Data Methods showsPrec :: Int -> SBV a -> ShowS Source # show :: SBV a -> String Source # showList :: [SBV a] -> ShowS Source #
(SymVal a, Show a) => Show (IncS (SBV a)) Source # | Show instance for `IncS`. The above deriving clause would work just as well, but we want it to be a little prettier here, and hence the `OVERLAPS` directive.
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Basics Methods showsPrec :: Int -> IncS (SBV a) -> ShowS Source # show :: IncS (SBV a) -> String Source # showList :: [IncS (SBV a)] -> ShowS Source #
(SymVal a, Show a) => Show (FibS (SBV a)) Source # | Show instance for `FibS`. The above deriving clause would work just as well, but we want it to be a little prettier here, and hence the `OVERLAPS` directive.
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Fib Methods showsPrec :: Int -> FibS (SBV a) -> ShowS Source # show :: FibS (SBV a) -> String Source # showList :: [FibS (SBV a)] -> ShowS Source #
(SymVal a, Show a) => Show (GCDS (SBV a)) Source # | Show instance for `GCDS`. The above deriving clause would work just as well, but we want it to be a little prettier here, and hence the `OVERLAPS` directive.
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.GCD Methods showsPrec :: Int -> GCDS (SBV a) -> ShowS Source # show :: GCDS (SBV a) -> String Source # showList :: [GCDS (SBV a)] -> ShowS Source #
(SymVal a, Show a) => Show (DivS (SBV a)) Source # | Show instance for `DivS`. The above deriving clause would work just as well, but we want it to be a little prettier here, and hence the `OVERLAPS` directive.
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.IntDiv Methods showsPrec :: Int -> DivS (SBV a) -> ShowS Source # show :: DivS (SBV a) -> String Source # showList :: [DivS (SBV a)] -> ShowS Source #
(SymVal a, Show a) => Show (SqrtS (SBV a)) Source # | Show instance for `SqrtS`. The above deriving clause would work just as well, but we want it to be a little prettier here, and hence the `OVERLAPS` directive.
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.IntSqrt Methods showsPrec :: Int -> SqrtS (SBV a) -> ShowS Source # show :: SqrtS (SBV a) -> String Source # showList :: [SqrtS (SBV a)] -> ShowS Source #
(SymVal a, Show a) => Show (SumS (SBV a)) Source # | Show instance for `SumS`. The above deriving clause would work just as well, but we want it to be a little prettier here, and hence the `OVERLAPS` directive.
Instance details Defined in Documentation.SBV.Examples.WeakestPreconditions.Sum Methods showsPrec :: Int -> SumS (SBV a) -> ShowS Source # show :: SumS (SBV a) -> String Source # showList :: [SumS (SBV a)] -> ShowS Source #
NFData (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Data Methods rnf :: SBV a -> () Source #
Eq (SBV a) Source # | This instance is only defined so that we can define an instance for `Bits`. `==` and `/=` simply throw an error. Use `EqSymbolic` instead.
Instance details Defined in Data.SBV.Core.Data Methods (==) :: SBV a -> SBV a -> Bool Source # (/=) :: SBV a -> SBV a -> Bool Source #
(Random a, SymVal a) => Random (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Data Methods randomR :: RandomGen g => (SBV a, SBV a) -> g -> (SBV a, g) Source # random :: RandomGen g => g -> (SBV a, g) Source # randomRs :: RandomGen g => (SBV a, SBV a) -> g -> [SBV a] Source # randoms :: RandomGen g => g -> [SBV a] Source #
ByteConverter (SWord 8) Source # | `SWord` 8 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 8 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 8 Source #
ByteConverter (SWord 16) Source # | `SWord` 16 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 16 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 16 Source #
ByteConverter (SWord 32) Source # | `SWord` 32 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 32 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 32 Source #
ByteConverter (SWord 64) Source # | `SWord` 64 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 64 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 64 Source #
ByteConverter (SWord 128) Source # | `SWord` 128 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 128 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 128 Source #
ByteConverter (SWord 256) Source # | `SWord` 256 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 256 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 256 Source #
ByteConverter (SWord 512) Source # | `SWord` 512 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 512 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 512 Source #
ByteConverter (SWord 1024) Source # | `SWord` 1024 instance for `ByteConverter`
Instance details Defined in Data.SBV Methods toBytes :: SWord 1024 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 1024 Source #
EqSymbolic (SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

(.==) :: SBV a -> SBV a -> SBool Source #

(./=) :: SBV a -> SBV a -> SBool Source #

(.===) :: SBV a -> SBV a -> SBool Source #

(./==) :: SBV a -> SBV a -> SBool Source #

distinct :: [SBV a] -> SBool Source #

distinctExcept :: [SBV a] -> [SBV a] -> SBool Source #

allEqual :: [SBV a] -> SBool Source #

sElem :: SBV a -> [SBV a] -> SBool Source #

sNotElem :: SBV a -> [SBV a] -> SBool Source #

Outputtable (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => SBV a -> m (SBV a) Source #
Skolemize (SBV a) Source # | Base case; pure symbolic values
Instance details Defined in Data.SBV.Core.Data Associated Types type SkolemsTo (SBV a) Methods skolem :: String -> [(SVal, String)] -> SBV a -> SkolemsTo (SBV a) skolemize :: SBV a -> SkolemsTo (SBV a) Source # taggedSkolemize :: String -> SBV a -> SkolemsTo (SBV a) Source #
HasKind a => HasKind (SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Data

Methods

kindOf :: SBV a -> Kind Source #

hasSign :: SBV a -> Bool Source #

intSizeOf :: SBV a -> Int Source #

isBoolean :: SBV a -> Bool Source #

isBounded :: SBV a -> Bool Source #

isReal :: SBV a -> Bool Source #

isFloat :: SBV a -> Bool Source #

isDouble :: SBV a -> Bool Source #

isRational :: SBV a -> Bool Source #

isFP :: SBV a -> Bool Source #

isUnbounded :: SBV a -> Bool Source #

isUserSort :: SBV a -> Bool Source #

isChar :: SBV a -> Bool Source #

isString :: SBV a -> Bool Source #

isList :: SBV a -> Bool Source #

isSet :: SBV a -> Bool Source #

isTuple :: SBV a -> Bool Source #

isMaybe :: SBV a -> Bool Source #

isEither :: SBV a -> Bool Source #

showType :: SBV a -> String Source #

SymVal a => Mergeable (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> SBV a -> SBV a -> SBV a Source # select :: (Ord b, SymVal b, Num b) => [SBV a] -> SBV a -> SBV b -> SBV a Source #
(Ord a, SymVal a) => OrdSymbolic (SBV a) Source # | If comparison is over something SMTLib can handle, just translate it. Otherwise desugar.
Instance details Defined in Data.SBV.Core.Model Methods (.<) :: SBV a -> SBV a -> SBool Source # (.<=) :: SBV a -> SBV a -> SBool Source # (.>) :: SBV a -> SBV a -> SBool Source # (.>=) :: SBV a -> SBV a -> SBool Source # smin :: SBV a -> SBV a -> SBV a Source # smax :: SBV a -> SBV a -> SBV a Source # inRange :: SBV a -> (SBV a, SBV a) -> SBool Source #
(KnownNat n, BVIsNonZero n) => SDivisible (SInt n) Source # | `SDivisible` instance for `SInt`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: SInt n -> SInt n -> (SInt n, SInt n) Source # sDivMod :: SInt n -> SInt n -> (SInt n, SInt n) Source # sQuot :: SInt n -> SInt n -> SInt n Source # sRem :: SInt n -> SInt n -> SInt n Source # sDiv :: SInt n -> SInt n -> SInt n Source # sMod :: SInt n -> SInt n -> SInt n Source #
(KnownNat n, BVIsNonZero n) => SDivisible (SWord n) Source # | `SDivisible` instance for `SWord`
Instance details Defined in Data.SBV.Core.Sized Methods sQuotRem :: SWord n -> SWord n -> (SWord n, SWord n) Source # sDivMod :: SWord n -> SWord n -> (SWord n, SWord n) Source # sQuot :: SWord n -> SWord n -> SWord n Source # sRem :: SWord n -> SWord n -> SWord n Source # sDiv :: SWord n -> SWord n -> SWord n Source # sMod :: SWord n -> SWord n -> SWord n Source #
HasKind a => SMTDefinable (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods smtFunction :: String -> SBV a -> SBV a Source # uninterpret :: String -> SBV a Source # cgUninterpret :: String -> [String] -> SBV a -> SBV a Source # sbvDefineValue :: String -> UIKind (SBV a) -> SBV a Source # sym :: String -> SBV a Source #
(KnownNat n, BVIsNonZero n) => ArithOverflow (SInt n) Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SInt n -> SInt n -> (SBool, SBool) Source # bvSubO :: SInt n -> SInt n -> (SBool, SBool) Source # bvMulO :: SInt n -> SInt n -> (SBool, SBool) Source # bvMulOFast :: SInt n -> SInt n -> (SBool, SBool) Source # bvDivO :: SInt n -> SInt n -> (SBool, SBool) Source # bvNegO :: SInt n -> (SBool, SBool) Source #
(KnownNat n, BVIsNonZero n) => ArithOverflow (SWord n) Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SWord n -> SWord n -> (SBool, SBool) Source # bvSubO :: SWord n -> SWord n -> (SBool, SBool) Source # bvMulO :: SWord n -> SWord n -> (SBool, SBool) Source # bvMulOFast :: SWord n -> SWord n -> (SBool, SBool) Source # bvDivO :: SWord n -> SWord n -> (SBool, SBool) Source # bvNegO :: SWord n -> (SBool, SBool) Source #
(KnownNat n, BVIsNonZero n) => Polynomial (SWord n) Source # |

Instance details

Defined in Data.SBV.Tools.Polynomial

Methods

polynomial :: [Int] -> SWord n Source #

pAdd :: SWord n -> SWord n -> SWord n Source #

pMult :: (SWord n, SWord n, [Int]) -> SWord n Source #

pDiv :: SWord n -> SWord n -> SWord n Source #

pMod :: SWord n -> SWord n -> SWord n Source #

pDivMod :: SWord n -> SWord n -> (SWord n, SWord n) Source #

showPoly :: SWord n -> String Source #

showPolynomial :: Bool -> SWord n -> String Source #

(SymVal a, PrettyNum a) => PrettyNum (SBV a) Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: SBV a -> String Source # binS :: SBV a -> String Source # hexP :: SBV a -> String Source # binP :: SBV a -> String Source # hex :: SBV a -> String Source # bin :: SBV a -> String Source #
ValidFloat eb sb => Floating (SFloatingPoint eb sb) Source # | We give a specific instance for `SFloatingPoint`, because the underlying floating-point type doesn't support fromRational directly. The overlap with the above instance is unfortunate.

Instance details

Defined in Data.SBV.Core.Model

Methods

pi :: SFloatingPoint eb sb Source #

exp :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

log :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

sqrt :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

(**) :: SFloatingPoint eb sb -> SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

logBase :: SFloatingPoint eb sb -> SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

sin :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

cos :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

tan :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

asin :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

acos :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

atan :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

sinh :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

cosh :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

tanh :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

asinh :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

acosh :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

atanh :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

log1p :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

expm1 :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

log1pexp :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

log1mexp :: SFloatingPoint eb sb -> SFloatingPoint eb sb Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> SBV g -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> SBV g -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> SBV g -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> SBV d -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> SBV c -> z) -> (SBV a -> SBV b -> SBV c -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, EqSymbolic z) => Equality (SBV a -> SBV b -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> SBV b -> z) -> (SBV a -> SBV b -> z) -> IO ThmResult Source #
(SymVal a, EqSymbolic z) => Equality (SBV a -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: (SBV a -> z) -> (SBV a -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, EqSymbolic z) => Equality ((SBV a, SBV b) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b) -> z) -> ((SBV a, SBV b) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c) -> z) -> ((SBV a, SBV b, SBV c) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c, SBV d) -> z) -> ((SBV a, SBV b, SBV c, SBV d) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> z) -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> z) -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> z) -> IO ThmResult Source #
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) Source # |
Instance details Defined in Data.SBV.Core.Model Methods (===) :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) -> IO ThmResult Source #
SymVal e => Mergeable (STree i e) Source # |
Instance details Defined in Data.SBV.Tools.STree Methods symbolicMerge :: Bool -> SBool -> STree i e -> STree i e -> STree i e Source # select :: (Ord b, SymVal b, Num b) => [STree i e] -> STree i e -> SBV b -> STree i e Source #
(SymVal b, HasKind a) => SMTDefinable (SBV b -> SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods smtFunction :: String -> (SBV b -> SBV a) -> SBV b -> SBV a Source # uninterpret :: String -> SBV b -> SBV a Source # cgUninterpret :: String -> [String] -> (SBV b -> SBV a) -> SBV b -> SBV a Source # sbvDefineValue :: String -> UIKind (SBV b -> SBV a) -> SBV b -> SBV a Source # sym :: String -> SBV b -> SBV a Source #
(SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV c -> SBV b -> SBV a) -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV c -> SBV b -> SBV a) -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV c -> SBV b -> SBV a) -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV c -> SBV b -> SBV a Source #

(SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV d -> SBV c -> SBV b -> SBV a) -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV d -> SBV c -> SBV b -> SBV a) -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV d -> SBV c -> SBV b -> SBV a) -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

uninterpret :: String -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

cgUninterpret :: String -> [String] -> (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sbvDefineValue :: String -> UIKind (SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

sym :: String -> SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV c, SBV b) -> SBV a) -> (SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV c, SBV b) -> SBV a) -> (SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV c, SBV b) -> SBV a) -> (SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV c, SBV b) -> SBV a Source #

(SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV d, SBV c, SBV b) -> SBV a) -> (SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV d, SBV c, SBV b) -> SBV a) -> (SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV d, SBV c, SBV b) -> SBV a) -> (SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => SMTDefinable ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunction :: String -> ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpret :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: String -> UIKind ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

type NegatesTo SBool Source # |
Instance details Defined in Data.SBV.Core.Data type NegatesTo SBool = SBool
type Rep (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Data type Rep (SBV a) = D1 ('MetaData "SBV" "Data.SBV.Core.Data" "sbv-10.2-Gi6nXbGJVKyDE1oJouGknK" 'True) (C1 ('MetaCons "SBV" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSBV") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SVal)))
type Item (SList a) Source # |
Instance details Defined in Data.SBV.Core.Data type Item (SList a) = a
type QueryResult (SBV a) Source # |
Instance details Defined in Data.SBV.Control.Utils type QueryResult (SBV a) = a
type QueryResult (t (SBV a)) Source # |
Instance details Defined in Data.SBV.Control.Utils type QueryResult (t (SBV a)) = t a

class HasKind a where Source #

A class for capturing values that have a sign and a size (finite or infinite) minimal complete definition: kindOf, unless you can take advantage of the default signature: This class can be automatically derived for data-types that have a `Data` instance; this is useful for creating uninterpreted sorts. So, in reality, end users should almost never need to define any methods.

Minimal complete definition

Nothing

Methods

kindOf :: a -> Kind Source #

default kindOf :: (Read a, Data a) => a -> Kind Source #

hasSign :: a -> Bool Source #

intSizeOf :: a -> Int Source #

isBoolean :: a -> Bool Source #

isBounded :: a -> Bool Source #

isReal :: a -> Bool Source #

isFloat :: a -> Bool Source #

isDouble :: a -> Bool Source #

isRational :: a -> Bool Source #

isFP :: a -> Bool Source #

isUnbounded :: a -> Bool Source #

isUserSort :: a -> Bool Source #

isChar :: a -> Bool Source #

isString :: a -> Bool Source #

isList :: a -> Bool Source #

isSet :: a -> Bool Source #

isTuple :: a -> Bool Source #

isMaybe :: a -> Bool Source #

isEither :: a -> Bool Source #

showType :: a -> String Source #

#### Instances

Instances details

HasKind Int16 Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Int16 -> Kind Source #

hasSign :: Int16 -> Bool Source #

intSizeOf :: Int16 -> Int Source #

isBoolean :: Int16 -> Bool Source #

isBounded :: Int16 -> Bool Source #

isReal :: Int16 -> Bool Source #

isFloat :: Int16 -> Bool Source #

isDouble :: Int16 -> Bool Source #

isRational :: Int16 -> Bool Source #

isFP :: Int16 -> Bool Source #

isUnbounded :: Int16 -> Bool Source #

isUserSort :: Int16 -> Bool Source #

isChar :: Int16 -> Bool Source #

isString :: Int16 -> Bool Source #

isList :: Int16 -> Bool Source #

isSet :: Int16 -> Bool Source #

isTuple :: Int16 -> Bool Source #

isMaybe :: Int16 -> Bool Source #

isEither :: Int16 -> Bool Source #

showType :: Int16 -> String Source #

HasKind Int32 Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Int32 -> Kind Source #

hasSign :: Int32 -> Bool Source #

intSizeOf :: Int32 -> Int Source #

isBoolean :: Int32 -> Bool Source #

isBounded :: Int32 -> Bool Source #

isReal :: Int32 -> Bool Source #

isFloat :: Int32 -> Bool Source #

isDouble :: Int32 -> Bool Source #

isRational :: Int32 -> Bool Source #

isFP :: Int32 -> Bool Source #

isUnbounded :: Int32 -> Bool Source #

isUserSort :: Int32 -> Bool Source #

isChar :: Int32 -> Bool Source #

isString :: Int32 -> Bool Source #

isList :: Int32 -> Bool Source #

isSet :: Int32 -> Bool Source #

isTuple :: Int32 -> Bool Source #

isMaybe :: Int32 -> Bool Source #

isEither :: Int32 -> Bool Source #

showType :: Int32 -> String Source #

HasKind Int64 Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Int64 -> Kind Source #

hasSign :: Int64 -> Bool Source #

intSizeOf :: Int64 -> Int Source #

isBoolean :: Int64 -> Bool Source #

isBounded :: Int64 -> Bool Source #

isReal :: Int64 -> Bool Source #

isFloat :: Int64 -> Bool Source #

isDouble :: Int64 -> Bool Source #

isRational :: Int64 -> Bool Source #

isFP :: Int64 -> Bool Source #

isUnbounded :: Int64 -> Bool Source #

isUserSort :: Int64 -> Bool Source #

isChar :: Int64 -> Bool Source #

isString :: Int64 -> Bool Source #

isList :: Int64 -> Bool Source #

isSet :: Int64 -> Bool Source #

isTuple :: Int64 -> Bool Source #

isMaybe :: Int64 -> Bool Source #

isEither :: Int64 -> Bool Source #

showType :: Int64 -> String Source #

HasKind Int8 Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Int8 -> Kind Source #

hasSign :: Int8 -> Bool Source #

intSizeOf :: Int8 -> Int Source #

isBoolean :: Int8 -> Bool Source #

isBounded :: Int8 -> Bool Source #

isReal :: Int8 -> Bool Source #

isFloat :: Int8 -> Bool Source #

isDouble :: Int8 -> Bool Source #

isRational :: Int8 -> Bool Source #

isFP :: Int8 -> Bool Source #

isUnbounded :: Int8 -> Bool Source #

isUserSort :: Int8 -> Bool Source #

isChar :: Int8 -> Bool Source #

isString :: Int8 -> Bool Source #

isList :: Int8 -> Bool Source #

isSet :: Int8 -> Bool Source #

isTuple :: Int8 -> Bool Source #

isMaybe :: Int8 -> Bool Source #

isEither :: Int8 -> Bool Source #

showType :: Int8 -> String Source #

HasKind Rational Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Rational -> Kind Source #

hasSign :: Rational -> Bool Source #

intSizeOf :: Rational -> Int Source #

isBoolean :: Rational -> Bool Source #

isBounded :: Rational -> Bool Source #

isReal :: Rational -> Bool Source #

isFloat :: Rational -> Bool Source #

isDouble :: Rational -> Bool Source #

isRational :: Rational -> Bool Source #

isFP :: Rational -> Bool Source #

isUnbounded :: Rational -> Bool Source #

isUserSort :: Rational -> Bool Source #

isChar :: Rational -> Bool Source #

isString :: Rational -> Bool Source #

isList :: Rational -> Bool Source #

isSet :: Rational -> Bool Source #

isTuple :: Rational -> Bool Source #

isMaybe :: Rational -> Bool Source #

isEither :: Rational -> Bool Source #

showType :: Rational -> String Source #

HasKind Word16 Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Word16 -> Kind Source #

hasSign :: Word16 -> Bool Source #

intSizeOf :: Word16 -> Int Source #

isBoolean :: Word16 -> Bool Source #

isBounded :: Word16 -> Bool Source #

isReal :: Word16 -> Bool Source #

isFloat :: Word16 -> Bool Source #

isDouble :: Word16 -> Bool Source #

isRational :: Word16 -> Bool Source #

isFP :: Word16 -> Bool Source #

isUnbounded :: Word16 -> Bool Source #

isUserSort :: Word16 -> Bool Source #

isChar :: Word16 -> Bool Source #

isString :: Word16 -> Bool Source #

isList :: Word16 -> Bool Source #

isSet :: Word16 -> Bool Source #

isTuple :: Word16 -> Bool Source #

isMaybe :: Word16 -> Bool Source #

isEither :: Word16 -> Bool Source #

showType :: Word16 -> String Source #

HasKind Word32 Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Word32 -> Kind Source #

hasSign :: Word32 -> Bool Source #

intSizeOf :: Word32 -> Int Source #

isBoolean :: Word32 -> Bool Source #

isBounded :: Word32 -> Bool Source #

isReal :: Word32 -> Bool Source #

isFloat :: Word32 -> Bool Source #

isDouble :: Word32 -> Bool Source #

isRational :: Word32 -> Bool Source #

isFP :: Word32 -> Bool Source #

isUnbounded :: Word32 -> Bool Source #

isUserSort :: Word32 -> Bool Source #

isChar :: Word32 -> Bool Source #

isString :: Word32 -> Bool Source #

isList :: Word32 -> Bool Source #

isSet :: Word32 -> Bool Source #

isTuple :: Word32 -> Bool Source #

isMaybe :: Word32 -> Bool Source #

isEither :: Word32 -> Bool Source #

showType :: Word32 -> String Source #

HasKind Word64 Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Word64 -> Kind Source #

hasSign :: Word64 -> Bool Source #

intSizeOf :: Word64 -> Int Source #

isBoolean :: Word64 -> Bool Source #

isBounded :: Word64 -> Bool Source #

isReal :: Word64 -> Bool Source #

isFloat :: Word64 -> Bool Source #

isDouble :: Word64 -> Bool Source #

isRational :: Word64 -> Bool Source #

isFP :: Word64 -> Bool Source #

isUnbounded :: Word64 -> Bool Source #

isUserSort :: Word64 -> Bool Source #

isChar :: Word64 -> Bool Source #

isString :: Word64 -> Bool Source #

isList :: Word64 -> Bool Source #

isSet :: Word64 -> Bool Source #

isTuple :: Word64 -> Bool Source #

isMaybe :: Word64 -> Bool Source #

isEither :: Word64 -> Bool Source #

showType :: Word64 -> String Source #

HasKind Word8 Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Word8 -> Kind Source #

hasSign :: Word8 -> Bool Source #

intSizeOf :: Word8 -> Int Source #

isBoolean :: Word8 -> Bool Source #

isBounded :: Word8 -> Bool Source #

isReal :: Word8 -> Bool Source #

isFloat :: Word8 -> Bool Source #

isDouble :: Word8 -> Bool Source #

isRational :: Word8 -> Bool Source #

isFP :: Word8 -> Bool Source #

isUnbounded :: Word8 -> Bool Source #

isUserSort :: Word8 -> Bool Source #

isChar :: Word8 -> Bool Source #

isString :: Word8 -> Bool Source #

isList :: Word8 -> Bool Source #

isSet :: Word8 -> Bool Source #

isTuple :: Word8 -> Bool Source #

isMaybe :: Word8 -> Bool Source #

isEither :: Word8 -> Bool Source #

showType :: Word8 -> String Source #

HasKind AlgReal Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: AlgReal -> Kind Source #

hasSign :: AlgReal -> Bool Source #

intSizeOf :: AlgReal -> Int Source #

isBoolean :: AlgReal -> Bool Source #

isBounded :: AlgReal -> Bool Source #

isReal :: AlgReal -> Bool Source #

isFloat :: AlgReal -> Bool Source #

isDouble :: AlgReal -> Bool Source #

isRational :: AlgReal -> Bool Source #

isFP :: AlgReal -> Bool Source #

isUnbounded :: AlgReal -> Bool Source #

isUserSort :: AlgReal -> Bool Source #

isChar :: AlgReal -> Bool Source #

isString :: AlgReal -> Bool Source #

isList :: AlgReal -> Bool Source #

isSet :: AlgReal -> Bool Source #

isTuple :: AlgReal -> Bool Source #

isMaybe :: AlgReal -> Bool Source #

isEither :: AlgReal -> Bool Source #

showType :: AlgReal -> String Source #

HasKind CV Source # | `Kind` instance for CV

Instance details

Defined in Data.SBV.Core.Concrete

Methods

kindOf :: CV -> Kind Source #

hasSign :: CV -> Bool Source #

intSizeOf :: CV -> Int Source #

isBoolean :: CV -> Bool Source #

isBounded :: CV -> Bool Source #

isReal :: CV -> Bool Source #

isFloat :: CV -> Bool Source #

isDouble :: CV -> Bool Source #

isRational :: CV -> Bool Source #

isFP :: CV -> Bool Source #

isUnbounded :: CV -> Bool Source #

isUserSort :: CV -> Bool Source #

isChar :: CV -> Bool Source #

isString :: CV -> Bool Source #

isList :: CV -> Bool Source #

isSet :: CV -> Bool Source #

isTuple :: CV -> Bool Source #

isMaybe :: CV -> Bool Source #

isEither :: CV -> Bool Source #

showType :: CV -> String Source #

HasKind ExtCV Source # | Kind instance for Extended CV

Instance details

Defined in Data.SBV.Core.Concrete

Methods

kindOf :: ExtCV -> Kind Source #

hasSign :: ExtCV -> Bool Source #

intSizeOf :: ExtCV -> Int Source #

isBoolean :: ExtCV -> Bool Source #

isBounded :: ExtCV -> Bool Source #

isReal :: ExtCV -> Bool Source #

isFloat :: ExtCV -> Bool Source #

isDouble :: ExtCV -> Bool Source #

isRational :: ExtCV -> Bool Source #

isFP :: ExtCV -> Bool Source #

isUnbounded :: ExtCV -> Bool Source #

isUserSort :: ExtCV -> Bool Source #

isChar :: ExtCV -> Bool Source #

isString :: ExtCV -> Bool Source #

isList :: ExtCV -> Bool Source #

isSet :: ExtCV -> Bool Source #

isTuple :: ExtCV -> Bool Source #

isMaybe :: ExtCV -> Bool Source #

isEither :: ExtCV -> Bool Source #

showType :: ExtCV -> String Source #

HasKind GeneralizedCV Source # | `Kind` instance for generalized CV

Instance details

Defined in Data.SBV.Core.Concrete

Methods

kindOf :: GeneralizedCV -> Kind Source #

hasSign :: GeneralizedCV -> Bool Source #

intSizeOf :: GeneralizedCV -> Int Source #

isBoolean :: GeneralizedCV -> Bool Source #

isBounded :: GeneralizedCV -> Bool Source #

isReal :: GeneralizedCV -> Bool Source #

isFloat :: GeneralizedCV -> Bool Source #

isDouble :: GeneralizedCV -> Bool Source #

isRational :: GeneralizedCV -> Bool Source #

isFP :: GeneralizedCV -> Bool Source #

isUnbounded :: GeneralizedCV -> Bool Source #

isUserSort :: GeneralizedCV -> Bool Source #

isChar :: GeneralizedCV -> Bool Source #

isString :: GeneralizedCV -> Bool Source #

isList :: GeneralizedCV -> Bool Source #

isSet :: GeneralizedCV -> Bool Source #

isTuple :: GeneralizedCV -> Bool Source #

isMaybe :: GeneralizedCV -> Bool Source #

isEither :: GeneralizedCV -> Bool Source #

showType :: GeneralizedCV -> String Source #

HasKind Kind Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Kind -> Kind Source #

hasSign :: Kind -> Bool Source #

intSizeOf :: Kind -> Int Source #

isBoolean :: Kind -> Bool Source #

isBounded :: Kind -> Bool Source #

isReal :: Kind -> Bool Source #

isFloat :: Kind -> Bool Source #

isDouble :: Kind -> Bool Source #

isRational :: Kind -> Bool Source #

isFP :: Kind -> Bool Source #

isUnbounded :: Kind -> Bool Source #

isUserSort :: Kind -> Bool Source #

isChar :: Kind -> Bool Source #

isString :: Kind -> Bool Source #

isList :: Kind -> Bool Source #

isSet :: Kind -> Bool Source #

isTuple :: Kind -> Bool Source #

isMaybe :: Kind -> Bool Source #

isEither :: Kind -> Bool Source #

showType :: Kind -> String Source #

HasKind RoundingMode Source # | `RoundingMode` kind

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: RoundingMode -> Kind Source #

hasSign :: RoundingMode -> Bool Source #

intSizeOf :: RoundingMode -> Int Source #

isBoolean :: RoundingMode -> Bool Source #

isBounded :: RoundingMode -> Bool Source #

isReal :: RoundingMode -> Bool Source #

isFloat :: RoundingMode -> Bool Source #

isDouble :: RoundingMode -> Bool Source #

isRational :: RoundingMode -> Bool Source #

isFP :: RoundingMode -> Bool Source #

isUnbounded :: RoundingMode -> Bool Source #

isUserSort :: RoundingMode -> Bool Source #

isChar :: RoundingMode -> Bool Source #

isString :: RoundingMode -> Bool Source #

isList :: RoundingMode -> Bool Source #

isSet :: RoundingMode -> Bool Source #

isTuple :: RoundingMode -> Bool Source #

isMaybe :: RoundingMode -> Bool Source #

isEither :: RoundingMode -> Bool Source #

showType :: RoundingMode -> String Source #

HasKind SV Source # |

Instance details

Defined in Data.SBV.Core.Symbolic

Methods

kindOf :: SV -> Kind Source #

hasSign :: SV -> Bool Source #

intSizeOf :: SV -> Int Source #

isBoolean :: SV -> Bool Source #

isBounded :: SV -> Bool Source #

isReal :: SV -> Bool Source #

isFloat :: SV -> Bool Source #

isDouble :: SV -> Bool Source #

isRational :: SV -> Bool Source #

isFP :: SV -> Bool Source #

isUnbounded :: SV -> Bool Source #

isUserSort :: SV -> Bool Source #

isChar :: SV -> Bool Source #

isString :: SV -> Bool Source #

isList :: SV -> Bool Source #

isSet :: SV -> Bool Source #

isTuple :: SV -> Bool Source #

isMaybe :: SV -> Bool Source #

isEither :: SV -> Bool Source #

showType :: SV -> String Source #

HasKind SVal Source # |

Instance details

Defined in Data.SBV.Core.Symbolic

Methods

kindOf :: SVal -> Kind Source #

hasSign :: SVal -> Bool Source #

intSizeOf :: SVal -> Int Source #

isBoolean :: SVal -> Bool Source #

isBounded :: SVal -> Bool Source #

isReal :: SVal -> Bool Source #

isFloat :: SVal -> Bool Source #

isDouble :: SVal -> Bool Source #

isRational :: SVal -> Bool Source #

isFP :: SVal -> Bool Source #

isUnbounded :: SVal -> Bool Source #

isUserSort :: SVal -> Bool Source #

isChar :: SVal -> Bool Source #

isString :: SVal -> Bool Source #

isList :: SVal -> Bool Source #

isSet :: SVal -> Bool Source #

isTuple :: SVal -> Bool Source #

isMaybe :: SVal -> Bool Source #

isEither :: SVal -> Bool Source #

showType :: SVal -> String Source #

HasKind State Source # |

Instance details

Defined in Documentation.SBV.Examples.Lists.BoundedMutex

Methods

kindOf :: State -> Kind Source #

hasSign :: State -> Bool Source #

intSizeOf :: State -> Int Source #

isBoolean :: State -> Bool Source #

isBounded :: State -> Bool Source #

isReal :: State -> Bool Source #

isFloat :: State -> Bool Source #

isDouble :: State -> Bool Source #

isRational :: State -> Bool Source #

isFP :: State -> Bool Source #

isUnbounded :: State -> Bool Source #

isUserSort :: State -> Bool Source #

isChar :: State -> Bool Source #

isString :: State -> Bool Source #

isList :: State -> Bool Source #

isSet :: State -> Bool Source #

isTuple :: State -> Bool Source #

isMaybe :: State -> Bool Source #

isEither :: State -> Bool Source #

showType :: State -> String Source #

HasKind E Source # |

Instance details

Defined in Documentation.SBV.Examples.Misc.Enumerate

Methods

kindOf :: E -> Kind Source #

hasSign :: E -> Bool Source #

intSizeOf :: E -> Int Source #

isBoolean :: E -> Bool Source #

isBounded :: E -> Bool Source #

isReal :: E -> Bool Source #

isFloat :: E -> Bool Source #

isDouble :: E -> Bool Source #

isRational :: E -> Bool Source #

isFP :: E -> Bool Source #

isUnbounded :: E -> Bool Source #

isUserSort :: E -> Bool Source #

isChar :: E -> Bool Source #

isString :: E -> Bool Source #

isList :: E -> Bool Source #

isSet :: E -> Bool Source #

isTuple :: E -> Bool Source #

isMaybe :: E -> Bool Source #

isEither :: E -> Bool Source #

showType :: E -> String Source #

HasKind E Source # |

Instance details

Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic

Methods

kindOf :: E -> Kind Source #

hasSign :: E -> Bool Source #

intSizeOf :: E -> Int Source #

isBoolean :: E -> Bool Source #

isBounded :: E -> Bool Source #

isReal :: E -> Bool Source #

isFloat :: E -> Bool Source #

isDouble :: E -> Bool Source #

isRational :: E -> Bool Source #

isFP :: E -> Bool Source #

isUnbounded :: E -> Bool Source #

isUserSort :: E -> Bool Source #

isChar :: E -> Bool Source #

isString :: E -> Bool Source #

isList :: E -> Bool Source #

isSet :: E -> Bool Source #

isTuple :: E -> Bool Source #

isMaybe :: E -> Bool Source #

isEither :: E -> Bool Source #

showType :: E -> String Source #

HasKind U Source # |

Instance details

Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic

Methods

kindOf :: U -> Kind Source #

hasSign :: U -> Bool Source #

intSizeOf :: U -> Int Source #

isBoolean :: U -> Bool Source #

isBounded :: U -> Bool Source #

isReal :: U -> Bool Source #

isFloat :: U -> Bool Source #

isDouble :: U -> Bool Source #

isRational :: U -> Bool Source #

isFP :: U -> Bool Source #

isUnbounded :: U -> Bool Source #

isUserSort :: U -> Bool Source #

isChar :: U -> Bool Source #

isString :: U -> Bool Source #

isList :: U -> Bool Source #

isSet :: U -> Bool Source #

isTuple :: U -> Bool Source #

isMaybe :: U -> Bool Source #

isEither :: U -> Bool Source #

showType :: U -> String Source #

HasKind V Source # |

Instance details

Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic

Methods

kindOf :: V -> Kind Source #

hasSign :: V -> Bool Source #

intSizeOf :: V -> Int Source #

isBoolean :: V -> Bool Source #

isBounded :: V -> Bool Source #

isReal :: V -> Bool Source #

isFloat :: V -> Bool Source #

isDouble :: V -> Bool Source #

isRational :: V -> Bool Source #

isFP :: V -> Bool Source #

isUnbounded :: V -> Bool Source #

isUserSort :: V -> Bool Source #

isChar :: V -> Bool Source #

isString :: V -> Bool Source #

isList :: V -> Bool Source #

isSet :: V -> Bool Source #

isTuple :: V -> Bool Source #

isMaybe :: V -> Bool Source #

isEither :: V -> Bool Source #

showType :: V -> String Source #

HasKind HumanHeightInCm Source # | Symbolic instance simply follows the underlying type, just like `Metres`.

Instance details

Defined in Documentation.SBV.Examples.Misc.Newtypes

Methods

kindOf :: HumanHeightInCm -> Kind Source #

hasSign :: HumanHeightInCm -> Bool Source #

intSizeOf :: HumanHeightInCm -> Int Source #

isBoolean :: HumanHeightInCm -> Bool Source #

isBounded :: HumanHeightInCm -> Bool Source #

isReal :: HumanHeightInCm -> Bool Source #

isFloat :: HumanHeightInCm -> Bool Source #

isDouble :: HumanHeightInCm -> Bool Source #

isRational :: HumanHeightInCm -> Bool Source #

isFP :: HumanHeightInCm -> Bool Source #

isUnbounded :: HumanHeightInCm -> Bool Source #

isUserSort :: HumanHeightInCm -> Bool Source #

isChar :: HumanHeightInCm -> Bool Source #

isString :: HumanHeightInCm -> Bool Source #

isList :: HumanHeightInCm -> Bool Source #

isSet :: HumanHeightInCm -> Bool Source #

isTuple :: HumanHeightInCm -> Bool Source #

isMaybe :: HumanHeightInCm -> Bool Source #

isEither :: HumanHeightInCm -> Bool Source #

showType :: HumanHeightInCm -> String Source #

HasKind Metres Source # | To use `Metres` symbolically, we associate it with the underlying symbolic type's kind.

Instance details

Defined in Documentation.SBV.Examples.Misc.Newtypes

Methods

kindOf :: Metres -> Kind Source #

hasSign :: Metres -> Bool Source #

intSizeOf :: Metres -> Int Source #

isBoolean :: Metres -> Bool Source #

isBounded :: Metres -> Bool Source #

isReal :: Metres -> Bool Source #

isFloat :: Metres -> Bool Source #

isDouble :: Metres -> Bool Source #

isRational :: Metres -> Bool Source #

isFP :: Metres -> Bool Source #

isUnbounded :: Metres -> Bool Source #

isUserSort :: Metres -> Bool Source #

isChar :: Metres -> Bool Source #

isString :: Metres -> Bool Source #

isList :: Metres -> Bool Source #

isSet :: Metres -> Bool Source #

isTuple :: Metres -> Bool Source #

isMaybe :: Metres -> Bool Source #

isEither :: Metres -> Bool Source #

showType :: Metres -> String Source #

HasKind Day Source # |

Instance details

Defined in Documentation.SBV.Examples.Optimization.Enumerate

Methods

kindOf :: Day -> Kind Source #

hasSign :: Day -> Bool Source #

intSizeOf :: Day -> Int Source #

isBoolean :: Day -> Bool Source #

isBounded :: Day -> Bool Source #

isReal :: Day -> Bool Source #

isFloat :: Day -> Bool Source #

isDouble :: Day -> Bool Source #

isRational :: Day -> Bool Source #

isFP :: Day -> Bool Source #

isUnbounded :: Day -> Bool Source #

isUserSort :: Day -> Bool Source #

isChar :: Day -> Bool Source #

isString :: Day -> Bool Source #

isList :: Day -> Bool Source #

isSet :: Day -> Bool Source #

isTuple :: Day -> Bool Source #

isMaybe :: Day -> Bool Source #

isEither :: Day -> Bool Source #

showType :: Day -> String Source #

HasKind Day Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Birthday

Methods

kindOf :: Day -> Kind Source #

hasSign :: Day -> Bool Source #

intSizeOf :: Day -> Int Source #

isBoolean :: Day -> Bool Source #

isBounded :: Day -> Bool Source #

isReal :: Day -> Bool Source #

isFloat :: Day -> Bool Source #

isDouble :: Day -> Bool Source #

isRational :: Day -> Bool Source #

isFP :: Day -> Bool Source #

isUnbounded :: Day -> Bool Source #

isUserSort :: Day -> Bool Source #

isChar :: Day -> Bool Source #

isString :: Day -> Bool Source #

isList :: Day -> Bool Source #

isSet :: Day -> Bool Source #

isTuple :: Day -> Bool Source #

isMaybe :: Day -> Bool Source #

isEither :: Day -> Bool Source #

showType :: Day -> String Source #

HasKind Month Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Birthday

Methods

kindOf :: Month -> Kind Source #

hasSign :: Month -> Bool Source #

intSizeOf :: Month -> Int Source #

isBoolean :: Month -> Bool Source #

isBounded :: Month -> Bool Source #

isReal :: Month -> Bool Source #

isFloat :: Month -> Bool Source #

isDouble :: Month -> Bool Source #

isRational :: Month -> Bool Source #

isFP :: Month -> Bool Source #

isUnbounded :: Month -> Bool Source #

isUserSort :: Month -> Bool Source #

isChar :: Month -> Bool Source #

isString :: Month -> Bool Source #

isList :: Month -> Bool Source #

isSet :: Month -> Bool Source #

isTuple :: Month -> Bool Source #

isMaybe :: Month -> Bool Source #

isEither :: Month -> Bool Source #

showType :: Month -> String Source #

HasKind P Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Drinker

Methods

kindOf :: P -> Kind Source #

hasSign :: P -> Bool Source #

intSizeOf :: P -> Int Source #

isBoolean :: P -> Bool Source #

isBounded :: P -> Bool Source #

isReal :: P -> Bool Source #

isFloat :: P -> Bool Source #

isDouble :: P -> Bool Source #

isRational :: P -> Bool Source #

isFP :: P -> Bool Source #

isUnbounded :: P -> Bool Source #

isUserSort :: P -> Bool Source #

isChar :: P -> Bool Source #

isString :: P -> Bool Source #

isList :: P -> Bool Source #

isSet :: P -> Bool Source #

isTuple :: P -> Bool Source #

isMaybe :: P -> Bool Source #

isEither :: P -> Bool Source #

showType :: P -> String Source #

HasKind Beverage Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

kindOf :: Beverage -> Kind Source #

hasSign :: Beverage -> Bool Source #

intSizeOf :: Beverage -> Int Source #

isBoolean :: Beverage -> Bool Source #

isBounded :: Beverage -> Bool Source #

isReal :: Beverage -> Bool Source #

isFloat :: Beverage -> Bool Source #

isDouble :: Beverage -> Bool Source #

isRational :: Beverage -> Bool Source #

isFP :: Beverage -> Bool Source #

isUnbounded :: Beverage -> Bool Source #

isUserSort :: Beverage -> Bool Source #

isChar :: Beverage -> Bool Source #

isString :: Beverage -> Bool Source #

isList :: Beverage -> Bool Source #

isSet :: Beverage -> Bool Source #

isTuple :: Beverage -> Bool Source #

isMaybe :: Beverage -> Bool Source #

isEither :: Beverage -> Bool Source #

showType :: Beverage -> String Source #

HasKind Color Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

kindOf :: Color -> Kind Source #

hasSign :: Color -> Bool Source #

intSizeOf :: Color -> Int Source #

isBoolean :: Color -> Bool Source #

isBounded :: Color -> Bool Source #

isReal :: Color -> Bool Source #

isFloat :: Color -> Bool Source #

isDouble :: Color -> Bool Source #

isRational :: Color -> Bool Source #

isFP :: Color -> Bool Source #

isUnbounded :: Color -> Bool Source #

isUserSort :: Color -> Bool Source #

isChar :: Color -> Bool Source #

isString :: Color -> Bool Source #

isList :: Color -> Bool Source #

isSet :: Color -> Bool Source #

isTuple :: Color -> Bool Source #

isMaybe :: Color -> Bool Source #

isEither :: Color -> Bool Source #

showType :: Color -> String Source #

HasKind Nationality Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

kindOf :: Nationality -> Kind Source #

hasSign :: Nationality -> Bool Source #

intSizeOf :: Nationality -> Int Source #

isBoolean :: Nationality -> Bool Source #

isBounded :: Nationality -> Bool Source #

isReal :: Nationality -> Bool Source #

isFloat :: Nationality -> Bool Source #

isDouble :: Nationality -> Bool Source #

isRational :: Nationality -> Bool Source #

isFP :: Nationality -> Bool Source #

isUnbounded :: Nationality -> Bool Source #

isUserSort :: Nationality -> Bool Source #

isChar :: Nationality -> Bool Source #

isString :: Nationality -> Bool Source #

isList :: Nationality -> Bool Source #

isSet :: Nationality -> Bool Source #

isTuple :: Nationality -> Bool Source #

isMaybe :: Nationality -> Bool Source #

isEither :: Nationality -> Bool Source #

showType :: Nationality -> String Source #

HasKind Pet Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

kindOf :: Pet -> Kind Source #

hasSign :: Pet -> Bool Source #

intSizeOf :: Pet -> Int Source #

isBoolean :: Pet -> Bool Source #

isBounded :: Pet -> Bool Source #

isReal :: Pet -> Bool Source #

isFloat :: Pet -> Bool Source #

isDouble :: Pet -> Bool Source #

isRational :: Pet -> Bool Source #

isFP :: Pet -> Bool Source #

isUnbounded :: Pet -> Bool Source #

isUserSort :: Pet -> Bool Source #

isChar :: Pet -> Bool Source #

isString :: Pet -> Bool Source #

isList :: Pet -> Bool Source #

isSet :: Pet -> Bool Source #

isTuple :: Pet -> Bool Source #

isMaybe :: Pet -> Bool Source #

isEither :: Pet -> Bool Source #

showType :: Pet -> String Source #

HasKind Sport Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

kindOf :: Sport -> Kind Source #

hasSign :: Sport -> Bool Source #

intSizeOf :: Sport -> Int Source #

isBoolean :: Sport -> Bool Source #

isBounded :: Sport -> Bool Source #

isReal :: Sport -> Bool Source #

isFloat :: Sport -> Bool Source #

isDouble :: Sport -> Bool Source #

isRational :: Sport -> Bool Source #

isFP :: Sport -> Bool Source #

isUnbounded :: Sport -> Bool Source #

isUserSort :: Sport -> Bool Source #

isChar :: Sport -> Bool Source #

isString :: Sport -> Bool Source #

isList :: Sport -> Bool Source #

isSet :: Sport -> Bool Source #

isTuple :: Sport -> Bool Source #

isMaybe :: Sport -> Bool Source #

isEither :: Sport -> Bool Source #

showType :: Sport -> String Source #

HasKind Color Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Garden

Methods

kindOf :: Color -> Kind Source #

hasSign :: Color -> Bool Source #

intSizeOf :: Color -> Int Source #

isBoolean :: Color -> Bool Source #

isBounded :: Color -> Bool Source #

isReal :: Color -> Bool Source #

isFloat :: Color -> Bool Source #

isDouble :: Color -> Bool Source #

isRational :: Color -> Bool Source #

isFP :: Color -> Bool Source #

isUnbounded :: Color -> Bool Source #

isUserSort :: Color -> Bool Source #

isChar :: Color -> Bool Source #

isString :: Color -> Bool Source #

isList :: Color -> Bool Source #

isSet :: Color -> Bool Source #

isTuple :: Color -> Bool Source #

isMaybe :: Color -> Bool Source #

isEither :: Color -> Bool Source #

showType :: Color -> String Source #

HasKind Color Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.HexPuzzle

Methods

kindOf :: Color -> Kind Source #

hasSign :: Color -> Bool Source #

intSizeOf :: Color -> Int Source #

isBoolean :: Color -> Bool Source #

isBounded :: Color -> Bool Source #

isReal :: Color -> Bool Source #

isFloat :: Color -> Bool Source #

isDouble :: Color -> Bool Source #

isRational :: Color -> Bool Source #

isFP :: Color -> Bool Source #

isUnbounded :: Color -> Bool Source #

isUserSort :: Color -> Bool Source #

isChar :: Color -> Bool Source #

isString :: Color -> Bool Source #

isList :: Color -> Bool Source #

isSet :: Color -> Bool Source #

isTuple :: Color -> Bool Source #

isMaybe :: Color -> Bool Source #

isEither :: Color -> Bool Source #

showType :: Color -> String Source #

HasKind Identity Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves

Methods

kindOf :: Identity -> Kind Source #

hasSign :: Identity -> Bool Source #

intSizeOf :: Identity -> Int Source #

isBoolean :: Identity -> Bool Source #

isBounded :: Identity -> Bool Source #

isReal :: Identity -> Bool Source #

isFloat :: Identity -> Bool Source #

isDouble :: Identity -> Bool Source #

isRational :: Identity -> Bool Source #

isFP :: Identity -> Bool Source #

isUnbounded :: Identity -> Bool Source #

isUserSort :: Identity -> Bool Source #

isChar :: Identity -> Bool Source #

isString :: Identity -> Bool Source #

isList :: Identity -> Bool Source #

isSet :: Identity -> Bool Source #

isTuple :: Identity -> Bool Source #

isMaybe :: Identity -> Bool Source #

isEither :: Identity -> Bool Source #

showType :: Identity -> String Source #

HasKind Inhabitant Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves

Methods

kindOf :: Inhabitant -> Kind Source #

hasSign :: Inhabitant -> Bool Source #

intSizeOf :: Inhabitant -> Int Source #

isBoolean :: Inhabitant -> Bool Source #

isBounded :: Inhabitant -> Bool Source #

isReal :: Inhabitant -> Bool Source #

isFloat :: Inhabitant -> Bool Source #

isDouble :: Inhabitant -> Bool Source #

isRational :: Inhabitant -> Bool Source #

isFP :: Inhabitant -> Bool Source #

isUnbounded :: Inhabitant -> Bool Source #

isUserSort :: Inhabitant -> Bool Source #

isChar :: Inhabitant -> Bool Source #

isString :: Inhabitant -> Bool Source #

isList :: Inhabitant -> Bool Source #

isSet :: Inhabitant -> Bool Source #

isTuple :: Inhabitant -> Bool Source #

isMaybe :: Inhabitant -> Bool Source #

isEither :: Inhabitant -> Bool Source #

showType :: Inhabitant -> String Source #

HasKind Statement Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves

Methods

kindOf :: Statement -> Kind Source #

hasSign :: Statement -> Bool Source #

intSizeOf :: Statement -> Int Source #

isBoolean :: Statement -> Bool Source #

isBounded :: Statement -> Bool Source #

isReal :: Statement -> Bool Source #

isFloat :: Statement -> Bool Source #

isDouble :: Statement -> Bool Source #

isRational :: Statement -> Bool Source #

isFP :: Statement -> Bool Source #

isUnbounded :: Statement -> Bool Source #

isUserSort :: Statement -> Bool Source #

isChar :: Statement -> Bool Source #

isString :: Statement -> Bool Source #

isList :: Statement -> Bool Source #

isSet :: Statement -> Bool Source #

isTuple :: Statement -> Bool Source #

isMaybe :: Statement -> Bool Source #

isEither :: Statement -> Bool Source #

showType :: Statement -> String Source #

HasKind Location Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Murder

Methods

kindOf :: Location -> Kind Source #

hasSign :: Location -> Bool Source #

intSizeOf :: Location -> Int Source #

isBoolean :: Location -> Bool Source #

isBounded :: Location -> Bool Source #

isReal :: Location -> Bool Source #

isFloat :: Location -> Bool Source #

isDouble :: Location -> Bool Source #

isRational :: Location -> Bool Source #

isFP :: Location -> Bool Source #

isUnbounded :: Location -> Bool Source #

isUserSort :: Location -> Bool Source #

isChar :: Location -> Bool Source #

isString :: Location -> Bool Source #

isList :: Location -> Bool Source #

isSet :: Location -> Bool Source #

isTuple :: Location -> Bool Source #

isMaybe :: Location -> Bool Source #

isEither :: Location -> Bool Source #

showType :: Location -> String Source #

HasKind Role Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Murder

Methods

kindOf :: Role -> Kind Source #

hasSign :: Role -> Bool Source #

intSizeOf :: Role -> Int Source #

isBoolean :: Role -> Bool Source #

isBounded :: Role -> Bool Source #

isReal :: Role -> Bool Source #

isFloat :: Role -> Bool Source #

isDouble :: Role -> Bool Source #

isRational :: Role -> Bool Source #

isFP :: Role -> Bool Source #

isUnbounded :: Role -> Bool Source #

isUserSort :: Role -> Bool Source #

isChar :: Role -> Bool Source #

isString :: Role -> Bool Source #

isList :: Role -> Bool Source #

isSet :: Role -> Bool Source #

isTuple :: Role -> Bool Source #

isMaybe :: Role -> Bool Source #

isEither :: Role -> Bool Source #

showType :: Role -> String Source #

HasKind Sex Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Murder

Methods

kindOf :: Sex -> Kind Source #

hasSign :: Sex -> Bool Source #

intSizeOf :: Sex -> Int Source #

isBoolean :: Sex -> Bool Source #

isBounded :: Sex -> Bool Source #

isReal :: Sex -> Bool Source #

isFloat :: Sex -> Bool Source #

isDouble :: Sex -> Bool Source #

isRational :: Sex -> Bool Source #

isFP :: Sex -> Bool Source #

isUnbounded :: Sex -> Bool Source #

isUserSort :: Sex -> Bool Source #

isChar :: Sex -> Bool Source #

isString :: Sex -> Bool Source #

isList :: Sex -> Bool Source #

isSet :: Sex -> Bool Source #

isTuple :: Sex -> Bool Source #

isMaybe :: Sex -> Bool Source #

isEither :: Sex -> Bool Source #

showType :: Sex -> String Source #

HasKind Handler Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

Methods

kindOf :: Handler -> Kind Source #

hasSign :: Handler -> Bool Source #

intSizeOf :: Handler -> Int Source #

isBoolean :: Handler -> Bool Source #

isBounded :: Handler -> Bool Source #

isReal :: Handler -> Bool Source #

isFloat :: Handler -> Bool Source #

isDouble :: Handler -> Bool Source #

isRational :: Handler -> Bool Source #

isFP :: Handler -> Bool Source #

isUnbounded :: Handler -> Bool Source #

isUserSort :: Handler -> Bool Source #

isChar :: Handler -> Bool Source #

isString :: Handler -> Bool Source #

isList :: Handler -> Bool Source #

isSet :: Handler -> Bool Source #

isTuple :: Handler -> Bool Source #

isMaybe :: Handler -> Bool Source #

isEither :: Handler -> Bool Source #

showType :: Handler -> String Source #

HasKind Location Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

Methods

kindOf :: Location -> Kind Source #

hasSign :: Location -> Bool Source #

intSizeOf :: Location -> Int Source #

isBoolean :: Location -> Bool Source #

isBounded :: Location -> Bool Source #

isReal :: Location -> Bool Source #

isFloat :: Location -> Bool Source #

isDouble :: Location -> Bool Source #

isRational :: Location -> Bool Source #

isFP :: Location -> Bool Source #

isUnbounded :: Location -> Bool Source #

isUserSort :: Location -> Bool Source #

isChar :: Location -> Bool Source #

isString :: Location -> Bool Source #

isList :: Location -> Bool Source #

isSet :: Location -> Bool Source #

isTuple :: Location -> Bool Source #

isMaybe :: Location -> Bool Source #

isEither :: Location -> Bool Source #

showType :: Location -> String Source #

HasKind Orangutan Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

Methods

kindOf :: Orangutan -> Kind Source #

hasSign :: Orangutan -> Bool Source #

intSizeOf :: Orangutan -> Int Source #

isBoolean :: Orangutan -> Bool Source #

isBounded :: Orangutan -> Bool Source #

isReal :: Orangutan -> Bool Source #

isFloat :: Orangutan -> Bool Source #

isDouble :: Orangutan -> Bool Source #

isRational :: Orangutan -> Bool Source #

isFP :: Orangutan -> Bool Source #

isUnbounded :: Orangutan -> Bool Source #

isUserSort :: Orangutan -> Bool Source #

isChar :: Orangutan -> Bool Source #

isString :: Orangutan -> Bool Source #

isList :: Orangutan -> Bool Source #

isSet :: Orangutan -> Bool Source #

isTuple :: Orangutan -> Bool Source #

isMaybe :: Orangutan -> Bool Source #

isEither :: Orangutan -> Bool Source #

showType :: Orangutan -> String Source #

HasKind Rabbit Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Rabbits

Methods

kindOf :: Rabbit -> Kind Source #

hasSign :: Rabbit -> Bool Source #

intSizeOf :: Rabbit -> Int Source #

isBoolean :: Rabbit -> Bool Source #

isBounded :: Rabbit -> Bool Source #

isReal :: Rabbit -> Bool Source #

isFloat :: Rabbit -> Bool Source #

isDouble :: Rabbit -> Bool Source #

isRational :: Rabbit -> Bool Source #

isFP :: Rabbit -> Bool Source #

isUnbounded :: Rabbit -> Bool Source #

isUserSort :: Rabbit -> Bool Source #

isChar :: Rabbit -> Bool Source #

isString :: Rabbit -> Bool Source #

isList :: Rabbit -> Bool Source #

isSet :: Rabbit -> Bool Source #

isTuple :: Rabbit -> Bool Source #

isMaybe :: Rabbit -> Bool Source #

isEither :: Rabbit -> Bool Source #

showType :: Rabbit -> String Source #

HasKind Location Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

Methods

kindOf :: Location -> Kind Source #

hasSign :: Location -> Bool Source #

intSizeOf :: Location -> Int Source #

isBoolean :: Location -> Bool Source #

isBounded :: Location -> Bool Source #

isReal :: Location -> Bool Source #

isFloat :: Location -> Bool Source #

isDouble :: Location -> Bool Source #

isRational :: Location -> Bool Source #

isFP :: Location -> Bool Source #

isUnbounded :: Location -> Bool Source #

isUserSort :: Location -> Bool Source #

isChar :: Location -> Bool Source #

isString :: Location -> Bool Source #

isList :: Location -> Bool Source #

isSet :: Location -> Bool Source #

isTuple :: Location -> Bool Source #

isMaybe :: Location -> Bool Source #

isEither :: Location -> Bool Source #

showType :: Location -> String Source #

HasKind U2Member Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

Methods

kindOf :: U2Member -> Kind Source #

hasSign :: U2Member -> Bool Source #

intSizeOf :: U2Member -> Int Source #

isBoolean :: U2Member -> Bool Source #

isBounded :: U2Member -> Bool Source #

isReal :: U2Member -> Bool Source #

isFloat :: U2Member -> Bool Source #

isDouble :: U2Member -> Bool Source #

isRational :: U2Member -> Bool Source #

isFP :: U2Member -> Bool Source #

isUnbounded :: U2Member -> Bool Source #

isUserSort :: U2Member -> Bool Source #

isChar :: U2Member -> Bool Source #

isString :: U2Member -> Bool Source #

isList :: U2Member -> Bool Source #

isSet :: U2Member -> Bool Source #

isTuple :: U2Member -> Bool Source #

isMaybe :: U2Member -> Bool Source #

isEither :: U2Member -> Bool Source #

showType :: U2Member -> String Source #

HasKind Day Source # |

Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

kindOf :: Day -> Kind Source #

hasSign :: Day -> Bool Source #

intSizeOf :: Day -> Int Source #

isBoolean :: Day -> Bool Source #

isBounded :: Day -> Bool Source #

isReal :: Day -> Bool Source #

isFloat :: Day -> Bool Source #

isDouble :: Day -> Bool Source #

isRational :: Day -> Bool Source #

isFP :: Day -> Bool Source #

isUnbounded :: Day -> Bool Source #

isUserSort :: Day -> Bool Source #

isChar :: Day -> Bool Source #

isString :: Day -> Bool Source #

isList :: Day -> Bool Source #

isSet :: Day -> Bool Source #

isTuple :: Day -> Bool Source #

isMaybe :: Day -> Bool Source #

isEither :: Day -> Bool Source #

showType :: Day -> String Source #

HasKind BinOp Source # |

Instance details

Defined in Documentation.SBV.Examples.Queries.FourFours

Methods

kindOf :: BinOp -> Kind Source #

hasSign :: BinOp -> Bool Source #

intSizeOf :: BinOp -> Int Source #

isBoolean :: BinOp -> Bool Source #

isBounded :: BinOp -> Bool Source #

isReal :: BinOp -> Bool Source #

isFloat :: BinOp -> Bool Source #

isDouble :: BinOp -> Bool Source #

isRational :: BinOp -> Bool Source #

isFP :: BinOp -> Bool Source #

isUnbounded :: BinOp -> Bool Source #

isUserSort :: BinOp -> Bool Source #

isChar :: BinOp -> Bool Source #

isString :: BinOp -> Bool Source #

isList :: BinOp -> Bool Source #

isSet :: BinOp -> Bool Source #

isTuple :: BinOp -> Bool Source #

isMaybe :: BinOp -> Bool Source #

isEither :: BinOp -> Bool Source #

showType :: BinOp -> String Source #

HasKind UnOp Source # |

Instance details

Defined in Documentation.SBV.Examples.Queries.FourFours

Methods

kindOf :: UnOp -> Kind Source #

hasSign :: UnOp -> Bool Source #

intSizeOf :: UnOp -> Int Source #

isBoolean :: UnOp -> Bool Source #

isBounded :: UnOp -> Bool Source #

isReal :: UnOp -> Bool Source #

isFloat :: UnOp -> Bool Source #

isDouble :: UnOp -> Bool Source #

isRational :: UnOp -> Bool Source #

isFP :: UnOp -> Bool Source #

isUnbounded :: UnOp -> Bool Source #

isUserSort :: UnOp -> Bool Source #

isChar :: UnOp -> Bool Source #

isString :: UnOp -> Bool Source #

isList :: UnOp -> Bool Source #

isSet :: UnOp -> Bool Source #

isTuple :: UnOp -> Bool Source #

isMaybe :: UnOp -> Bool Source #

isEither :: UnOp -> Bool Source #

showType :: UnOp -> String Source #

HasKind B Source # |

Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.Deduce

Methods

kindOf :: B -> Kind Source #

hasSign :: B -> Bool Source #

intSizeOf :: B -> Int Source #

isBoolean :: B -> Bool Source #

isBounded :: B -> Bool Source #

isReal :: B -> Bool Source #

isFloat :: B -> Bool Source #

isDouble :: B -> Bool Source #

isRational :: B -> Bool Source #

isFP :: B -> Bool Source #

isUnbounded :: B -> Bool Source #

isUserSort :: B -> Bool Source #

isChar :: B -> Bool Source #

isString :: B -> Bool Source #

isList :: B -> Bool Source #

isSet :: B -> Bool Source #

isTuple :: B -> Bool Source #

isMaybe :: B -> Bool Source #

isEither :: B -> Bool Source #

showType :: B -> String Source #

HasKind Q Source # |

Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.Sort

Methods

kindOf :: Q -> Kind Source #

hasSign :: Q -> Bool Source #

intSizeOf :: Q -> Int Source #

isBoolean :: Q -> Bool Source #

isBounded :: Q -> Bool Source #

isReal :: Q -> Bool Source #

isFloat :: Q -> Bool Source #

isDouble :: Q -> Bool Source #

isRational :: Q -> Bool Source #

isFP :: Q -> Bool Source #

isUnbounded :: Q -> Bool Source #

isUserSort :: Q -> Bool Source #

isChar :: Q -> Bool Source #

isString :: Q -> Bool Source #

isList :: Q -> Bool Source #

isSet :: Q -> Bool Source #

isTuple :: Q -> Bool Source #

isMaybe :: Q -> Bool Source #

isEither :: Q -> Bool Source #

showType :: Q -> String Source #

HasKind L Source # |

Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.UISortAllSat

Methods

kindOf :: L -> Kind Source #

hasSign :: L -> Bool Source #

intSizeOf :: L -> Int Source #

isBoolean :: L -> Bool Source #

isBounded :: L -> Bool Source #

isReal :: L -> Bool Source #

isFloat :: L -> Bool Source #

isDouble :: L -> Bool Source #

isRational :: L -> Bool Source #

isFP :: L -> Bool Source #

isUnbounded :: L -> Bool Source #

isUserSort :: L -> Bool Source #

isChar :: L -> Bool Source #

isString :: L -> Bool Source #

isList :: L -> Bool Source #

isSet :: L -> Bool Source #

isTuple :: L -> Bool Source #

isMaybe :: L -> Bool Source #

isEither :: L -> Bool Source #

showType :: L -> String Source #

HasKind Integer Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Integer -> Kind Source #

hasSign :: Integer -> Bool Source #

intSizeOf :: Integer -> Int Source #

isBoolean :: Integer -> Bool Source #

isBounded :: Integer -> Bool Source #

isReal :: Integer -> Bool Source #

isFloat :: Integer -> Bool Source #

isDouble :: Integer -> Bool Source #

isRational :: Integer -> Bool Source #

isFP :: Integer -> Bool Source #

isUnbounded :: Integer -> Bool Source #

isUserSort :: Integer -> Bool Source #

isChar :: Integer -> Bool Source #

isString :: Integer -> Bool Source #

isList :: Integer -> Bool Source #

isSet :: Integer -> Bool Source #

isTuple :: Integer -> Bool Source #

isMaybe :: Integer -> Bool Source #

isEither :: Integer -> Bool Source #

showType :: Integer -> String Source #

HasKind () Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: () -> Kind Source #

hasSign :: () -> Bool Source #

intSizeOf :: () -> Int Source #

isBoolean :: () -> Bool Source #

isBounded :: () -> Bool Source #

isReal :: () -> Bool Source #

isFloat :: () -> Bool Source #

isDouble :: () -> Bool Source #

isRational :: () -> Bool Source #

isFP :: () -> Bool Source #

isUnbounded :: () -> Bool Source #

isUserSort :: () -> Bool Source #

isChar :: () -> Bool Source #

isString :: () -> Bool Source #

isList :: () -> Bool Source #

isSet :: () -> Bool Source #

isTuple :: () -> Bool Source #

isMaybe :: () -> Bool Source #

isEither :: () -> Bool Source #

showType :: () -> String Source #

HasKind Bool Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Bool -> Kind Source #

hasSign :: Bool -> Bool Source #

intSizeOf :: Bool -> Int Source #

isBoolean :: Bool -> Bool Source #

isBounded :: Bool -> Bool Source #

isReal :: Bool -> Bool Source #

isFloat :: Bool -> Bool Source #

isDouble :: Bool -> Bool Source #

isRational :: Bool -> Bool Source #

isFP :: Bool -> Bool Source #

isUnbounded :: Bool -> Bool Source #

isUserSort :: Bool -> Bool Source #

isChar :: Bool -> Bool Source #

isString :: Bool -> Bool Source #

isList :: Bool -> Bool Source #

isSet :: Bool -> Bool Source #

isTuple :: Bool -> Bool Source #

isMaybe :: Bool -> Bool Source #

isEither :: Bool -> Bool Source #

showType :: Bool -> String Source #

HasKind Char Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Char -> Kind Source #

hasSign :: Char -> Bool Source #

intSizeOf :: Char -> Int Source #

isBoolean :: Char -> Bool Source #

isBounded :: Char -> Bool Source #

isReal :: Char -> Bool Source #

isFloat :: Char -> Bool Source #

isDouble :: Char -> Bool Source #

isRational :: Char -> Bool Source #

isFP :: Char -> Bool Source #

isUnbounded :: Char -> Bool Source #

isUserSort :: Char -> Bool Source #

isChar :: Char -> Bool Source #

isString :: Char -> Bool Source #

isList :: Char -> Bool Source #

isSet :: Char -> Bool Source #

isTuple :: Char -> Bool Source #

isMaybe :: Char -> Bool Source #

isEither :: Char -> Bool Source #

showType :: Char -> String Source #

HasKind Double Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Double -> Kind Source #

hasSign :: Double -> Bool Source #

intSizeOf :: Double -> Int Source #

isBoolean :: Double -> Bool Source #

isBounded :: Double -> Bool Source #

isReal :: Double -> Bool Source #

isFloat :: Double -> Bool Source #

isDouble :: Double -> Bool Source #

isRational :: Double -> Bool Source #

isFP :: Double -> Bool Source #

isUnbounded :: Double -> Bool Source #

isUserSort :: Double -> Bool Source #

isChar :: Double -> Bool Source #

isString :: Double -> Bool Source #

isList :: Double -> Bool Source #

isSet :: Double -> Bool Source #

isTuple :: Double -> Bool Source #

isMaybe :: Double -> Bool Source #

isEither :: Double -> Bool Source #

showType :: Double -> String Source #

HasKind Float Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Float -> Kind Source #

hasSign :: Float -> Bool Source #

intSizeOf :: Float -> Int Source #

isBoolean :: Float -> Bool Source #

isBounded :: Float -> Bool Source #

isReal :: Float -> Bool Source #

isFloat :: Float -> Bool Source #

isDouble :: Float -> Bool Source #

isRational :: Float -> Bool Source #

isFP :: Float -> Bool Source #

isUnbounded :: Float -> Bool Source #

isUserSort :: Float -> Bool Source #

isChar :: Float -> Bool Source #

isString :: Float -> Bool Source #

isList :: Float -> Bool Source #

isSet :: Float -> Bool Source #

isTuple :: Float -> Bool Source #

isMaybe :: Float -> Bool Source #

isEither :: Float -> Bool Source #

showType :: Float -> String Source #

HasKind a => HasKind (RCSet a) Source # |

Instance details

Defined in Data.SBV.Core.Concrete

Methods

kindOf :: RCSet a -> Kind Source #

hasSign :: RCSet a -> Bool Source #

intSizeOf :: RCSet a -> Int Source #

isBoolean :: RCSet a -> Bool Source #

isBounded :: RCSet a -> Bool Source #

isReal :: RCSet a -> Bool Source #

isFloat :: RCSet a -> Bool Source #

isDouble :: RCSet a -> Bool Source #

isRational :: RCSet a -> Bool Source #

isFP :: RCSet a -> Bool Source #

isUnbounded :: RCSet a -> Bool Source #

isUserSort :: RCSet a -> Bool Source #

isChar :: RCSet a -> Bool Source #

isString :: RCSet a -> Bool Source #

isList :: RCSet a -> Bool Source #

isSet :: RCSet a -> Bool Source #

isTuple :: RCSet a -> Bool Source #

isMaybe :: RCSet a -> Bool Source #

isEither :: RCSet a -> Bool Source #

showType :: RCSet a -> String Source #

HasKind a => HasKind (SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Data

Methods

kindOf :: SBV a -> Kind Source #

hasSign :: SBV a -> Bool Source #

intSizeOf :: SBV a -> Int Source #

isBoolean :: SBV a -> Bool Source #

isBounded :: SBV a -> Bool Source #

isReal :: SBV a -> Bool Source #

isFloat :: SBV a -> Bool Source #

isDouble :: SBV a -> Bool Source #

isRational :: SBV a -> Bool Source #

isFP :: SBV a -> Bool Source #

isUnbounded :: SBV a -> Bool Source #

isUserSort :: SBV a -> Bool Source #

isChar :: SBV a -> Bool Source #

isString :: SBV a -> Bool Source #

isList :: SBV a -> Bool Source #

isSet :: SBV a -> Bool Source #

isTuple :: SBV a -> Bool Source #

isMaybe :: SBV a -> Bool Source #

isEither :: SBV a -> Bool Source #

showType :: SBV a -> String Source #

(KnownNat n, BVIsNonZero n) => HasKind (IntN n) Source # | `IntN` has a kind

Instance details

Defined in Data.SBV.Core.Sized

Methods

kindOf :: IntN n -> Kind Source #

hasSign :: IntN n -> Bool Source #

intSizeOf :: IntN n -> Int Source #

isBoolean :: IntN n -> Bool Source #

isBounded :: IntN n -> Bool Source #

isReal :: IntN n -> Bool Source #

isFloat :: IntN n -> Bool Source #

isDouble :: IntN n -> Bool Source #

isRational :: IntN n -> Bool Source #

isFP :: IntN n -> Bool Source #

isUnbounded :: IntN n -> Bool Source #

isUserSort :: IntN n -> Bool Source #

isChar :: IntN n -> Bool Source #

isString :: IntN n -> Bool Source #

isList :: IntN n -> Bool Source #

isSet :: IntN n -> Bool Source #

isTuple :: IntN n -> Bool Source #

isMaybe :: IntN n -> Bool Source #

isEither :: IntN n -> Bool Source #

showType :: IntN n -> String Source #

(KnownNat n, BVIsNonZero n) => HasKind (WordN n) Source # | `WordN` has a kind

Instance details

Defined in Data.SBV.Core.Sized

Methods

kindOf :: WordN n -> Kind Source #

hasSign :: WordN n -> Bool Source #

intSizeOf :: WordN n -> Int Source #

isBoolean :: WordN n -> Bool Source #

isBounded :: WordN n -> Bool Source #

isReal :: WordN n -> Bool Source #

isFloat :: WordN n -> Bool Source #

isDouble :: WordN n -> Bool Source #

isRational :: WordN n -> Bool Source #

isFP :: WordN n -> Bool Source #

isUnbounded :: WordN n -> Bool Source #

isUserSort :: WordN n -> Bool Source #

isChar :: WordN n -> Bool Source #

isString :: WordN n -> Bool Source #

isList :: WordN n -> Bool Source #

isSet :: WordN n -> Bool Source #

isTuple :: WordN n -> Bool Source #

isMaybe :: WordN n -> Bool Source #

isEither :: WordN n -> Bool Source #

showType :: WordN n -> String Source #

HasKind a => HasKind (Maybe a) Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Maybe a -> Kind Source #

hasSign :: Maybe a -> Bool Source #

intSizeOf :: Maybe a -> Int Source #

isBoolean :: Maybe a -> Bool Source #

isBounded :: Maybe a -> Bool Source #

isReal :: Maybe a -> Bool Source #

isFloat :: Maybe a -> Bool Source #

isDouble :: Maybe a -> Bool Source #

isRational :: Maybe a -> Bool Source #

isFP :: Maybe a -> Bool Source #

isUnbounded :: Maybe a -> Bool Source #

isUserSort :: Maybe a -> Bool Source #

isChar :: Maybe a -> Bool Source #

isString :: Maybe a -> Bool Source #

isList :: Maybe a -> Bool Source #

isSet :: Maybe a -> Bool Source #

isTuple :: Maybe a -> Bool Source #

isMaybe :: Maybe a -> Bool Source #

isEither :: Maybe a -> Bool Source #

showType :: Maybe a -> String Source #

(Typeable a, HasKind a) => HasKind [a] Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: [a] -> Kind Source #

hasSign :: [a] -> Bool Source #

intSizeOf :: [a] -> Int Source #

isBoolean :: [a] -> Bool Source #

isBounded :: [a] -> Bool Source #

isReal :: [a] -> Bool Source #

isFloat :: [a] -> Bool Source #

isDouble :: [a] -> Bool Source #

isRational :: [a] -> Bool Source #

isFP :: [a] -> Bool Source #

isUnbounded :: [a] -> Bool Source #

isUserSort :: [a] -> Bool Source #

isChar :: [a] -> Bool Source #

isString :: [a] -> Bool Source #

isList :: [a] -> Bool Source #

isSet :: [a] -> Bool Source #

isTuple :: [a] -> Bool Source #

isMaybe :: [a] -> Bool Source #

isEither :: [a] -> Bool Source #

showType :: [a] -> String Source #

(HasKind a, HasKind b) => HasKind (Either a b) Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Either a b -> Kind Source #

hasSign :: Either a b -> Bool Source #

intSizeOf :: Either a b -> Int Source #

isBoolean :: Either a b -> Bool Source #

isBounded :: Either a b -> Bool Source #

isReal :: Either a b -> Bool Source #

isFloat :: Either a b -> Bool Source #

isDouble :: Either a b -> Bool Source #

isRational :: Either a b -> Bool Source #

isFP :: Either a b -> Bool Source #

isUnbounded :: Either a b -> Bool Source #

isUserSort :: Either a b -> Bool Source #

isChar :: Either a b -> Bool Source #

isString :: Either a b -> Bool Source #

isList :: Either a b -> Bool Source #

isSet :: Either a b -> Bool Source #

isTuple :: Either a b -> Bool Source #

isMaybe :: Either a b -> Bool Source #

isEither :: Either a b -> Bool Source #

showType :: Either a b -> String Source #

HasKind a => HasKind (Proxy a) Source # | This instance allows us to use the `kindOf (Proxy @a)` idiom instead of the `kindOf (undefined :: a)`, which is safer and looks more idiomatic.

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Proxy a -> Kind Source #

hasSign :: Proxy a -> Bool Source #

intSizeOf :: Proxy a -> Int Source #

isBoolean :: Proxy a -> Bool Source #

isBounded :: Proxy a -> Bool Source #

isReal :: Proxy a -> Bool Source #

isFloat :: Proxy a -> Bool Source #

isDouble :: Proxy a -> Bool Source #

isRational :: Proxy a -> Bool Source #

isFP :: Proxy a -> Bool Source #

isUnbounded :: Proxy a -> Bool Source #

isUserSort :: Proxy a -> Bool Source #

isChar :: Proxy a -> Bool Source #

isString :: Proxy a -> Bool Source #

isList :: Proxy a -> Bool Source #

isSet :: Proxy a -> Bool Source #

isTuple :: Proxy a -> Bool Source #

isMaybe :: Proxy a -> Bool Source #

isEither :: Proxy a -> Bool Source #

showType :: Proxy a -> String Source #

ValidFloat eb sb => HasKind (FloatingPoint eb sb) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

kindOf :: FloatingPoint eb sb -> Kind Source #

hasSign :: FloatingPoint eb sb -> Bool Source #

intSizeOf :: FloatingPoint eb sb -> Int Source #

isBoolean :: FloatingPoint eb sb -> Bool Source #

isBounded :: FloatingPoint eb sb -> Bool Source #

isReal :: FloatingPoint eb sb -> Bool Source #

isFloat :: FloatingPoint eb sb -> Bool Source #

isDouble :: FloatingPoint eb sb -> Bool Source #

isRational :: FloatingPoint eb sb -> Bool Source #

isFP :: FloatingPoint eb sb -> Bool Source #

isUnbounded :: FloatingPoint eb sb -> Bool Source #

isUserSort :: FloatingPoint eb sb -> Bool Source #

isChar :: FloatingPoint eb sb -> Bool Source #

isString :: FloatingPoint eb sb -> Bool Source #

isList :: FloatingPoint eb sb -> Bool Source #

isSet :: FloatingPoint eb sb -> Bool Source #

isTuple :: FloatingPoint eb sb -> Bool Source #

isMaybe :: FloatingPoint eb sb -> Bool Source #

isEither :: FloatingPoint eb sb -> Bool Source #

showType :: FloatingPoint eb sb -> String Source #

(HasKind a, HasKind b) => HasKind (a, b) Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: (a, b) -> Kind Source #

hasSign :: (a, b) -> Bool Source #

intSizeOf :: (a, b) -> Int Source #

isBoolean :: (a, b) -> Bool Source #

isBounded :: (a, b) -> Bool Source #

isReal :: (a, b) -> Bool Source #

isFloat :: (a, b) -> Bool Source #

isDouble :: (a, b) -> Bool Source #

isRational :: (a, b) -> Bool Source #

isFP :: (a, b) -> Bool Source #

isUnbounded :: (a, b) -> Bool Source #

isUserSort :: (a, b) -> Bool Source #

isChar :: (a, b) -> Bool Source #

isString :: (a, b) -> Bool Source #

isList :: (a, b) -> Bool Source #

isSet :: (a, b) -> Bool Source #

isTuple :: (a, b) -> Bool Source #

isMaybe :: (a, b) -> Bool Source #

isEither :: (a, b) -> Bool Source #

showType :: (a, b) -> String Source #

(HasKind a, HasKind b, HasKind c) => HasKind (a, b, c) Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: (a, b, c) -> Kind Source #

hasSign :: (a, b, c) -> Bool Source #

intSizeOf :: (a, b, c) -> Int Source #

isBoolean :: (a, b, c) -> Bool Source #

isBounded :: (a, b, c) -> Bool Source #

isReal :: (a, b, c) -> Bool Source #

isFloat :: (a, b, c) -> Bool Source #

isDouble :: (a, b, c) -> Bool Source #

isRational :: (a, b, c) -> Bool Source #

isFP :: (a, b, c) -> Bool Source #

isUnbounded :: (a, b, c) -> Bool Source #

isUserSort :: (a, b, c) -> Bool Source #

isChar :: (a, b, c) -> Bool Source #

isString :: (a, b, c) -> Bool Source #

isList :: (a, b, c) -> Bool Source #

isSet :: (a, b, c) -> Bool Source #

isTuple :: (a, b, c) -> Bool Source #

isMaybe :: (a, b, c) -> Bool Source #

isEither :: (a, b, c) -> Bool Source #

showType :: (a, b, c) -> String Source #

(HasKind a, HasKind b, HasKind c, HasKind d) => HasKind (a, b, c, d) Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: (a, b, c, d) -> Kind Source #

hasSign :: (a, b, c, d) -> Bool Source #

intSizeOf :: (a, b, c, d) -> Int Source #

isBoolean :: (a, b, c, d) -> Bool Source #

isBounded :: (a, b, c, d) -> Bool Source #

isReal :: (a, b, c, d) -> Bool Source #

isFloat :: (a, b, c, d) -> Bool Source #

isDouble :: (a, b, c, d) -> Bool Source #

isRational :: (a, b, c, d) -> Bool Source #

isFP :: (a, b, c, d) -> Bool Source #

isUnbounded :: (a, b, c, d) -> Bool Source #

isUserSort :: (a, b, c, d) -> Bool Source #

isChar :: (a, b, c, d) -> Bool Source #

isString :: (a, b, c, d) -> Bool Source #

isList :: (a, b, c, d) -> Bool Source #

isSet :: (a, b, c, d) -> Bool Source #

isTuple :: (a, b, c, d) -> Bool Source #

isMaybe :: (a, b, c, d) -> Bool Source #

isEither :: (a, b, c, d) -> Bool Source #

showType :: (a, b, c, d) -> String Source #

(HasKind a, HasKind b, HasKind c, HasKind d, HasKind e) => HasKind (a, b, c, d, e) Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: (a, b, c, d, e) -> Kind Source #

hasSign :: (a, b, c, d, e) -> Bool Source #

intSizeOf :: (a, b, c, d, e) -> Int Source #

isBoolean :: (a, b, c, d, e) -> Bool Source #

isBounded :: (a, b, c, d, e) -> Bool Source #

isReal :: (a, b, c, d, e) -> Bool Source #

isFloat :: (a, b, c, d, e) -> Bool Source #

isDouble :: (a, b, c, d, e) -> Bool Source #

isRational :: (a, b, c, d, e) -> Bool Source #

isFP :: (a, b, c, d, e) -> Bool Source #

isUnbounded :: (a, b, c, d, e) -> Bool Source #

isUserSort :: (a, b, c, d, e) -> Bool Source #

isChar :: (a, b, c, d, e) -> Bool Source #

isString :: (a, b, c, d, e) -> Bool Source #

isList :: (a, b, c, d, e) -> Bool Source #

isSet :: (a, b, c, d, e) -> Bool Source #

isTuple :: (a, b, c, d, e) -> Bool Source #

isMaybe :: (a, b, c, d, e) -> Bool Source #

isEither :: (a, b, c, d, e) -> Bool Source #

showType :: (a, b, c, d, e) -> String Source #

(HasKind a, HasKind b, HasKind c, HasKind d, HasKind e, HasKind f) => HasKind (a, b, c, d, e, f) Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: (a, b, c, d, e, f) -> Kind Source #

hasSign :: (a, b, c, d, e, f) -> Bool Source #

intSizeOf :: (a, b, c, d, e, f) -> Int Source #

isBoolean :: (a, b, c, d, e, f) -> Bool Source #

isBounded :: (a, b, c, d, e, f) -> Bool Source #

isReal :: (a, b, c, d, e, f) -> Bool Source #

isFloat :: (a, b, c, d, e, f) -> Bool Source #

isDouble :: (a, b, c, d, e, f) -> Bool Source #

isRational :: (a, b, c, d, e, f) -> Bool Source #

isFP :: (a, b, c, d, e, f) -> Bool Source #

isUnbounded :: (a, b, c, d, e, f) -> Bool Source #

isUserSort :: (a, b, c, d, e, f) -> Bool Source #

isChar :: (a, b, c, d, e, f) -> Bool Source #

isString :: (a, b, c, d, e, f) -> Bool Source #

isList :: (a, b, c, d, e, f) -> Bool Source #

isSet :: (a, b, c, d, e, f) -> Bool Source #

isTuple :: (a, b, c, d, e, f) -> Bool Source #

isMaybe :: (a, b, c, d, e, f) -> Bool Source #

isEither :: (a, b, c, d, e, f) -> Bool Source #

showType :: (a, b, c, d, e, f) -> String Source #

(HasKind a, HasKind b, HasKind c, HasKind d, HasKind e, HasKind f, HasKind g) => HasKind (a, b, c, d, e, f, g) Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: (a, b, c, d, e, f, g) -> Kind Source #

hasSign :: (a, b, c, d, e, f, g) -> Bool Source #

intSizeOf :: (a, b, c, d, e, f, g) -> Int Source #

isBoolean :: (a, b, c, d, e, f, g) -> Bool Source #

isBounded :: (a, b, c, d, e, f, g) -> Bool Source #

isReal :: (a, b, c, d, e, f, g) -> Bool Source #

isFloat :: (a, b, c, d, e, f, g) -> Bool Source #

isDouble :: (a, b, c, d, e, f, g) -> Bool Source #

isRational :: (a, b, c, d, e, f, g) -> Bool Source #

isFP :: (a, b, c, d, e, f, g) -> Bool Source #

isUnbounded :: (a, b, c, d, e, f, g) -> Bool Source #

isUserSort :: (a, b, c, d, e, f, g) -> Bool Source #

isChar :: (a, b, c, d, e, f, g) -> Bool Source #

isString :: (a, b, c, d, e, f, g) -> Bool Source #

isList :: (a, b, c, d, e, f, g) -> Bool Source #

isSet :: (a, b, c, d, e, f, g) -> Bool Source #

isTuple :: (a, b, c, d, e, f, g) -> Bool Source #

isMaybe :: (a, b, c, d, e, f, g) -> Bool Source #

isEither :: (a, b, c, d, e, f, g) -> Bool Source #

showType :: (a, b, c, d, e, f, g) -> String Source #

(HasKind a, HasKind b, HasKind c, HasKind d, HasKind e, HasKind f, HasKind g, HasKind h) => HasKind (a, b, c, d, e, f, g, h) Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: (a, b, c, d, e, f, g, h) -> Kind Source #

hasSign :: (a, b, c, d, e, f, g, h) -> Bool Source #

intSizeOf :: (a, b, c, d, e, f, g, h) -> Int Source #

isBoolean :: (a, b, c, d, e, f, g, h) -> Bool Source #

isBounded :: (a, b, c, d, e, f, g, h) -> Bool Source #

isReal :: (a, b, c, d, e, f, g, h) -> Bool Source #

isFloat :: (a, b, c, d, e, f, g, h) -> Bool Source #

isDouble :: (a, b, c, d, e, f, g, h) -> Bool Source #

isRational :: (a, b, c, d, e, f, g, h) -> Bool Source #

isFP :: (a, b, c, d, e, f, g, h) -> Bool Source #

isUnbounded :: (a, b, c, d, e, f, g, h) -> Bool Source #

isUserSort :: (a, b, c, d, e, f, g, h) -> Bool Source #

isChar :: (a, b, c, d, e, f, g, h) -> Bool Source #

isString :: (a, b, c, d, e, f, g, h) -> Bool Source #

isList :: (a, b, c, d, e, f, g, h) -> Bool Source #

isSet :: (a, b, c, d, e, f, g, h) -> Bool Source #

isTuple :: (a, b, c, d, e, f, g, h) -> Bool Source #

isMaybe :: (a, b, c, d, e, f, g, h) -> Bool Source #

isEither :: (a, b, c, d, e, f, g, h) -> Bool Source #

showType :: (a, b, c, d, e, f, g, h) -> String Source #

data Kind Source #

Kind of symbolic value

Constructors

KBool |
KBounded !Bool !Int |
KUnbounded |
KReal |
KUserSort String (Maybe [String]) |
KFloat |
KDouble |
KFP !Int !Int |
KChar |
KString |
KList Kind |
KSet Kind |
KTuple [Kind] |
KMaybe Kind |
KRational |
KEither Kind Kind |

#### Instances

Instances details

Data Kind Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Kind -> c Kind Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Kind Source #

toConstr :: Kind -> Constr Source #

dataTypeOf :: Kind -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Kind) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Kind) Source #

gmapT :: (forall b. Data b => b -> b) -> Kind -> Kind Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Kind -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Kind -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Kind -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Kind -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Kind -> m Kind Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Kind -> m Kind Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Kind -> m Kind Source #

Show Kind Source # | The interesting about the show instance is that it can tell apart two kinds nicely; since it conveniently ignores the enumeration constructors. Also, when we construct a `KUserSort`, we make sure we don't use any of the reserved names; see `constructUKind` for details.
Instance details Defined in Data.SBV.Core.Kind Methods showsPrec :: Int -> Kind -> ShowS Source # show :: Kind -> String Source # showList :: [Kind] -> ShowS Source #
NFData Kind Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Kind -> () Source #
Eq Kind Source # |
Instance details Defined in Data.SBV.Core.Kind Methods (==) :: Kind -> Kind -> Bool Source # (/=) :: Kind -> Kind -> Bool Source #
Ord Kind Source # |
Instance details Defined in Data.SBV.Core.Kind Methods compare :: Kind -> Kind -> Ordering Source # (<) :: Kind -> Kind -> Bool Source # (<=) :: Kind -> Kind -> Bool Source # (>) :: Kind -> Kind -> Bool Source # (>=) :: Kind -> Kind -> Bool Source # max :: Kind -> Kind -> Kind Source # min :: Kind -> Kind -> Kind Source #
HasKind Kind Source # |

Instance details

Defined in Data.SBV.Core.Kind

Methods

kindOf :: Kind -> Kind Source #

hasSign :: Kind -> Bool Source #

intSizeOf :: Kind -> Int Source #

isBoolean :: Kind -> Bool Source #

isBounded :: Kind -> Bool Source #

isReal :: Kind -> Bool Source #

isFloat :: Kind -> Bool Source #

isDouble :: Kind -> Bool Source #

isRational :: Kind -> Bool Source #

isFP :: Kind -> Bool Source #

isUnbounded :: Kind -> Bool Source #

isUserSort :: Kind -> Bool Source #

isChar :: Kind -> Bool Source #

isString :: Kind -> Bool Source #

isList :: Kind -> Bool Source #

isSet :: Kind -> Bool Source #

isTuple :: Kind -> Bool Source #

isMaybe :: Kind -> Bool Source #

isEither :: Kind -> Bool Source #

showType :: Kind -> String Source #

class (HasKind a, Typeable a) => SymVal a where Source #

A `SymVal` is a potential symbolic value that can be created instances of to be fed to a symbolic program.

Minimal complete definition

Nothing

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV a) Source #

Generalization of `mkSymVal`

default mkSymVal :: (MonadSymbolic m, Read a, Data a) => VarContext -> Maybe String -> m (SBV a) Source #

literal :: a -> SBV a Source #

Turn a literal constant to symbolic

default literal :: Show a => a -> SBV a Source #

fromCV :: CV -> a Source #

Extract a literal, from a CV representation

default fromCV :: Read a => CV -> a Source #

isConcretely :: SBV a -> (a -> Bool) -> Bool Source #

Does it concretely satisfy the given predicate?

free :: MonadSymbolic m => String -> m (SBV a) Source #

Generalization of `free`

free_ :: MonadSymbolic m => m (SBV a) Source #

Generalization of `free_`

mkFreeVars :: MonadSymbolic m => Int -> m [SBV a] Source #

Generalization of `mkFreeVars`

symbolic :: MonadSymbolic m => String -> m (SBV a) Source #

Generalization of `symbolic`

symbolics :: MonadSymbolic m => [String] -> m [SBV a] Source #

Generalization of `symbolics`

unliteral :: SBV a -> Maybe a Source #

Extract a literal, if the value is concrete

isConcrete :: SBV a -> Bool Source #

Is the symbolic word concrete?

isSymbolic :: SBV a -> Bool Source #

Is the symbolic word really symbolic?

#### Instances

Instances details

SymVal Int16 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Int16) Source #

literal :: Int16 -> SBV Int16 Source #

fromCV :: CV -> Int16 Source #

isConcretely :: SBV Int16 -> (Int16 -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Int16) Source #

free_ :: MonadSymbolic m => m (SBV Int16) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Int16] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Int16) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Int16] Source #

unliteral :: SBV Int16 -> Maybe Int16 Source #

isConcrete :: SBV Int16 -> Bool Source #

isSymbolic :: SBV Int16 -> Bool Source #

SymVal Int32 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Int32) Source #

literal :: Int32 -> SBV Int32 Source #

fromCV :: CV -> Int32 Source #

isConcretely :: SBV Int32 -> (Int32 -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Int32) Source #

free_ :: MonadSymbolic m => m (SBV Int32) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Int32] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Int32) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Int32] Source #

unliteral :: SBV Int32 -> Maybe Int32 Source #

isConcrete :: SBV Int32 -> Bool Source #

isSymbolic :: SBV Int32 -> Bool Source #

SymVal Int64 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Int64) Source #

literal :: Int64 -> SBV Int64 Source #

fromCV :: CV -> Int64 Source #

isConcretely :: SBV Int64 -> (Int64 -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Int64) Source #

free_ :: MonadSymbolic m => m (SBV Int64) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Int64] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Int64) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Int64] Source #

unliteral :: SBV Int64 -> Maybe Int64 Source #

isConcrete :: SBV Int64 -> Bool Source #

isSymbolic :: SBV Int64 -> Bool Source #

SymVal Int8 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Int8) Source #

literal :: Int8 -> SBV Int8 Source #

fromCV :: CV -> Int8 Source #

isConcretely :: SBV Int8 -> (Int8 -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Int8) Source #

free_ :: MonadSymbolic m => m (SBV Int8) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Int8] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Int8) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Int8] Source #

unliteral :: SBV Int8 -> Maybe Int8 Source #

isConcrete :: SBV Int8 -> Bool Source #

isSymbolic :: SBV Int8 -> Bool Source #

SymVal Rational Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Rational) Source #

literal :: Rational -> SBV Rational Source #

fromCV :: CV -> Rational Source #

isConcretely :: SBV Rational -> (Rational -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Rational) Source #

free_ :: MonadSymbolic m => m (SBV Rational) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Rational] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Rational) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Rational] Source #

unliteral :: SBV Rational -> Maybe Rational Source #

isConcrete :: SBV Rational -> Bool Source #

isSymbolic :: SBV Rational -> Bool Source #

SymVal Word16 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Word16) Source #

literal :: Word16 -> SBV Word16 Source #

fromCV :: CV -> Word16 Source #

isConcretely :: SBV Word16 -> (Word16 -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Word16) Source #

free_ :: MonadSymbolic m => m (SBV Word16) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Word16] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Word16) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Word16] Source #

unliteral :: SBV Word16 -> Maybe Word16 Source #

isConcrete :: SBV Word16 -> Bool Source #

isSymbolic :: SBV Word16 -> Bool Source #

SymVal Word32 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Word32) Source #

literal :: Word32 -> SBV Word32 Source #

fromCV :: CV -> Word32 Source #

isConcretely :: SBV Word32 -> (Word32 -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Word32) Source #

free_ :: MonadSymbolic m => m (SBV Word32) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Word32] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Word32) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Word32] Source #

unliteral :: SBV Word32 -> Maybe Word32 Source #

isConcrete :: SBV Word32 -> Bool Source #

isSymbolic :: SBV Word32 -> Bool Source #

SymVal Word64 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Word64) Source #

literal :: Word64 -> SBV Word64 Source #

fromCV :: CV -> Word64 Source #

isConcretely :: SBV Word64 -> (Word64 -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Word64) Source #

free_ :: MonadSymbolic m => m (SBV Word64) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Word64] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Word64) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Word64] Source #

unliteral :: SBV Word64 -> Maybe Word64 Source #

isConcrete :: SBV Word64 -> Bool Source #

isSymbolic :: SBV Word64 -> Bool Source #

SymVal Word8 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Word8) Source #

literal :: Word8 -> SBV Word8 Source #

fromCV :: CV -> Word8 Source #

isConcretely :: SBV Word8 -> (Word8 -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Word8) Source #

free_ :: MonadSymbolic m => m (SBV Word8) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Word8] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Word8) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Word8] Source #

unliteral :: SBV Word8 -> Maybe Word8 Source #

isConcrete :: SBV Word8 -> Bool Source #

isSymbolic :: SBV Word8 -> Bool Source #

SymVal AlgReal Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV AlgReal) Source #

literal :: AlgReal -> SBV AlgReal Source #

fromCV :: CV -> AlgReal Source #

isConcretely :: SBV AlgReal -> (AlgReal -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV AlgReal) Source #

free_ :: MonadSymbolic m => m (SBV AlgReal) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV AlgReal] Source #

symbolic :: MonadSymbolic m => String -> m (SBV AlgReal) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV AlgReal] Source #

unliteral :: SBV AlgReal -> Maybe AlgReal Source #

isConcrete :: SBV AlgReal -> Bool Source #

isSymbolic :: SBV AlgReal -> Bool Source #

SymVal RoundingMode Source # | `RoundingMode` can be used symbolically

Instance details

Defined in Data.SBV.Core.Data

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV RoundingMode) Source #

literal :: RoundingMode -> SBV RoundingMode Source #

fromCV :: CV -> RoundingMode Source #

isConcretely :: SBV RoundingMode -> (RoundingMode -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV RoundingMode) Source #

free_ :: MonadSymbolic m => m (SBV RoundingMode) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV RoundingMode] Source #

symbolic :: MonadSymbolic m => String -> m (SBV RoundingMode) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV RoundingMode] Source #

unliteral :: SBV RoundingMode -> Maybe RoundingMode Source #

isConcrete :: SBV RoundingMode -> Bool Source #

isSymbolic :: SBV RoundingMode -> Bool Source #

SymVal State Source # |

Instance details

Defined in Documentation.SBV.Examples.Lists.BoundedMutex

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV State) Source #

literal :: State -> SBV State Source #

fromCV :: CV -> State Source #

isConcretely :: SBV State -> (State -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV State) Source #

free_ :: MonadSymbolic m => m (SBV State) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV State] Source #

symbolic :: MonadSymbolic m => String -> m (SBV State) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV State] Source #

unliteral :: SBV State -> Maybe State Source #

isConcrete :: SBV State -> Bool Source #

isSymbolic :: SBV State -> Bool Source #

SymVal E Source # |

Instance details

Defined in Documentation.SBV.Examples.Misc.Enumerate

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV E) Source #

literal :: E -> SBV E Source #

fromCV :: CV -> E Source #

isConcretely :: SBV E -> (E -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV E) Source #

free_ :: MonadSymbolic m => m (SBV E) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV E] Source #

symbolic :: MonadSymbolic m => String -> m (SBV E) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV E] Source #

unliteral :: SBV E -> Maybe E Source #

isConcrete :: SBV E -> Bool Source #

isSymbolic :: SBV E -> Bool Source #

SymVal E Source # |

Instance details

Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV E) Source #

literal :: E -> SBV E Source #

fromCV :: CV -> E Source #

isConcretely :: SBV E -> (E -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV E) Source #

free_ :: MonadSymbolic m => m (SBV E) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV E] Source #

symbolic :: MonadSymbolic m => String -> m (SBV E) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV E] Source #

unliteral :: SBV E -> Maybe E Source #

isConcrete :: SBV E -> Bool Source #

isSymbolic :: SBV E -> Bool Source #

SymVal U Source # |

Instance details

Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV U) Source #

literal :: U -> SBV U Source #

fromCV :: CV -> U Source #

isConcretely :: SBV U -> (U -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV U) Source #

free_ :: MonadSymbolic m => m (SBV U) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV U] Source #

symbolic :: MonadSymbolic m => String -> m (SBV U) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV U] Source #

unliteral :: SBV U -> Maybe U Source #

isConcrete :: SBV U -> Bool Source #

isSymbolic :: SBV U -> Bool Source #

SymVal V Source # |

Instance details

Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV V) Source #

literal :: V -> SBV V Source #

fromCV :: CV -> V Source #

isConcretely :: SBV V -> (V -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV V) Source #

free_ :: MonadSymbolic m => m (SBV V) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV V] Source #

symbolic :: MonadSymbolic m => String -> m (SBV V) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV V] Source #

unliteral :: SBV V -> Maybe V Source #

isConcrete :: SBV V -> Bool Source #

isSymbolic :: SBV V -> Bool Source #

SymVal HumanHeightInCm Source # | Similarly here, for the `SymVal` instance.

Instance details

Defined in Documentation.SBV.Examples.Misc.Newtypes

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV HumanHeightInCm) Source #

literal :: HumanHeightInCm -> SBV HumanHeightInCm Source #

fromCV :: CV -> HumanHeightInCm Source #

isConcretely :: SBV HumanHeightInCm -> (HumanHeightInCm -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV HumanHeightInCm) Source #

free_ :: MonadSymbolic m => m (SBV HumanHeightInCm) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV HumanHeightInCm] Source #

symbolic :: MonadSymbolic m => String -> m (SBV HumanHeightInCm) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV HumanHeightInCm] Source #

unliteral :: SBV HumanHeightInCm -> Maybe HumanHeightInCm Source #

isConcrete :: SBV HumanHeightInCm -> Bool Source #

isSymbolic :: SBV HumanHeightInCm -> Bool Source #

SymVal Metres Source # | The `SymVal` instance simply uses stock definitions. This is always possible for newtypes that simply wrap over an existing symbolic type.

Instance details

Defined in Documentation.SBV.Examples.Misc.Newtypes

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Metres) Source #

literal :: Metres -> SBV Metres Source #

fromCV :: CV -> Metres Source #

isConcretely :: SBV Metres -> (Metres -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Metres) Source #

free_ :: MonadSymbolic m => m (SBV Metres) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Metres] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Metres) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Metres] Source #

unliteral :: SBV Metres -> Maybe Metres Source #

isConcrete :: SBV Metres -> Bool Source #

isSymbolic :: SBV Metres -> Bool Source #

SymVal Day Source # |

Instance details

Defined in Documentation.SBV.Examples.Optimization.Enumerate

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Day) Source #

literal :: Day -> SBV Day Source #

fromCV :: CV -> Day Source #

isConcretely :: SBV Day -> (Day -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Day) Source #

free_ :: MonadSymbolic m => m (SBV Day) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Day] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Day) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Day] Source #

unliteral :: SBV Day -> Maybe Day Source #

isConcrete :: SBV Day -> Bool Source #

isSymbolic :: SBV Day -> Bool Source #

SymVal Day Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Birthday

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Day) Source #

literal :: Day -> SBV Day Source #

fromCV :: CV -> Day Source #

isConcretely :: SBV Day -> (Day -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Day) Source #

free_ :: MonadSymbolic m => m (SBV Day) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Day] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Day) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Day] Source #

unliteral :: SBV Day -> Maybe Day Source #

isConcrete :: SBV Day -> Bool Source #

isSymbolic :: SBV Day -> Bool Source #

SymVal Month Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Birthday

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Month) Source #

literal :: Month -> SBV Month Source #

fromCV :: CV -> Month Source #

isConcretely :: SBV Month -> (Month -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Month) Source #

free_ :: MonadSymbolic m => m (SBV Month) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Month] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Month) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Month] Source #

unliteral :: SBV Month -> Maybe Month Source #

isConcrete :: SBV Month -> Bool Source #

isSymbolic :: SBV Month -> Bool Source #

SymVal P Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Drinker

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV P) Source #

literal :: P -> SBV P Source #

fromCV :: CV -> P Source #

isConcretely :: SBV P -> (P -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV P) Source #

free_ :: MonadSymbolic m => m (SBV P) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV P] Source #

symbolic :: MonadSymbolic m => String -> m (SBV P) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV P] Source #

unliteral :: SBV P -> Maybe P Source #

isConcrete :: SBV P -> Bool Source #

isSymbolic :: SBV P -> Bool Source #

SymVal Beverage Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Beverage) Source #

literal :: Beverage -> SBV Beverage Source #

fromCV :: CV -> Beverage Source #

isConcretely :: SBV Beverage -> (Beverage -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Beverage) Source #

free_ :: MonadSymbolic m => m (SBV Beverage) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Beverage] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Beverage) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Beverage] Source #

unliteral :: SBV Beverage -> Maybe Beverage Source #

isConcrete :: SBV Beverage -> Bool Source #

isSymbolic :: SBV Beverage -> Bool Source #

SymVal Color Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Color) Source #

literal :: Color -> SBV Color Source #

fromCV :: CV -> Color Source #

isConcretely :: SBV Color -> (Color -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Color) Source #

free_ :: MonadSymbolic m => m (SBV Color) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Color] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Color) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Color] Source #

unliteral :: SBV Color -> Maybe Color Source #

isConcrete :: SBV Color -> Bool Source #

isSymbolic :: SBV Color -> Bool Source #

SymVal Nationality Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Nationality) Source #

literal :: Nationality -> SBV Nationality Source #

fromCV :: CV -> Nationality Source #

isConcretely :: SBV Nationality -> (Nationality -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Nationality) Source #

free_ :: MonadSymbolic m => m (SBV Nationality) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Nationality] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Nationality) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Nationality] Source #

unliteral :: SBV Nationality -> Maybe Nationality Source #

isConcrete :: SBV Nationality -> Bool Source #

isSymbolic :: SBV Nationality -> Bool Source #

SymVal Pet Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Pet) Source #

literal :: Pet -> SBV Pet Source #

fromCV :: CV -> Pet Source #

isConcretely :: SBV Pet -> (Pet -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Pet) Source #

free_ :: MonadSymbolic m => m (SBV Pet) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Pet] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Pet) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Pet] Source #

unliteral :: SBV Pet -> Maybe Pet Source #

isConcrete :: SBV Pet -> Bool Source #

isSymbolic :: SBV Pet -> Bool Source #

SymVal Sport Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Sport) Source #

literal :: Sport -> SBV Sport Source #

fromCV :: CV -> Sport Source #

isConcretely :: SBV Sport -> (Sport -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Sport) Source #

free_ :: MonadSymbolic m => m (SBV Sport) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Sport] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Sport) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Sport] Source #

unliteral :: SBV Sport -> Maybe Sport Source #

isConcrete :: SBV Sport -> Bool Source #

isSymbolic :: SBV Sport -> Bool Source #

SymVal Color Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Garden

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Color) Source #

literal :: Color -> SBV Color Source #

fromCV :: CV -> Color Source #

isConcretely :: SBV Color -> (Color -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Color) Source #

free_ :: MonadSymbolic m => m (SBV Color) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Color] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Color) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Color] Source #

unliteral :: SBV Color -> Maybe Color Source #

isConcrete :: SBV Color -> Bool Source #

isSymbolic :: SBV Color -> Bool Source #

SymVal Color Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.HexPuzzle

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Color) Source #

literal :: Color -> SBV Color Source #

fromCV :: CV -> Color Source #

isConcretely :: SBV Color -> (Color -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Color) Source #

free_ :: MonadSymbolic m => m (SBV Color) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Color] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Color) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Color] Source #

unliteral :: SBV Color -> Maybe Color Source #

isConcrete :: SBV Color -> Bool Source #

isSymbolic :: SBV Color -> Bool Source #

SymVal Identity Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Identity) Source #

literal :: Identity -> SBV Identity Source #

fromCV :: CV -> Identity Source #

isConcretely :: SBV Identity -> (Identity -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Identity) Source #

free_ :: MonadSymbolic m => m (SBV Identity) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Identity] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Identity) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Identity] Source #

unliteral :: SBV Identity -> Maybe Identity Source #

isConcrete :: SBV Identity -> Bool Source #

isSymbolic :: SBV Identity -> Bool Source #

SymVal Inhabitant Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Inhabitant) Source #

literal :: Inhabitant -> SBV Inhabitant Source #

fromCV :: CV -> Inhabitant Source #

isConcretely :: SBV Inhabitant -> (Inhabitant -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Inhabitant) Source #

free_ :: MonadSymbolic m => m (SBV Inhabitant) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Inhabitant] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Inhabitant) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Inhabitant] Source #

unliteral :: SBV Inhabitant -> Maybe Inhabitant Source #

isConcrete :: SBV Inhabitant -> Bool Source #

isSymbolic :: SBV Inhabitant -> Bool Source #

SymVal Statement Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Statement) Source #

literal :: Statement -> SBV Statement Source #

fromCV :: CV -> Statement Source #

isConcretely :: SBV Statement -> (Statement -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Statement) Source #

free_ :: MonadSymbolic m => m (SBV Statement) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Statement] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Statement) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Statement] Source #

unliteral :: SBV Statement -> Maybe Statement Source #

isConcrete :: SBV Statement -> Bool Source #

isSymbolic :: SBV Statement -> Bool Source #

SymVal Location Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Murder

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Location) Source #

literal :: Location -> SBV Location Source #

fromCV :: CV -> Location Source #

isConcretely :: SBV Location -> (Location -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Location) Source #

free_ :: MonadSymbolic m => m (SBV Location) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Location] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Location) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Location] Source #

unliteral :: SBV Location -> Maybe Location Source #

isConcrete :: SBV Location -> Bool Source #

isSymbolic :: SBV Location -> Bool Source #

SymVal Role Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Murder

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Role) Source #

literal :: Role -> SBV Role Source #

fromCV :: CV -> Role Source #

isConcretely :: SBV Role -> (Role -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Role) Source #

free_ :: MonadSymbolic m => m (SBV Role) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Role] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Role) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Role] Source #

unliteral :: SBV Role -> Maybe Role Source #

isConcrete :: SBV Role -> Bool Source #

isSymbolic :: SBV Role -> Bool Source #

SymVal Sex Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Murder

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Sex) Source #

literal :: Sex -> SBV Sex Source #

fromCV :: CV -> Sex Source #

isConcretely :: SBV Sex -> (Sex -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Sex) Source #

free_ :: MonadSymbolic m => m (SBV Sex) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Sex] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Sex) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Sex] Source #

unliteral :: SBV Sex -> Maybe Sex Source #

isConcrete :: SBV Sex -> Bool Source #

isSymbolic :: SBV Sex -> Bool Source #

SymVal Handler Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Handler) Source #

literal :: Handler -> SBV Handler Source #

fromCV :: CV -> Handler Source #

isConcretely :: SBV Handler -> (Handler -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Handler) Source #

free_ :: MonadSymbolic m => m (SBV Handler) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Handler] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Handler) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Handler] Source #

unliteral :: SBV Handler -> Maybe Handler Source #

isConcrete :: SBV Handler -> Bool Source #

isSymbolic :: SBV Handler -> Bool Source #

SymVal Location Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Location) Source #

literal :: Location -> SBV Location Source #

fromCV :: CV -> Location Source #

isConcretely :: SBV Location -> (Location -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Location) Source #

free_ :: MonadSymbolic m => m (SBV Location) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Location] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Location) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Location] Source #

unliteral :: SBV Location -> Maybe Location Source #

isConcrete :: SBV Location -> Bool Source #

isSymbolic :: SBV Location -> Bool Source #

SymVal Orangutan Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Orangutan) Source #

literal :: Orangutan -> SBV Orangutan Source #

fromCV :: CV -> Orangutan Source #

isConcretely :: SBV Orangutan -> (Orangutan -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Orangutan) Source #

free_ :: MonadSymbolic m => m (SBV Orangutan) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Orangutan] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Orangutan) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Orangutan] Source #

unliteral :: SBV Orangutan -> Maybe Orangutan Source #

isConcrete :: SBV Orangutan -> Bool Source #

isSymbolic :: SBV Orangutan -> Bool Source #

SymVal Rabbit Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Rabbits

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Rabbit) Source #

literal :: Rabbit -> SBV Rabbit Source #

fromCV :: CV -> Rabbit Source #

isConcretely :: SBV Rabbit -> (Rabbit -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Rabbit) Source #

free_ :: MonadSymbolic m => m (SBV Rabbit) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Rabbit] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Rabbit) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Rabbit] Source #

unliteral :: SBV Rabbit -> Maybe Rabbit Source #

isConcrete :: SBV Rabbit -> Bool Source #

isSymbolic :: SBV Rabbit -> Bool Source #

SymVal Location Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Location) Source #

literal :: Location -> SBV Location Source #

fromCV :: CV -> Location Source #

isConcretely :: SBV Location -> (Location -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Location) Source #

free_ :: MonadSymbolic m => m (SBV Location) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Location] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Location) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Location] Source #

unliteral :: SBV Location -> Maybe Location Source #

isConcrete :: SBV Location -> Bool Source #

isSymbolic :: SBV Location -> Bool Source #

SymVal U2Member Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV U2Member) Source #

literal :: U2Member -> SBV U2Member Source #

fromCV :: CV -> U2Member Source #

isConcretely :: SBV U2Member -> (U2Member -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV U2Member) Source #

free_ :: MonadSymbolic m => m (SBV U2Member) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV U2Member] Source #

symbolic :: MonadSymbolic m => String -> m (SBV U2Member) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV U2Member] Source #

unliteral :: SBV U2Member -> Maybe U2Member Source #

isConcrete :: SBV U2Member -> Bool Source #

isSymbolic :: SBV U2Member -> Bool Source #

SymVal Day Source # |

Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Day) Source #

literal :: Day -> SBV Day Source #

fromCV :: CV -> Day Source #

isConcretely :: SBV Day -> (Day -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Day) Source #

free_ :: MonadSymbolic m => m (SBV Day) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Day] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Day) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Day] Source #

unliteral :: SBV Day -> Maybe Day Source #

isConcrete :: SBV Day -> Bool Source #

isSymbolic :: SBV Day -> Bool Source #

SymVal BinOp Source # |

Instance details

Defined in Documentation.SBV.Examples.Queries.FourFours

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV BinOp) Source #

literal :: BinOp -> SBV BinOp Source #

fromCV :: CV -> BinOp Source #

isConcretely :: SBV BinOp -> (BinOp -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV BinOp) Source #

free_ :: MonadSymbolic m => m (SBV BinOp) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV BinOp] Source #

symbolic :: MonadSymbolic m => String -> m (SBV BinOp) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV BinOp] Source #

unliteral :: SBV BinOp -> Maybe BinOp Source #

isConcrete :: SBV BinOp -> Bool Source #

isSymbolic :: SBV BinOp -> Bool Source #

SymVal UnOp Source # |

Instance details

Defined in Documentation.SBV.Examples.Queries.FourFours

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV UnOp) Source #

literal :: UnOp -> SBV UnOp Source #

fromCV :: CV -> UnOp Source #

isConcretely :: SBV UnOp -> (UnOp -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV UnOp) Source #

free_ :: MonadSymbolic m => m (SBV UnOp) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV UnOp] Source #

symbolic :: MonadSymbolic m => String -> m (SBV UnOp) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV UnOp] Source #

unliteral :: SBV UnOp -> Maybe UnOp Source #

isConcrete :: SBV UnOp -> Bool Source #

isSymbolic :: SBV UnOp -> Bool Source #

SymVal B Source # |

Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.Deduce

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV B) Source #

literal :: B -> SBV B Source #

fromCV :: CV -> B Source #

isConcretely :: SBV B -> (B -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV B) Source #

free_ :: MonadSymbolic m => m (SBV B) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV B] Source #

symbolic :: MonadSymbolic m => String -> m (SBV B) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV B] Source #

unliteral :: SBV B -> Maybe B Source #

isConcrete :: SBV B -> Bool Source #

isSymbolic :: SBV B -> Bool Source #

SymVal Q Source # |

Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.Sort

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Q) Source #

literal :: Q -> SBV Q Source #

fromCV :: CV -> Q Source #

isConcretely :: SBV Q -> (Q -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Q) Source #

free_ :: MonadSymbolic m => m (SBV Q) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Q] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Q) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Q] Source #

unliteral :: SBV Q -> Maybe Q Source #

isConcrete :: SBV Q -> Bool Source #

isSymbolic :: SBV Q -> Bool Source #

SymVal L Source # |

Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.UISortAllSat

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV L) Source #

literal :: L -> SBV L Source #

fromCV :: CV -> L Source #

isConcretely :: SBV L -> (L -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV L) Source #

free_ :: MonadSymbolic m => m (SBV L) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV L] Source #

symbolic :: MonadSymbolic m => String -> m (SBV L) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV L] Source #

unliteral :: SBV L -> Maybe L Source #

isConcrete :: SBV L -> Bool Source #

isSymbolic :: SBV L -> Bool Source #

SymVal Integer Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Integer) Source #

literal :: Integer -> SBV Integer Source #

fromCV :: CV -> Integer Source #

isConcretely :: SBV Integer -> (Integer -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Integer) Source #

free_ :: MonadSymbolic m => m (SBV Integer) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Integer] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Integer) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Integer] Source #

unliteral :: SBV Integer -> Maybe Integer Source #

isConcrete :: SBV Integer -> Bool Source #

isSymbolic :: SBV Integer -> Bool Source #

SymVal () Source # | SymVal for 0-tuple (i.e., unit)

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV ()) Source #

literal :: () -> SBV () Source #

fromCV :: CV -> () Source #

isConcretely :: SBV () -> (() -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV ()) Source #

free_ :: MonadSymbolic m => m (SBV ()) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV ()] Source #

symbolic :: MonadSymbolic m => String -> m (SBV ()) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV ()] Source #

unliteral :: SBV () -> Maybe () Source #

isConcrete :: SBV () -> Bool Source #

isSymbolic :: SBV () -> Bool Source #

SymVal Bool Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Bool) Source #

literal :: Bool -> SBV Bool Source #

fromCV :: CV -> Bool Source #

isConcretely :: SBV Bool -> (Bool -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Bool) Source #

free_ :: MonadSymbolic m => m (SBV Bool) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Bool] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Bool) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Bool] Source #

unliteral :: SBV Bool -> Maybe Bool Source #

isConcrete :: SBV Bool -> Bool Source #

isSymbolic :: SBV Bool -> Bool Source #

SymVal Char Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Char) Source #

literal :: Char -> SBV Char Source #

fromCV :: CV -> Char Source #

isConcretely :: SBV Char -> (Char -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Char) Source #

free_ :: MonadSymbolic m => m (SBV Char) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Char] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Char) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Char] Source #

unliteral :: SBV Char -> Maybe Char Source #

isConcrete :: SBV Char -> Bool Source #

isSymbolic :: SBV Char -> Bool Source #

SymVal Double Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Double) Source #

literal :: Double -> SBV Double Source #

fromCV :: CV -> Double Source #

isConcretely :: SBV Double -> (Double -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Double) Source #

free_ :: MonadSymbolic m => m (SBV Double) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Double] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Double) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Double] Source #

unliteral :: SBV Double -> Maybe Double Source #

isConcrete :: SBV Double -> Bool Source #

isSymbolic :: SBV Double -> Bool Source #

SymVal Float Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV Float) Source #

literal :: Float -> SBV Float Source #

fromCV :: CV -> Float Source #

isConcretely :: SBV Float -> (Float -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV Float) Source #

free_ :: MonadSymbolic m => m (SBV Float) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV Float] Source #

symbolic :: MonadSymbolic m => String -> m (SBV Float) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV Float] Source #

unliteral :: SBV Float -> Maybe Float Source #

isConcrete :: SBV Float -> Bool Source #

isSymbolic :: SBV Float -> Bool Source #

(Ord a, SymVal a) => SymVal (RCSet a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (RCSet a)) Source #

literal :: RCSet a -> SBV (RCSet a) Source #

fromCV :: CV -> RCSet a Source #

isConcretely :: SBV (RCSet a) -> (RCSet a -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (RCSet a)) Source #

free_ :: MonadSymbolic m => m (SBV (RCSet a)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (RCSet a)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (RCSet a)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (RCSet a)] Source #

unliteral :: SBV (RCSet a) -> Maybe (RCSet a) Source #

isConcrete :: SBV (RCSet a) -> Bool Source #

isSymbolic :: SBV (RCSet a) -> Bool Source #

(KnownNat n, BVIsNonZero n) => SymVal (IntN n) Source # | `SymVal` instance for `IntN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (IntN n)) Source #

literal :: IntN n -> SBV (IntN n) Source #

fromCV :: CV -> IntN n Source #

isConcretely :: SBV (IntN n) -> (IntN n -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (IntN n)) Source #

free_ :: MonadSymbolic m => m (SBV (IntN n)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (IntN n)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (IntN n)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (IntN n)] Source #

unliteral :: SBV (IntN n) -> Maybe (IntN n) Source #

isConcrete :: SBV (IntN n) -> Bool Source #

isSymbolic :: SBV (IntN n) -> Bool Source #

(KnownNat n, BVIsNonZero n) => SymVal (WordN n) Source # | `SymVal` instance for `WordN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (WordN n)) Source #

literal :: WordN n -> SBV (WordN n) Source #

fromCV :: CV -> WordN n Source #

isConcretely :: SBV (WordN n) -> (WordN n -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (WordN n)) Source #

free_ :: MonadSymbolic m => m (SBV (WordN n)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (WordN n)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (WordN n)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (WordN n)] Source #

unliteral :: SBV (WordN n) -> Maybe (WordN n) Source #

isConcrete :: SBV (WordN n) -> Bool Source #

isSymbolic :: SBV (WordN n) -> Bool Source #

SymVal a => SymVal (Maybe a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (Maybe a)) Source #

literal :: Maybe a -> SBV (Maybe a) Source #

fromCV :: CV -> Maybe a Source #

isConcretely :: SBV (Maybe a) -> (Maybe a -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (Maybe a)) Source #

free_ :: MonadSymbolic m => m (SBV (Maybe a)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (Maybe a)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (Maybe a)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (Maybe a)] Source #

unliteral :: SBV (Maybe a) -> Maybe (Maybe a) Source #

isConcrete :: SBV (Maybe a) -> Bool Source #

isSymbolic :: SBV (Maybe a) -> Bool Source #

SymVal a => SymVal [a] Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV [a]) Source #

literal :: [a] -> SBV [a] Source #

fromCV :: CV -> [a] Source #

isConcretely :: SBV [a] -> ([a] -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV [a]) Source #

free_ :: MonadSymbolic m => m (SBV [a]) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV [a]] Source #

symbolic :: MonadSymbolic m => String -> m (SBV [a]) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV [a]] Source #

unliteral :: SBV [a] -> Maybe [a] Source #

isConcrete :: SBV [a] -> Bool Source #

isSymbolic :: SBV [a] -> Bool Source #

(SymVal a, SymVal b) => SymVal (Either a b) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (Either a b)) Source #

literal :: Either a b -> SBV (Either a b) Source #

fromCV :: CV -> Either a b Source #

isConcretely :: SBV (Either a b) -> (Either a b -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (Either a b)) Source #

free_ :: MonadSymbolic m => m (SBV (Either a b)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (Either a b)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (Either a b)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (Either a b)] Source #

unliteral :: SBV (Either a b) -> Maybe (Either a b) Source #

isConcrete :: SBV (Either a b) -> Bool Source #

isSymbolic :: SBV (Either a b) -> Bool Source #

ValidFloat eb sb => SymVal (FloatingPoint eb sb) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (FloatingPoint eb sb)) Source #

literal :: FloatingPoint eb sb -> SBV (FloatingPoint eb sb) Source #

fromCV :: CV -> FloatingPoint eb sb Source #

isConcretely :: SBV (FloatingPoint eb sb) -> (FloatingPoint eb sb -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (FloatingPoint eb sb)) Source #

free_ :: MonadSymbolic m => m (SBV (FloatingPoint eb sb)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (FloatingPoint eb sb)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (FloatingPoint eb sb)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (FloatingPoint eb sb)] Source #

unliteral :: SBV (FloatingPoint eb sb) -> Maybe (FloatingPoint eb sb) Source #

isConcrete :: SBV (FloatingPoint eb sb) -> Bool Source #

isSymbolic :: SBV (FloatingPoint eb sb) -> Bool Source #

(SymVal a, SymVal b) => SymVal (a, b) Source # | SymVal for 2-tuples

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (a, b)) Source #

literal :: (a, b) -> SBV (a, b) Source #

fromCV :: CV -> (a, b) Source #

isConcretely :: SBV (a, b) -> ((a, b) -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (a, b)) Source #

free_ :: MonadSymbolic m => m (SBV (a, b)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (a, b)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (a, b)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (a, b)] Source #

unliteral :: SBV (a, b) -> Maybe (a, b) Source #

isConcrete :: SBV (a, b) -> Bool Source #

isSymbolic :: SBV (a, b) -> Bool Source #

(SymVal a, SymVal b, SymVal c) => SymVal (a, b, c) Source # | SymVal for 3-tuples

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (a, b, c)) Source #

literal :: (a, b, c) -> SBV (a, b, c) Source #

fromCV :: CV -> (a, b, c) Source #

isConcretely :: SBV (a, b, c) -> ((a, b, c) -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (a, b, c)) Source #

free_ :: MonadSymbolic m => m (SBV (a, b, c)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (a, b, c)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (a, b, c)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (a, b, c)] Source #

unliteral :: SBV (a, b, c) -> Maybe (a, b, c) Source #

isConcrete :: SBV (a, b, c) -> Bool Source #

isSymbolic :: SBV (a, b, c) -> Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d) => SymVal (a, b, c, d) Source # | SymVal for 4-tuples

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (a, b, c, d)) Source #

literal :: (a, b, c, d) -> SBV (a, b, c, d) Source #

fromCV :: CV -> (a, b, c, d) Source #

isConcretely :: SBV (a, b, c, d) -> ((a, b, c, d) -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (a, b, c, d)) Source #

free_ :: MonadSymbolic m => m (SBV (a, b, c, d)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (a, b, c, d)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (a, b, c, d)] Source #

unliteral :: SBV (a, b, c, d) -> Maybe (a, b, c, d) Source #

isConcrete :: SBV (a, b, c, d) -> Bool Source #

isSymbolic :: SBV (a, b, c, d) -> Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e) => SymVal (a, b, c, d, e) Source # | SymVal for 5-tuples

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (a, b, c, d, e)) Source #

literal :: (a, b, c, d, e) -> SBV (a, b, c, d, e) Source #

fromCV :: CV -> (a, b, c, d, e) Source #

isConcretely :: SBV (a, b, c, d, e) -> ((a, b, c, d, e) -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e)) Source #

free_ :: MonadSymbolic m => m (SBV (a, b, c, d, e)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (a, b, c, d, e)] Source #

unliteral :: SBV (a, b, c, d, e) -> Maybe (a, b, c, d, e) Source #

isConcrete :: SBV (a, b, c, d, e) -> Bool Source #

isSymbolic :: SBV (a, b, c, d, e) -> Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f) => SymVal (a, b, c, d, e, f) Source # | SymVal for 6-tuples

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (a, b, c, d, e, f)) Source #

literal :: (a, b, c, d, e, f) -> SBV (a, b, c, d, e, f) Source #

fromCV :: CV -> (a, b, c, d, e, f) Source #

isConcretely :: SBV (a, b, c, d, e, f) -> ((a, b, c, d, e, f) -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f)) Source #

free_ :: MonadSymbolic m => m (SBV (a, b, c, d, e, f)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e, f)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (a, b, c, d, e, f)] Source #

unliteral :: SBV (a, b, c, d, e, f) -> Maybe (a, b, c, d, e, f) Source #

isConcrete :: SBV (a, b, c, d, e, f) -> Bool Source #

isSymbolic :: SBV (a, b, c, d, e, f) -> Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g) => SymVal (a, b, c, d, e, f, g) Source # | SymVal for 7-tuples

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (a, b, c, d, e, f, g)) Source #

literal :: (a, b, c, d, e, f, g) -> SBV (a, b, c, d, e, f, g) Source #

fromCV :: CV -> (a, b, c, d, e, f, g) Source #

isConcretely :: SBV (a, b, c, d, e, f, g) -> ((a, b, c, d, e, f, g) -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f, g)) Source #

free_ :: MonadSymbolic m => m (SBV (a, b, c, d, e, f, g)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e, f, g)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f, g)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (a, b, c, d, e, f, g)] Source #

unliteral :: SBV (a, b, c, d, e, f, g) -> Maybe (a, b, c, d, e, f, g) Source #

isConcrete :: SBV (a, b, c, d, e, f, g) -> Bool Source #

isSymbolic :: SBV (a, b, c, d, e, f, g) -> Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h) => SymVal (a, b, c, d, e, f, g, h) Source # | SymVal for 8-tuples

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => VarContext -> Maybe String -> m (SBV (a, b, c, d, e, f, g, h)) Source #

literal :: (a, b, c, d, e, f, g, h) -> SBV (a, b, c, d, e, f, g, h) Source #

fromCV :: CV -> (a, b, c, d, e, f, g, h) Source #

isConcretely :: SBV (a, b, c, d, e, f, g, h) -> ((a, b, c, d, e, f, g, h) -> Bool) -> Bool Source #

free :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f, g, h)) Source #

free_ :: MonadSymbolic m => m (SBV (a, b, c, d, e, f, g, h)) Source #

mkFreeVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e, f, g, h)] Source #

symbolic :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f, g, h)) Source #

symbolics :: MonadSymbolic m => [String] -> m [SBV (a, b, c, d, e, f, g, h)] Source #

unliteral :: SBV (a, b, c, d, e, f, g, h) -> Maybe (a, b, c, d, e, f, g, h) Source #

isConcrete :: SBV (a, b, c, d, e, f, g, h) -> Bool Source #

isSymbolic :: SBV (a, b, c, d, e, f, g, h) -> Bool Source #

class MonadIO m => MonadSymbolic m where Source #

A Symbolic computation. Represented by a reader monad carrying the state of the computation, layered on top of IO for creating unique references to hold onto intermediate results.

Computations which support symbolic operations

Minimal complete definition

Nothing

Methods

symbolicEnv :: m State Source #

default symbolicEnv :: (MonadTrans t, MonadSymbolic m', m ~ t m') => m State Source #

#### Instances

Instances details

MonadSymbolic SBVCodeGen Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods symbolicEnv :: SBVCodeGen State Source #
MonadSymbolic Query Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: Query State Source #
MonadSymbolic Alloc Source # |
Instance details Defined in Documentation.SBV.Examples.Transformers.SymbolicEval Methods symbolicEnv :: Alloc State Source #
MonadIO m => MonadSymbolic (SymbolicT m) Source # | `MonadSymbolic` instance for `SymbolicT m`
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: SymbolicT m State Source #
MonadSymbolic m => MonadSymbolic (MaybeT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: MaybeT m State Source #
MonadSymbolic m => MonadSymbolic (ExceptT e m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: ExceptT e m State Source #
MonadSymbolic m => MonadSymbolic (ReaderT r m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: ReaderT r m State Source #
MonadSymbolic m => MonadSymbolic (StateT s m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: StateT s m State Source #
MonadSymbolic m => MonadSymbolic (StateT s m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: StateT s m State Source #
(MonadSymbolic m, Monoid w) => MonadSymbolic (WriterT w m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: WriterT w m State Source #
(MonadSymbolic m, Monoid w) => MonadSymbolic (WriterT w m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: WriterT w m State Source #

type Symbolic = SymbolicT IO Source #

`Symbolic` is specialization of `SymbolicT` to the `IO` monad. Unless you are using transformers explicitly, this is the type you should prefer.

data SymbolicT m a Source #

A generalization of `Symbolic`.

#### Instances

Instances details

MonadTrans SymbolicT Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods lift :: Monad m => m a -> SymbolicT m a Source #
MonadError e m => MonadError e (SymbolicT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods throwError :: e -> SymbolicT m a Source # catchError :: SymbolicT m a -> (e -> SymbolicT m a) -> SymbolicT m a Source #
MonadReader r m => MonadReader r (SymbolicT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods ask :: SymbolicT m r Source # local :: (r -> r) -> SymbolicT m a -> SymbolicT m a Source # reader :: (r -> a) -> SymbolicT m a Source #
MonadState s m => MonadState s (SymbolicT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods get :: SymbolicT m s Source # put :: s -> SymbolicT m () Source # state :: (s -> (a, s)) -> SymbolicT m a Source #
MonadWriter w m => MonadWriter w (SymbolicT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods writer :: (a, w) -> SymbolicT m a Source # tell :: w -> SymbolicT m () Source # listen :: SymbolicT m a -> SymbolicT m (a, w) Source # pass :: SymbolicT m (a, w -> w) -> SymbolicT m a Source #
ExtractIO m => ProvableM m (SymbolicT m SBool) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: SymbolicT m SBool -> SymbolicT m SBool Source #

prove :: SymbolicT m SBool -> m ThmResult Source #

proveWith :: SMTConfig -> SymbolicT m SBool -> m ThmResult Source #

dprove :: SymbolicT m SBool -> m ThmResult Source #

dproveWith :: SMTConfig -> SymbolicT m SBool -> m ThmResult Source #

isVacuousProof :: SymbolicT m SBool -> m Bool Source #

isVacuousProofWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

isTheorem :: SymbolicT m SBool -> m Bool Source #

isTheoremWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

(ExtractIO m, NFData a) => SExecutable m (SymbolicT m a) Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName :: SymbolicT m a -> SymbolicT m () Source # safe :: SymbolicT m a -> m [SafeResult] Source # safeWith :: SMTConfig -> SymbolicT m a -> m [SafeResult] Source #
ExtractIO m => SatisfiableM m (SymbolicT m SBool) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: SymbolicT m SBool -> SymbolicT m SBool Source #

sat :: SymbolicT m SBool -> m SatResult Source #

satWith :: SMTConfig -> SymbolicT m SBool -> m SatResult Source #

dsat :: SymbolicT m SBool -> m SatResult Source #

dsatWith :: SMTConfig -> SymbolicT m SBool -> m SatResult Source #

allSat :: SymbolicT m SBool -> m AllSatResult Source #

allSatWith :: SMTConfig -> SymbolicT m SBool -> m AllSatResult Source #

isSatisfiable :: SymbolicT m SBool -> m Bool Source #

isSatisfiableWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

optimize :: OptimizeStyle -> SymbolicT m SBool -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> SymbolicT m SBool -> m OptimizeResult Source #

ExtractIO m => SatisfiableM m (SymbolicT m ()) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: SymbolicT m () -> SymbolicT m SBool Source #

sat :: SymbolicT m () -> m SatResult Source #

satWith :: SMTConfig -> SymbolicT m () -> m SatResult Source #

dsat :: SymbolicT m () -> m SatResult Source #

dsatWith :: SMTConfig -> SymbolicT m () -> m SatResult Source #

allSat :: SymbolicT m () -> m AllSatResult Source #

allSatWith :: SMTConfig -> SymbolicT m () -> m AllSatResult Source #

isSatisfiable :: SymbolicT m () -> m Bool Source #

isSatisfiableWith :: SMTConfig -> SymbolicT m () -> m Bool Source #

optimize :: OptimizeStyle -> SymbolicT m () -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> SymbolicT m () -> m OptimizeResult Source #

Testable (Symbolic SBool) Source # |
Instance details Defined in Data.SBV.Core.Model Methods property :: Symbolic SBool -> Property Source # propertyForAllShrinkShow :: Gen a -> (a -> [a]) -> (a -> [String]) -> (a -> Symbolic SBool) -> Property Source #
Testable (Symbolic SVal) Source # |
Instance details Defined in Data.SBV.Core.Model Methods property :: Symbolic SVal -> Property Source # propertyForAllShrinkShow :: Gen a -> (a -> [a]) -> (a -> [String]) -> (a -> Symbolic SVal) -> Property Source #
MonadFail m => MonadFail (SymbolicT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods fail :: String -> SymbolicT m a Source #
MonadIO m => MonadIO (SymbolicT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods liftIO :: IO a -> SymbolicT m a Source #
Applicative m => Applicative (SymbolicT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods pure :: a -> SymbolicT m a Source # (<*>) :: SymbolicT m (a -> b) -> SymbolicT m a -> SymbolicT m b Source # liftA2 :: (a -> b -> c) -> SymbolicT m a -> SymbolicT m b -> SymbolicT m c Source # (*>) :: SymbolicT m a -> SymbolicT m b -> SymbolicT m b Source # (<*) :: SymbolicT m a -> SymbolicT m b -> SymbolicT m a Source #
Functor m => Functor (SymbolicT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods fmap :: (a -> b) -> SymbolicT m a -> SymbolicT m b Source # (<$) :: a -> SymbolicT m b -> SymbolicT m a Source #
Monad m => Monad (SymbolicT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (>>=) :: SymbolicT m a -> (a -> SymbolicT m b) -> SymbolicT m b Source # (>>) :: SymbolicT m a -> SymbolicT m b -> SymbolicT m b Source # return :: a -> SymbolicT m a Source #
MonadIO m => SolverContext (SymbolicT m) Source # | Symbolic computations provide a context for writing symbolic programs.

Instance details

Defined in Data.SBV.Core.Model

Methods

constrain :: QuantifiedBool a => a -> SymbolicT m () Source #

softConstrain :: QuantifiedBool a => a -> SymbolicT m () Source #

namedConstraint :: QuantifiedBool a => String -> a -> SymbolicT m () Source #

constrainWithAttribute :: QuantifiedBool a => [(String, String)] -> a -> SymbolicT m () Source #

setInfo :: String -> [String] -> SymbolicT m () Source #

setOption :: SMTOption -> SymbolicT m () Source #

setLogic :: Logic -> SymbolicT m () Source #

setTimeOut :: Integer -> SymbolicT m () Source #

contextState :: SymbolicT m State Source #

MonadIO m => MonadSymbolic (SymbolicT m) Source # | `MonadSymbolic` instance for `SymbolicT m`
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: SymbolicT m State Source #

label :: SymVal a => String -> SBV a -> SBV a Source #

label: Label the result of an expression. This is essentially a no-op, but useful as it generates a comment in the generated C/SMT-Lib code. Note that if the argument is a constant, then the label is dropped completely, per the usual constant folding strategy. Compare this to `observe` which is good for printing counter-examples.

output :: (Outputtable a, MonadSymbolic m) => a -> m a Source #

Generalization of `output`

runSMT :: MonadIO m => SymbolicT m a -> m a Source #

Generalization of `runSMT`

runSMTWith :: MonadIO m => SMTConfig -> SymbolicT m a -> m a Source #

Generalization of `runSMTWith`

# Module exports

module Data.Bits

module Data.Word

module Data.Int

module Data.Ratio