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

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

Data.SBV.Internals

Contents

- Running symbolic programs manually
- Solver capabilities
- Internal structures useful for low-level programming
- Operations useful for instantiating SBV type classes
- Compilation to C, extras
- Code generation primitives
- The codegen monad
- Specifying inputs, SBV variants
- Specifying inputs, SVal variants
- Settings
- Infrastructure
- Generating collateral
- Various math utilities around floats
- Pretty number printing
- Timing computations
- Coordinating with the solver
- Defining new metrics

Description

Low level functions to access the SBV infrastructure, for developers who want to build further tools on top of SBV. End-users of the library should not need to use this module.

NB. There are various coding invariants in SBV that are maintained throughout the code. Indiscriminate use of functions in this module can break those invariants. So, you are on your own if you do utilize the functions here. (Unfortunately, what exactly those invariants are is a very good but also a very difficult question to answer!)

Synopsis

- data Result = Result {
  - reskinds :: Set Kind
  - resTraces :: [(String, CV)]
  - resObservables :: [(String, CV -> Bool, SV)]
  - resUISegs :: [(String, [String])]
  - resInputs :: ([(Quantifier, NamedSymVar)], [NamedSymVar])
  - resConsts :: [(SV, CV)]
  - resTables :: [((Int, Kind, Kind), [SV])]
  - resArrays :: [(Int, ArrayInfo)]
  - resUIConsts :: [(String, SBVType)]
  - resAxioms :: [(String, [String])]
  - resAsgns :: SBVPgm
  - resConstraints :: Seq (Bool, [(String, String)], SV)
  - resAssertions :: [(String, Maybe CallStack, SV)]
  - resOutputs :: [SV]
  }
- data SBVRunMode
  - = SMTMode QueryContext IStage Bool SMTConfig
  - | CodeGen
  - | Concrete (Maybe (Bool, [((Quantifier, NamedSymVar), Maybe CV)]))
- data IStage
  - = ISetup
  - | ISafe
  - | IRun
- data QueryContext
  - = QueryInternal
  - | QueryExternal
- data SolverCapabilities = SolverCapabilities {
  - supportsQuantifiers :: Bool
  - supportsUninterpretedSorts :: Bool
  - supportsUnboundedInts :: Bool
  - supportsReals :: Bool
  - supportsApproxReals :: Bool
  - supportsIEEE754 :: Bool
  - supportsSets :: Bool
  - supportsOptimization :: Bool
  - supportsPseudoBooleans :: Bool
  - supportsCustomQueries :: Bool
  - supportsGlobalDecls :: Bool
  - supportsDataTypes :: Bool
  - supportsFlattenedModels :: Maybe [String]
  }
- type SBool = SBV Bool
- type SWord8 = SBV Word8
- type SWord16 = SBV Word16
- type SWord32 = SBV Word32
- type SWord64 = SBV Word64
- type SInt8 = SBV Int8
- type SInt16 = SBV Int16
- type SInt32 = SBV Int32
- type SInt64 = SBV Int64
- type SInteger = SBV Integer
- type SReal = SBV AlgReal
- type SFloat = SBV Float
- type SDouble = SBV Double
- type SChar = SBV Char
- type SString = SBV String
- type SList a = SBV [a]
- type SEither a b = SBV (Either a b)
- type SMaybe a = SBV (Maybe a)
- type STuple a b = SBV (a, b)
- type STuple2 a b = SBV (a, b)
- type STuple3 a b c = SBV (a, b, c)
- type STuple4 a b c d = SBV (a, b, c, d)
- type STuple5 a b c d e = SBV (a, b, c, d, e)
- type STuple6 a b c d e f = SBV (a, b, c, d, e, f)
- type STuple7 a b c d e f g = SBV (a, b, c, d, e, f, g)
- type STuple8 a b c d e f g h = SBV (a, b, c, d, e, f, g, h)
- data RCSet a
  - = RegularSet (Set a)
  - | ComplementSet (Set a)
- type SSet a = SBV (RCSet a)
- nan :: Floating a => a
- infinity :: Floating a => a
- sNaN :: (Floating a, SymVal a) => SBV a
- sInfinity :: (Floating a, SymVal a) => SBV a
- data RoundingMode
  - = RoundNearestTiesToEven
  - | RoundNearestTiesToAway
  - | RoundTowardPositive
  - | RoundTowardNegative
  - | RoundTowardZero
- type SRoundingMode = SBV RoundingMode
- sRoundNearestTiesToEven :: SRoundingMode
- sRoundNearestTiesToAway :: SRoundingMode
- sRoundTowardPositive :: SRoundingMode
- sRoundTowardNegative :: SRoundingMode
- sRoundTowardZero :: SRoundingMode
- sRNE :: SRoundingMode
- sRNA :: SRoundingMode
- sRTP :: SRoundingMode
- sRTN :: SRoundingMode
- sRTZ :: SRoundingMode
- class (HasKind a, Typeable a) => SymVal a where
  - mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV a)
  - literal :: a -> SBV a
  - fromCV :: CV -> a
  - isConcretely :: SBV a -> (a -> Bool) -> Bool
  - forall :: MonadSymbolic m => String -> m (SBV a)
  - forall_ :: MonadSymbolic m => m (SBV a)
  - mkForallVars :: MonadSymbolic m => Int -> m [SBV a]
  - exists :: MonadSymbolic m => String -> m (SBV a)
  - exists_ :: MonadSymbolic m => m (SBV a)
  - mkExistVars :: MonadSymbolic m => Int -> m [SBV a]
  - 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
- data CV = CV {
  - _cvKind :: !Kind
  - cvVal :: !CVal
  }
- data CVal
  - = CAlgReal !AlgReal
  - | CInteger !Integer
  - | CFloat !Float
  - | CDouble !Double
  - | CChar !Char
  - | CString !String
  - | CList ![CVal]
  - | CSet !(RCSet CVal)
  - | CUserSort !(Maybe Int, String)
  - | CTuple ![CVal]
  - | CMaybe !(Maybe CVal)
  - | CEither !(Either CVal CVal)
- data AlgReal
  - = AlgRational Bool Rational
  - | AlgPolyRoot (Integer, AlgRealPoly) (Maybe String)
- newtype AlgRealPoly = AlgRealPoly [(Integer, Integer)]
- data ExtCV
  - = Infinite Kind
  - | Epsilon Kind
  - | Interval ExtCV ExtCV
  - | BoundedCV CV
  - | AddExtCV ExtCV ExtCV
  - | MulExtCV ExtCV ExtCV
- data GeneralizedCV
  - = ExtendedCV ExtCV
  - | RegularCV CV
- isRegularCV :: GeneralizedCV -> Bool
- cvSameType :: CV -> CV -> Bool
- cvToBool :: CV -> Bool
- mkConstCV :: Integral a => Kind -> a -> CV
- liftCV2 :: (AlgReal -> AlgReal -> b) -> (Integer -> Integer -> b) -> (Float -> Float -> b) -> (Double -> Double -> b) -> (Char -> Char -> b) -> (String -> String -> b) -> ([CVal] -> [CVal] -> b) -> ([CVal] -> [CVal] -> b) -> (Maybe CVal -> Maybe CVal -> b) -> (Either CVal CVal -> Either CVal CVal -> b) -> ((Maybe Int, String) -> (Maybe Int, String) -> b) -> CV -> CV -> b
- mapCV :: (AlgReal -> AlgReal) -> (Integer -> Integer) -> (Float -> Float) -> (Double -> Double) -> (Char -> Char) -> (String -> String) -> ((Maybe Int, String) -> (Maybe Int, String)) -> CV -> CV
- mapCV2 :: (AlgReal -> AlgReal -> AlgReal) -> (Integer -> Integer -> Integer) -> (Float -> Float -> Float) -> (Double -> Double -> Double) -> (Char -> Char -> Char) -> (String -> String -> String) -> ((Maybe Int, String) -> (Maybe Int, String) -> (Maybe Int, String)) -> CV -> CV -> CV
- data SV = SV !Kind !NodeId
- trueSV :: SV
- falseSV :: SV
- trueCV :: CV
- falseCV :: CV
- normCV :: CV -> CV
- data SVal = SVal !Kind !(Either CV (Cached SV))
- 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
- sAnd :: [SBool] -> SBool
- sOr :: [SBool] -> SBool
- sAny :: (a -> SBool) -> [a] -> SBool
- sAll :: (a -> SBool) -> [a] -> SBool
- fromBool :: Bool -> SBool
- newtype SBV a = SBV {
  - unSBV :: SVal
  }
- newtype NodeId = NodeId Int
- mkSymSBV :: forall a m. MonadSymbolic m => Maybe Quantifier -> Kind -> Maybe String -> m (SBV a)
- data ArrayContext
  - = ArrayFree (Maybe SV)
  - | ArrayMutate ArrayIndex SV SV
  - | ArrayMerge SV ArrayIndex ArrayIndex
- type ArrayInfo = (String, (Kind, Kind), ArrayContext)
- 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
  - newArrayInState :: (HasKind a, HasKind b) => Maybe String -> Maybe (SBV b) -> State -> IO (array a b)
- newtype SFunArray a b = SFunArray {
  - unSFunArray :: SFunArr
  }
- newtype SArray a b = SArray {
  - unSArray :: SArr
  }
- sbvToSV :: State -> SBV a -> IO SV
- sbvToSymSV :: MonadSymbolic m => SBV a -> m SV
- forceSVArg :: SV -> IO ()
- data SBVExpr = SBVApp !Op ![SV]
- newExpr :: State -> Kind -> SBVExpr -> IO SV
- cache :: (State -> IO a) -> Cached a
- data Cached a
- uncache :: Cached SV -> State -> IO SV
- uncacheAI :: Cached ArrayIndex -> State -> IO ArrayIndex
- 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
  - isUnbounded :: a -> Bool
  - isUninterpreted :: 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 Op
  - = Plus
  - | Times
  - | Minus
  - | UNeg
  - | Abs
  - | Quot
  - | Rem
  - | Equal
  - | NotEqual
  - | LessThan
  - | GreaterThan
  - | LessEq
  - | GreaterEq
  - | Ite
  - | And
  - | Or
  - | XOr
  - | Not
  - | Shl
  - | Shr
  - | Rol Int
  - | Ror Int
  - | Extract Int Int
  - | Join
  - | LkUp (Int, Kind, Kind, Int) !SV !SV
  - | ArrEq ArrayIndex ArrayIndex
  - | ArrRead ArrayIndex
  - | KindCast Kind Kind
  - | Uninterpreted String
  - | Label String
  - | IEEEFP FPOp
  - | PseudoBoolean PBOp
  - | OverflowOp OvOp
  - | StrOp StrOp
  - | SeqOp SeqOp
  - | SetOp SetOp
  - | TupleConstructor Int
  - | TupleAccess Int Int
  - | EitherConstructor Kind Kind Bool
  - | EitherIs Kind Kind Bool
  - | EitherAccess Bool
  - | MaybeConstructor Kind Bool
  - | MaybeIs Kind Bool
  - | MaybeAccess
- data PBOp
  - = PB_AtMost Int
  - | PB_AtLeast Int
  - | PB_Exactly Int
  - | PB_Le [Int] Int
  - | PB_Ge [Int] Int
  - | PB_Eq [Int] Int
- data FPOp
  - = FP_Cast Kind Kind SV
  - | FP_Reinterpret Kind Kind
  - | FP_Abs
  - | FP_Neg
  - | FP_Add
  - | FP_Sub
  - | FP_Mul
  - | FP_Div
  - | FP_FMA
  - | FP_Sqrt
  - | FP_Rem
  - | FP_RoundToIntegral
  - | FP_Min
  - | FP_Max
  - | FP_ObjEqual
  - | FP_IsNormal
  - | FP_IsSubnormal
  - | FP_IsZero
  - | FP_IsInfinite
  - | FP_IsNaN
  - | FP_IsNegative
  - | FP_IsPositive
- data StrOp
  - = StrConcat
  - | StrLen
  - | StrUnit
  - | StrNth
  - | StrSubstr
  - | StrIndexOf
  - | StrContains
  - | StrPrefixOf
  - | StrSuffixOf
  - | StrReplace
  - | StrStrToNat
  - | StrNatToStr
  - | StrInRe RegExp
- data SeqOp
  - = SeqConcat
  - | SeqLen
  - | SeqUnit
  - | SeqNth
  - | SeqSubseq
  - | SeqIndexOf
  - | SeqContains
  - | SeqPrefixOf
  - | SeqSuffixOf
  - | SeqReplace
- data RegExp
  - = Literal String
  - | All
  - | None
  - | Range Char Char
  - | Conc [RegExp]
  - | KStar RegExp
  - | KPlus RegExp
  - | Opt RegExp
  - | Loop Int Int RegExp
  - | Union [RegExp]
  - | Inter RegExp RegExp
- type NamedSymVar = (SV, String)
- getTableIndex :: State -> Kind -> Kind -> [SV] -> IO Int
- newtype SBVPgm = SBVPgm {
  - pgmAssignments :: Seq (SV, SBVExpr)
  }
- type Symbolic = SymbolicT IO
- runSymbolic :: MonadIO m => SBVRunMode -> SymbolicT m a -> m (a, Result)
- data State
- getPathCondition :: State -> SBool
- extendPathCondition :: State -> (SBool -> SBool) -> State
- inSMTMode :: State -> IO Bool
- data SBVRunMode
  - = SMTMode QueryContext IStage Bool SMTConfig
  - | CodeGen
  - | Concrete (Maybe (Bool, [((Quantifier, NamedSymVar), Maybe CV)]))
- data Kind
  - = KBool
  - | KBounded !Bool !Int
  - | KUnbounded
  - | KReal
  - | KUninterpreted String (Either String [String])
  - | KFloat
  - | KDouble
  - | KChar
  - | KString
  - | KList Kind
  - | KSet Kind
  - | KTuple [Kind]
  - | KMaybe Kind
  - | KEither Kind Kind
- class Outputtable a where
  - output :: MonadSymbolic m => a -> m a
- data Result = Result {
  - reskinds :: Set Kind
  - resTraces :: [(String, CV)]
  - resObservables :: [(String, CV -> Bool, SV)]
  - resUISegs :: [(String, [String])]
  - resInputs :: ([(Quantifier, NamedSymVar)], [NamedSymVar])
  - resConsts :: [(SV, CV)]
  - resTables :: [((Int, Kind, Kind), [SV])]
  - resArrays :: [(Int, ArrayInfo)]
  - resUIConsts :: [(String, SBVType)]
  - resAxioms :: [(String, [String])]
  - resAsgns :: SBVPgm
  - resConstraints :: Seq (Bool, [(String, String)], SV)
  - resAssertions :: [(String, Maybe CallStack, SV)]
  - resOutputs :: [SV]
  }
- class SolverContext m where
  - constrain :: SBool -> m ()
  - softConstrain :: SBool -> m ()
  - namedConstraint :: String -> SBool -> m ()
  - constrainWithAttribute :: [(String, String)] -> SBool -> m ()
  - setInfo :: String -> [String] -> m ()
  - setOption :: SMTOption -> m ()
  - setLogic :: Logic -> m ()
  - addAxiom :: String -> [String] -> m ()
  - setTimeOut :: Integer -> m ()
  - contextState :: m State
- internalVariable :: State -> Kind -> IO SV
- internalConstraint :: State -> Bool -> [(String, String)] -> SVal -> IO ()
- isCodeGenMode :: State -> IO Bool
- newtype SBVType = SBVType [Kind]
- newUninterpreted :: State -> String -> SBVType -> Maybe [String] -> IO ()
- data Quantifier
  - = ALL
  - | EX
- needsExistentials :: [Quantifier] -> Bool
- data SMTLibPgm = SMTLibPgm SMTLibVersion [String]
- data SMTLibVersion = SMTLib2
- smtLibVersionExtension :: SMTLibVersion -> String
- smtLibReservedNames :: [String]
- data SolverCapabilities = SolverCapabilities {
  - supportsQuantifiers :: Bool
  - supportsUninterpretedSorts :: Bool
  - supportsUnboundedInts :: Bool
  - supportsReals :: Bool
  - supportsApproxReals :: Bool
  - supportsIEEE754 :: Bool
  - supportsSets :: Bool
  - supportsOptimization :: Bool
  - supportsPseudoBooleans :: Bool
  - supportsCustomQueries :: Bool
  - supportsGlobalDecls :: Bool
  - supportsDataTypes :: Bool
  - supportsFlattenedModels :: Maybe [String]
  }
- extractSymbolicSimulationState :: State -> IO Result
- data SMTScript = SMTScript {
  - scriptBody :: String
  - scriptModel :: [String]
  }
- data Solver
  - = Z3
  - | Yices
  - | Boolector
  - | CVC4
  - | MathSAT
  - | ABC
- data SMTSolver = SMTSolver {
  - name :: Solver
  - executable :: String
  - preprocess :: String -> String
  - options :: SMTConfig -> [String]
  - engine :: SMTEngine
  - capabilities :: SolverCapabilities
  }
- data SMTResult
  - = Unsatisfiable SMTConfig (Maybe [String])
  - | Satisfiable SMTConfig SMTModel
  - | SatExtField SMTConfig SMTModel
  - | Unknown SMTConfig SMTReasonUnknown
  - | ProofError SMTConfig [String] (Maybe SMTResult)
- data SMTModel = SMTModel {
  - modelObjectives :: [(String, GeneralizedCV)]
  - modelBindings :: Maybe [((Quantifier, NamedSymVar), Maybe CV)]
  - modelAssocs :: [(String, CV)]
  - modelUIFuns :: [(String, (SBVType, ([([CV], CV)], CV)))]
  }
- data SMTConfig = SMTConfig {
  - verbose :: Bool
  - timing :: Timing
  - printBase :: Int
  - printRealPrec :: Int
  - satCmd :: String
  - allSatMaxModelCount :: Maybe Int
  - allSatPrintAlong :: Bool
  - satTrackUFs :: Bool
  - isNonModelVar :: String -> Bool
  - validateModel :: Bool
  - optimizeValidateConstraints :: Bool
  - transcript :: Maybe FilePath
  - smtLibVersion :: SMTLibVersion
  - solver :: SMTSolver
  - allowQuantifiedQueries :: Bool
  - roundingMode :: RoundingMode
  - solverSetOptions :: [SMTOption]
  - ignoreExitCode :: Bool
  - redirectVerbose :: Maybe FilePath
  }
- data OptimizeStyle
  - = Lexicographic
  - | Independent
  - | Pareto (Maybe Int)
- data Penalty
  - = DefaultPenalty
  - | Penalty Rational (Maybe String)
- data Objective a
  - = Minimize String a
  - | Maximize String a
  - | AssertWithPenalty String a Penalty
- data QueryState = QueryState {
  - queryAsk :: Maybe Int -> String -> IO String
  - querySend :: Maybe Int -> String -> IO ()
  - queryRetrieveResponse :: Maybe Int -> IO String
  - queryConfig :: SMTConfig
  - queryTerminate :: IO ()
  - queryTimeOutValue :: Maybe Int
  - queryAssertionStackDepth :: Int
  }
- newtype QueryT m a = QueryT {
  - runQueryT :: ReaderT State m a
  }
- newtype SMTProblem = SMTProblem {
  - smtLibPgm :: SMTConfig -> SMTLibPgm
  }
- genLiteral :: Integral a => Kind -> a -> SBV b
- genFromCV :: Integral a => CV -> a
- data CV = CV {
  - _cvKind :: !Kind
  - cvVal :: !CVal
  }
- genMkSymVar :: MonadSymbolic m => Kind -> Maybe Quantifier -> Maybe String -> m (SBV a)
- genParse :: Integral a => Kind -> [CV] -> Maybe (a, [CV])
- showModel :: SMTConfig -> SMTModel -> String
- data SMTModel = SMTModel {
  - modelObjectives :: [(String, GeneralizedCV)]
  - modelBindings :: Maybe [((Quantifier, NamedSymVar), Maybe CV)]
  - modelAssocs :: [(String, CV)]
  - modelUIFuns :: [(String, (SBVType, ([([CV], CV)], CV)))]
  }
- liftQRem :: (Eq a, SymVal a) => SBV a -> SBV a -> (SBV a, SBV a)
- liftDMod :: (Ord a, SymVal a, Num a, SDivisible (SBV a)) => SBV a -> SBV a -> (SBV a, SBV a)
- registerKind :: State -> Kind -> IO ()
- compileToC' :: String -> SBVCodeGen a -> IO (a, CgConfig, CgPgmBundle)
- compileToCLib' :: String -> [(String, SBVCodeGen a)] -> IO ([a], CgConfig, CgPgmBundle)
- newtype SBVCodeGen a = SBVCodeGen (StateT CgState Symbolic a)
- cgSym :: Symbolic a -> SBVCodeGen a
- cgInput :: SymVal a => String -> SBVCodeGen (SBV a)
- cgInputArr :: SymVal a => Int -> String -> SBVCodeGen [SBV a]
- cgOutput :: String -> SBV a -> SBVCodeGen ()
- cgOutputArr :: SymVal a => String -> [SBV a] -> SBVCodeGen ()
- cgReturn :: SBV a -> SBVCodeGen ()
- cgReturnArr :: SymVal a => [SBV a] -> SBVCodeGen ()
- svCgInput :: Kind -> String -> SBVCodeGen SVal
- svCgInputArr :: Kind -> Int -> String -> SBVCodeGen [SVal]
- svCgOutput :: String -> SVal -> SBVCodeGen ()
- svCgOutputArr :: String -> [SVal] -> SBVCodeGen ()
- svCgReturn :: SVal -> SBVCodeGen ()
- svCgReturnArr :: [SVal] -> SBVCodeGen ()
- cgPerformRTCs :: Bool -> SBVCodeGen ()
- cgSetDriverValues :: [Integer] -> SBVCodeGen ()
- cgAddPrototype :: [String] -> SBVCodeGen ()
- cgAddDecl :: [String] -> SBVCodeGen ()
- cgAddLDFlags :: [String] -> SBVCodeGen ()
- cgIgnoreSAssert :: Bool -> SBVCodeGen ()
- cgOverwriteFiles :: Bool -> SBVCodeGen ()
- cgShowU8UsingHex :: Bool -> SBVCodeGen ()
- cgIntegerSize :: Int -> SBVCodeGen ()
- cgSRealType :: CgSRealType -> SBVCodeGen ()
- data CgSRealType
  - = CgFloat
  - | CgDouble
  - | CgLongDouble
- class CgTarget a where
  - targetName :: a -> String
  - translate :: a -> CgConfig -> String -> CgState -> Result -> CgPgmBundle
- data CgConfig = CgConfig {
  - cgRTC :: Bool
  - cgInteger :: Maybe Int
  - cgReal :: Maybe CgSRealType
  - cgDriverVals :: [Integer]
  - cgGenDriver :: Bool
  - cgGenMakefile :: Bool
  - cgIgnoreAsserts :: Bool
  - cgOverwriteGenerated :: Bool
  - cgShowU8InHex :: Bool
  }
- data CgState = CgState {
  - cgInputs :: [(String, CgVal)]
  - cgOutputs :: [(String, CgVal)]
  - cgReturns :: [CgVal]
  - cgPrototypes :: [String]
  - cgDecls :: [String]
  - cgLDFlags :: [String]
  - cgFinalConfig :: CgConfig
  }
- data CgPgmBundle = CgPgmBundle (Maybe Int, Maybe CgSRealType) [(FilePath, (CgPgmKind, [Doc]))]
- data CgPgmKind
  - = CgMakefile [String]
  - | CgHeader [Doc]
  - | CgSource
  - | CgDriver
- data CgVal
  - = CgAtomic SV
  - | CgArray [SV]
- defaultCgConfig :: CgConfig
- initCgState :: CgState
- isCgDriver :: CgPgmKind -> Bool
- isCgMakefile :: CgPgmKind -> Bool
- cgGenerateDriver :: Bool -> SBVCodeGen ()
- cgGenerateMakefile :: Bool -> SBVCodeGen ()
- codeGen :: CgTarget l => l -> CgConfig -> String -> SBVCodeGen a -> IO (a, CgConfig, CgPgmBundle)
- renderCgPgmBundle :: Maybe FilePath -> (CgConfig, CgPgmBundle) -> IO ()
- fpMaxH :: RealFloat a => a -> a -> a
- fpMinH :: RealFloat a => a -> a -> a
- fp2fp :: (RealFloat a, RealFloat b) => a -> b
- fpRemH :: RealFloat a => a -> a -> a
- fpRoundToIntegralH :: RealFloat a => a -> a
- fpIsEqualObjectH :: RealFloat a => a -> a -> Bool
- fpCompareObjectH :: RealFloat a => a -> a -> Ordering
- fpIsNormalizedH :: RealFloat a => a -> Bool
- class PrettyNum a where
  - hexS :: a -> String
  - binS :: a -> String
  - hexP :: a -> String
  - binP :: a -> String
  - hex :: a -> String
  - bin :: a -> String
- readBin :: Num a => String -> a
- shex :: (Show a, Integral a) => Bool -> Bool -> (Bool, Int) -> a -> String
- chex :: (Show a, Integral a) => Bool -> Bool -> (Bool, Int) -> a -> String
- shexI :: Bool -> Bool -> Integer -> String
- sbin :: (Show a, Integral a) => Bool -> Bool -> (Bool, Int) -> a -> String
- sbinI :: Bool -> Bool -> Integer -> String
- showCFloat :: Float -> String
- showCDouble :: Double -> String
- showHFloat :: Float -> String
- showHDouble :: Double -> String
- showSMTFloat :: RoundingMode -> Float -> String
- showSMTDouble :: RoundingMode -> Double -> String
- smtRoundingMode :: RoundingMode -> String
- cvToSMTLib :: RoundingMode -> CV -> String
- mkSkolemZero :: RoundingMode -> Kind -> String
- data Timing
  - = NoTiming
  - | PrintTiming
  - | SaveTiming (IORef NominalDiffTime)
- showTDiff :: NominalDiffTime -> String
- sendStringToSolver :: (MonadIO m, MonadQuery m) => String -> m ()
- sendRequestToSolver :: (MonadIO m, MonadQuery m) => String -> m String
- retrieveResponseFromSolver :: (MonadIO m, MonadQuery m) => String -> Maybe Int -> m [String]
- addSValOptGoal :: MonadSymbolic m => Objective SVal -> m ()
- sFloatAsComparableSWord32 :: SFloat -> SWord32
- sDoubleAsComparableSWord64 :: SDouble -> SWord64

# Running symbolic programs manually

data Result Source #

Result of running a symbolic computation

Constructors

Result |

Fields

- reskinds :: Set Kind

  kinds used in the program

- resTraces :: [(String, CV)]

  quick-check counter-example information (if any)

- resObservables :: [(String, CV -> Bool, SV)]

  observable expressions (part of the model)

- resUISegs :: [(String, [String])]

  uninterpeted code segments

- resInputs :: ([(Quantifier, NamedSymVar)], [NamedSymVar])

  inputs (possibly existential) + tracker vars

- resConsts :: [(SV, CV)]

  constants

- resTables :: [((Int, Kind, Kind), [SV])]

  tables (automatically constructed) (tableno, index-type, result-type) elts

- resArrays :: [(Int, ArrayInfo)]

  arrays (user specified)

- resUIConsts :: [(String, SBVType)]

  uninterpreted constants

- resAxioms :: [(String, [String])]

  axioms

- resAsgns :: SBVPgm

  assignments

- resConstraints :: Seq (Bool, [(String, String)], SV)

  additional constraints (boolean)

- resAssertions :: [(String, Maybe CallStack, SV)]

  assertions

- resOutputs :: [SV]

  outputs

#### Instances

Instances details

Show Result Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> Result -> ShowS show :: Result -> String showList :: [Result] -> ShowS
NFData Result Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Result -> ()

data SBVRunMode Source #

Different means of running a symbolic piece of code

Constructors

SMTMode QueryContext IStage Bool SMTConfig | In regular mode, with a stage. Bool is True if this is SAT.
CodeGen | Code generation mode.
Concrete (Maybe (Bool, [((Quantifier, NamedSymVar), Maybe CV)])) | Concrete simulation mode, with given environment if any. If Nothing: Random.

#### Instances

Instances details

Show SBVRunMode Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SBVRunMode -> ShowS show :: SBVRunMode -> String showList :: [SBVRunMode] -> ShowS

data IStage Source #

Stage of an interactive run

Constructors

ISetup |
ISafe |
IRun |

data QueryContext Source #

Query execution context

Constructors

QueryInternal | Triggered from inside SBV
QueryExternal | Triggered from user code

#### Instances

Instances details

Show QueryContext Source # | Show instance for `QueryContext`, for debugging purposes
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> QueryContext -> ShowS show :: QueryContext -> String showList :: [QueryContext] -> ShowS

# Solver capabilities

data SolverCapabilities Source #

Translation tricks needed for specific capabilities afforded by each solver

Constructors

SolverCapabilities |

Fields

- supportsQuantifiers :: Bool

  Supports SMT-Lib2 style quantifiers?

- supportsUninterpretedSorts :: Bool

  Supports SMT-Lib2 style uninterpreted-sorts

- supportsUnboundedInts :: Bool

  Supports unbounded integers?

- supportsReals :: Bool

  Supports reals?

- supportsApproxReals :: Bool

  Supports printing of approximations of reals?

- supportsIEEE754 :: Bool

  Supports floating point numbers?

- supportsSets :: Bool

  Supports set operations?

- supportsOptimization :: Bool

  Supports optimization routines?

- supportsPseudoBooleans :: Bool

  Supports pseudo-boolean operations?

- supportsCustomQueries :: Bool

  Supports interactive queries per SMT-Lib?

- supportsGlobalDecls :: Bool

  Supports global declarations? (Needed for push-pop.)

- supportsDataTypes :: Bool

  Supports datatypes?

- supportsFlattenedModels :: Maybe [String]

  Supports flattened model output? (With given config lines.)

# Internal structures useful for low-level programming

type SBool = SBV Bool Source #

A symbolic boolean/bit

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 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 SInteger = SBV Integer Source #

Infinite precision signed symbolic value

type SReal = SBV AlgReal Source #

Infinite precision symbolic algebraic real value

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 SChar = SBV Char Source #

A symbolic character. Note that, as far as SBV's symbolic strings are concerned, a character is currently an 8-bit unsigned value, corresponding to the ISO-8859-1 (Latin-1) character set: http://en.wikipedia.org/wiki/ISO/IEC_8859-1. A Haskell `Char`, on the other hand, is based on unicode. Therefore, there isn't a 1-1 correspondence between a Haskell character and an SBV character for the time being. This limitation is due to the SMT-solvers only supporting this particular subset. However, there is a pending proposal to add support for unicode, and SBV will track these changes to have full unicode support as solvers become available. For details, see: http://smtlib.cs.uiowa.edu/theories-UnicodeStrings.shtml

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.

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.

type SEither a b = SBV (Either a b) Source #

Symbolic `Either`

type SMaybe a = SBV (Maybe a) Source #

Symbolic `Maybe`

type STuple a b = SBV (a, b) Source #

Symbolic 2-tuple. NB. `STuple` and `STuple2` are equivalent.

type STuple2 a b = SBV (a, b) Source #

Symbolic 2-tuple. NB. `STuple` and `STuple2` are equivalent.

type STuple3 a b c = SBV (a, b, c) Source #

Symbolic 3-tuple.

type STuple4 a b c d = SBV (a, b, c, d) Source #

Symbolic 4-tuple.

type STuple5 a b c d e = SBV (a, b, c, d, e) Source #

Symbolic 5-tuple.

type STuple6 a b c d e f = SBV (a, b, c, d, e, f) Source #

Symbolic 6-tuple.

type STuple7 a b c d e f g = SBV (a, b, c, d, e, f, g) Source #

Symbolic 7-tuple.

type STuple8 a b c d e f g h = SBV (a, b, c, d, e, f, g, h) Source #

Symbolic 8-tuple.

data RCSet a Source #

A `RCSet` is either a regular set or a set given by its complement from the corresponding universal set.

Constructors

RegularSet (Set a) |
ComplementSet (Set a) |

#### Instances

Instances details

Show a => Show (RCSet a) Source # | Show instance. Regular sets are shown as usual. Complements are shown "U -" notation.
Instance details Defined in Data.SBV.Core.Concrete Methods showsPrec :: Int -> RCSet a -> ShowS show :: RCSet a -> String showList :: [RCSet a] -> ShowS
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 #

isUnbounded :: RCSet a -> Bool Source #

isUninterpreted :: 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 #

(Ord a, SymVal a) => SymVal (RCSet a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (RCSet a)) Source #

forall_ :: MonadSymbolic m => m (SBV (RCSet a)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (RCSet a)] Source #

exists :: MonadSymbolic m => String -> m (SBV (RCSet a)) Source #

exists_ :: MonadSymbolic m => m (SBV (RCSet a)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (RCSet a)] 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 #

type SSet a = SBV (RCSet a) Source #

Symbolic `Set`. Note that we use `RCSet`, which supports both regular sets and complements, i.e., those obtained from the universal set (of the right type) by removing elements.

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 both `SDouble` and `SFloat`.

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

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

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

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

Instance details

Defined in Data.SBV.Core.Symbolic

Methods

succ :: RoundingMode -> RoundingMode

pred :: RoundingMode -> RoundingMode

toEnum :: Int -> RoundingMode

fromEnum :: RoundingMode -> Int

enumFrom :: RoundingMode -> [RoundingMode]

enumFromThen :: RoundingMode -> RoundingMode -> [RoundingMode]

enumFromTo :: RoundingMode -> RoundingMode -> [RoundingMode]

enumFromThenTo :: RoundingMode -> RoundingMode -> RoundingMode -> [RoundingMode]

Eq RoundingMode Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: RoundingMode -> RoundingMode -> Bool (/=) :: RoundingMode -> RoundingMode -> Bool
Data RoundingMode Source # |

Instance details

Defined in Data.SBV.Core.Symbolic

Methods

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

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

toConstr :: RoundingMode -> Constr

dataTypeOf :: RoundingMode -> DataType

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

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

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

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

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

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

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

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

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

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

Ord RoundingMode Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: RoundingMode -> RoundingMode -> Ordering (<) :: RoundingMode -> RoundingMode -> Bool (<=) :: RoundingMode -> RoundingMode -> Bool (>) :: RoundingMode -> RoundingMode -> Bool (>=) :: RoundingMode -> RoundingMode -> Bool max :: RoundingMode -> RoundingMode -> RoundingMode min :: RoundingMode -> RoundingMode -> RoundingMode
Read RoundingMode Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods readsPrec :: Int -> ReadS RoundingMode readList :: ReadS [RoundingMode] readPrec :: ReadPrec RoundingMode readListPrec :: ReadPrec [RoundingMode]
Show RoundingMode Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> RoundingMode -> ShowS show :: RoundingMode -> String showList :: [RoundingMode] -> ShowS
HasKind RoundingMode Source # | `RoundingMode` kind

Instance details

Defined in Data.SBV.Core.Symbolic

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 #

isUnbounded :: RoundingMode -> Bool Source #

isUninterpreted :: 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 #

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

Instance details

Defined in Data.SBV.Core.Data

Methods

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

literal :: RoundingMode -> SBV RoundingMode Source #

fromCV :: CV -> RoundingMode Source #

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

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

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

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

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

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

mkExistVars :: MonadSymbolic m => Int -> m [SBV RoundingMode] 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 #

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`

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`

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 => Maybe Quantifier -> Maybe String -> m (SBV a) Source #

Generalization of `mkSymVal`

default mkSymVal :: (MonadSymbolic m, Read a, Data a) => Maybe Quantifier -> 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?

forall :: MonadSymbolic m => String -> m (SBV a) Source #

Generalization of `forall`

forall_ :: MonadSymbolic m => m (SBV a) Source #

Generalization of `forall_`

mkForallVars :: MonadSymbolic m => Int -> m [SBV a] Source #

Generalization of `mkForallVars`

exists :: MonadSymbolic m => String -> m (SBV a) Source #

Generalization of `exists`

exists_ :: MonadSymbolic m => m (SBV a) Source #

Generalization of `exists_`

mkExistVars :: MonadSymbolic m => Int -> m [SBV a] Source #

Generalization of `mkExistVars`

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 Bool Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Bool) Source #

literal :: Bool -> SBV Bool Source #

fromCV :: CV -> Bool Source #

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

forall :: MonadSymbolic m => String -> m (SBV Bool) Source #

forall_ :: MonadSymbolic m => m (SBV Bool) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Bool] Source #

exists :: MonadSymbolic m => String -> m (SBV Bool) Source #

exists_ :: MonadSymbolic m => m (SBV Bool) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV 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 => Maybe Quantifier -> Maybe String -> m (SBV Char) Source #

literal :: Char -> SBV Char Source #

fromCV :: CV -> Char Source #

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

forall :: MonadSymbolic m => String -> m (SBV Char) Source #

forall_ :: MonadSymbolic m => m (SBV Char) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Char] Source #

exists :: MonadSymbolic m => String -> m (SBV Char) Source #

exists_ :: MonadSymbolic m => m (SBV Char) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Char] 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 => Maybe Quantifier -> Maybe String -> m (SBV Double) Source #

literal :: Double -> SBV Double Source #

fromCV :: CV -> Double Source #

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

forall :: MonadSymbolic m => String -> m (SBV Double) Source #

forall_ :: MonadSymbolic m => m (SBV Double) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Double] Source #

exists :: MonadSymbolic m => String -> m (SBV Double) Source #

exists_ :: MonadSymbolic m => m (SBV Double) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Double] 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 => Maybe Quantifier -> Maybe String -> m (SBV Float) Source #

literal :: Float -> SBV Float Source #

fromCV :: CV -> Float Source #

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

forall :: MonadSymbolic m => String -> m (SBV Float) Source #

forall_ :: MonadSymbolic m => m (SBV Float) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Float] Source #

exists :: MonadSymbolic m => String -> m (SBV Float) Source #

exists_ :: MonadSymbolic m => m (SBV Float) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Float] 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 #

SymVal Int8 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Int8) Source #

literal :: Int8 -> SBV Int8 Source #

fromCV :: CV -> Int8 Source #

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

forall :: MonadSymbolic m => String -> m (SBV Int8) Source #

forall_ :: MonadSymbolic m => m (SBV Int8) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Int8] Source #

exists :: MonadSymbolic m => String -> m (SBV Int8) Source #

exists_ :: MonadSymbolic m => m (SBV Int8) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Int8] 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 Int16 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Int16) Source #

literal :: Int16 -> SBV Int16 Source #

fromCV :: CV -> Int16 Source #

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

forall :: MonadSymbolic m => String -> m (SBV Int16) Source #

forall_ :: MonadSymbolic m => m (SBV Int16) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Int16] Source #

exists :: MonadSymbolic m => String -> m (SBV Int16) Source #

exists_ :: MonadSymbolic m => m (SBV Int16) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Int16] 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 => Maybe Quantifier -> Maybe String -> m (SBV Int32) Source #

literal :: Int32 -> SBV Int32 Source #

fromCV :: CV -> Int32 Source #

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

forall :: MonadSymbolic m => String -> m (SBV Int32) Source #

forall_ :: MonadSymbolic m => m (SBV Int32) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Int32] Source #

exists :: MonadSymbolic m => String -> m (SBV Int32) Source #

exists_ :: MonadSymbolic m => m (SBV Int32) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Int32] 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 => Maybe Quantifier -> Maybe String -> m (SBV Int64) Source #

literal :: Int64 -> SBV Int64 Source #

fromCV :: CV -> Int64 Source #

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

forall :: MonadSymbolic m => String -> m (SBV Int64) Source #

forall_ :: MonadSymbolic m => m (SBV Int64) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Int64] Source #

exists :: MonadSymbolic m => String -> m (SBV Int64) Source #

exists_ :: MonadSymbolic m => m (SBV Int64) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Int64] 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 Integer Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Integer) Source #

literal :: Integer -> SBV Integer Source #

fromCV :: CV -> Integer Source #

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

forall :: MonadSymbolic m => String -> m (SBV Integer) Source #

forall_ :: MonadSymbolic m => m (SBV Integer) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Integer] Source #

exists :: MonadSymbolic m => String -> m (SBV Integer) Source #

exists_ :: MonadSymbolic m => m (SBV Integer) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Integer] 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 Word8 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Word8) Source #

literal :: Word8 -> SBV Word8 Source #

fromCV :: CV -> Word8 Source #

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

forall :: MonadSymbolic m => String -> m (SBV Word8) Source #

forall_ :: MonadSymbolic m => m (SBV Word8) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Word8] Source #

exists :: MonadSymbolic m => String -> m (SBV Word8) Source #

exists_ :: MonadSymbolic m => m (SBV Word8) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Word8] 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 Word16 Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Word16) Source #

literal :: Word16 -> SBV Word16 Source #

fromCV :: CV -> Word16 Source #

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

forall :: MonadSymbolic m => String -> m (SBV Word16) Source #

forall_ :: MonadSymbolic m => m (SBV Word16) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Word16] Source #

exists :: MonadSymbolic m => String -> m (SBV Word16) Source #

exists_ :: MonadSymbolic m => m (SBV Word16) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Word16] 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 => Maybe Quantifier -> Maybe String -> m (SBV Word32) Source #

literal :: Word32 -> SBV Word32 Source #

fromCV :: CV -> Word32 Source #

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

forall :: MonadSymbolic m => String -> m (SBV Word32) Source #

forall_ :: MonadSymbolic m => m (SBV Word32) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Word32] Source #

exists :: MonadSymbolic m => String -> m (SBV Word32) Source #

exists_ :: MonadSymbolic m => m (SBV Word32) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Word32] 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 => Maybe Quantifier -> Maybe String -> m (SBV Word64) Source #

literal :: Word64 -> SBV Word64 Source #

fromCV :: CV -> Word64 Source #

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

forall :: MonadSymbolic m => String -> m (SBV Word64) Source #

forall_ :: MonadSymbolic m => m (SBV Word64) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Word64] Source #

exists :: MonadSymbolic m => String -> m (SBV Word64) Source #

exists_ :: MonadSymbolic m => m (SBV Word64) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Word64] 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 () Source # | SymVal for 0-tuple (i.e., unit)

Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

fromCV :: CV -> () Source #

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

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

forall_ :: MonadSymbolic m => m (SBV ()) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV ()] Source #

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

exists_ :: MonadSymbolic m => m (SBV ()) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV ()] 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 AlgReal Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

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

literal :: AlgReal -> SBV AlgReal Source #

fromCV :: CV -> AlgReal Source #

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

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

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

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

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

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

mkExistVars :: MonadSymbolic m => Int -> m [SBV AlgReal] 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 => Maybe Quantifier -> Maybe String -> m (SBV RoundingMode) Source #

literal :: RoundingMode -> SBV RoundingMode Source #

fromCV :: CV -> RoundingMode Source #

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

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

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

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

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

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

mkExistVars :: MonadSymbolic m => Int -> m [SBV RoundingMode] 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 => Maybe Quantifier -> Maybe String -> m (SBV State) Source #

literal :: State -> SBV State Source #

fromCV :: CV -> State Source #

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

forall :: MonadSymbolic m => String -> m (SBV State) Source #

forall_ :: MonadSymbolic m => m (SBV State) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV State] Source #

exists :: MonadSymbolic m => String -> m (SBV State) Source #

exists_ :: MonadSymbolic m => m (SBV State) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV State] 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 => Maybe Quantifier -> Maybe String -> m (SBV E) Source #

literal :: E -> SBV E Source #

fromCV :: CV -> E Source #

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

forall :: MonadSymbolic m => String -> m (SBV E) Source #

forall_ :: MonadSymbolic m => m (SBV E) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV E] Source #

exists :: MonadSymbolic m => String -> m (SBV E) Source #

exists_ :: MonadSymbolic m => m (SBV E) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV E] 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 HumanHeightInCm Source # | Similarly here, for the `SymVal` instance.

Instance details

Defined in Documentation.SBV.Examples.Misc.Newtypes

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV HumanHeightInCm) Source #

literal :: HumanHeightInCm -> SBV HumanHeightInCm Source #

fromCV :: CV -> HumanHeightInCm Source #

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

forall :: MonadSymbolic m => String -> m (SBV HumanHeightInCm) Source #

forall_ :: MonadSymbolic m => m (SBV HumanHeightInCm) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV HumanHeightInCm] Source #

exists :: MonadSymbolic m => String -> m (SBV HumanHeightInCm) Source #

exists_ :: MonadSymbolic m => m (SBV HumanHeightInCm) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV HumanHeightInCm] 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 => Maybe Quantifier -> Maybe String -> m (SBV Metres) Source #

literal :: Metres -> SBV Metres Source #

fromCV :: CV -> Metres Source #

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

forall :: MonadSymbolic m => String -> m (SBV Metres) Source #

forall_ :: MonadSymbolic m => m (SBV Metres) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Metres] Source #

exists :: MonadSymbolic m => String -> m (SBV Metres) Source #

exists_ :: MonadSymbolic m => m (SBV Metres) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Metres] 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 => Maybe Quantifier -> Maybe String -> m (SBV Day) Source #

literal :: Day -> SBV Day Source #

fromCV :: CV -> Day Source #

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

forall :: MonadSymbolic m => String -> m (SBV Day) Source #

forall_ :: MonadSymbolic m => m (SBV Day) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Day] Source #

exists :: MonadSymbolic m => String -> m (SBV Day) Source #

exists_ :: MonadSymbolic m => m (SBV Day) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Day] 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 Color Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Color) Source #

literal :: Color -> SBV Color Source #

fromCV :: CV -> Color Source #

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

forall :: MonadSymbolic m => String -> m (SBV Color) Source #

forall_ :: MonadSymbolic m => m (SBV Color) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Color] Source #

exists :: MonadSymbolic m => String -> m (SBV Color) Source #

exists_ :: MonadSymbolic m => m (SBV Color) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Color] 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 => Maybe Quantifier -> Maybe String -> m (SBV Nationality) Source #

literal :: Nationality -> SBV Nationality Source #

fromCV :: CV -> Nationality Source #

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

forall :: MonadSymbolic m => String -> m (SBV Nationality) Source #

forall_ :: MonadSymbolic m => m (SBV Nationality) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Nationality] Source #

exists :: MonadSymbolic m => String -> m (SBV Nationality) Source #

exists_ :: MonadSymbolic m => m (SBV Nationality) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Nationality] 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 Beverage Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Beverage) Source #

literal :: Beverage -> SBV Beverage Source #

fromCV :: CV -> Beverage Source #

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

forall :: MonadSymbolic m => String -> m (SBV Beverage) Source #

forall_ :: MonadSymbolic m => m (SBV Beverage) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Beverage] Source #

exists :: MonadSymbolic m => String -> m (SBV Beverage) Source #

exists_ :: MonadSymbolic m => m (SBV Beverage) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Beverage] 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 Pet Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Pet) Source #

literal :: Pet -> SBV Pet Source #

fromCV :: CV -> Pet Source #

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

forall :: MonadSymbolic m => String -> m (SBV Pet) Source #

forall_ :: MonadSymbolic m => m (SBV Pet) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Pet] Source #

exists :: MonadSymbolic m => String -> m (SBV Pet) Source #

exists_ :: MonadSymbolic m => m (SBV Pet) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Pet] 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 => Maybe Quantifier -> Maybe String -> m (SBV Sport) Source #

literal :: Sport -> SBV Sport Source #

fromCV :: CV -> Sport Source #

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

forall :: MonadSymbolic m => String -> m (SBV Sport) Source #

forall_ :: MonadSymbolic m => m (SBV Sport) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Sport] Source #

exists :: MonadSymbolic m => String -> m (SBV Sport) Source #

exists_ :: MonadSymbolic m => m (SBV Sport) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Sport] 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 => Maybe Quantifier -> Maybe String -> m (SBV Color) Source #

literal :: Color -> SBV Color Source #

fromCV :: CV -> Color Source #

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

forall :: MonadSymbolic m => String -> m (SBV Color) Source #

forall_ :: MonadSymbolic m => m (SBV Color) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Color] Source #

exists :: MonadSymbolic m => String -> m (SBV Color) Source #

exists_ :: MonadSymbolic m => m (SBV Color) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Color] 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 => Maybe Quantifier -> Maybe String -> m (SBV Color) Source #

literal :: Color -> SBV Color Source #

fromCV :: CV -> Color Source #

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

forall :: MonadSymbolic m => String -> m (SBV Color) Source #

forall_ :: MonadSymbolic m => m (SBV Color) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Color] Source #

exists :: MonadSymbolic m => String -> m (SBV Color) Source #

exists_ :: MonadSymbolic m => m (SBV Color) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Color] 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 U2Member Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV U2Member) Source #

literal :: U2Member -> SBV U2Member Source #

fromCV :: CV -> U2Member Source #

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

forall :: MonadSymbolic m => String -> m (SBV U2Member) Source #

forall_ :: MonadSymbolic m => m (SBV U2Member) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV U2Member] Source #

exists :: MonadSymbolic m => String -> m (SBV U2Member) Source #

exists_ :: MonadSymbolic m => m (SBV U2Member) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV U2Member] 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 Location Source # |

Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Location) Source #

literal :: Location -> SBV Location Source #

fromCV :: CV -> Location Source #

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

forall :: MonadSymbolic m => String -> m (SBV Location) Source #

forall_ :: MonadSymbolic m => m (SBV Location) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Location] Source #

exists :: MonadSymbolic m => String -> m (SBV Location) Source #

exists_ :: MonadSymbolic m => m (SBV Location) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Location] 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 Day Source # |

Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV Day) Source #

literal :: Day -> SBV Day Source #

fromCV :: CV -> Day Source #

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

forall :: MonadSymbolic m => String -> m (SBV Day) Source #

forall_ :: MonadSymbolic m => m (SBV Day) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Day] Source #

exists :: MonadSymbolic m => String -> m (SBV Day) Source #

exists_ :: MonadSymbolic m => m (SBV Day) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Day] 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 => Maybe Quantifier -> Maybe String -> m (SBV BinOp) Source #

literal :: BinOp -> SBV BinOp Source #

fromCV :: CV -> BinOp Source #

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

forall :: MonadSymbolic m => String -> m (SBV BinOp) Source #

forall_ :: MonadSymbolic m => m (SBV BinOp) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV BinOp] Source #

exists :: MonadSymbolic m => String -> m (SBV BinOp) Source #

exists_ :: MonadSymbolic m => m (SBV BinOp) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV BinOp] 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 => Maybe Quantifier -> Maybe String -> m (SBV UnOp) Source #

literal :: UnOp -> SBV UnOp Source #

fromCV :: CV -> UnOp Source #

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

forall :: MonadSymbolic m => String -> m (SBV UnOp) Source #

forall_ :: MonadSymbolic m => m (SBV UnOp) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV UnOp] Source #

exists :: MonadSymbolic m => String -> m (SBV UnOp) Source #

exists_ :: MonadSymbolic m => m (SBV UnOp) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV UnOp] 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 => Maybe Quantifier -> Maybe String -> m (SBV B) Source #

literal :: B -> SBV B Source #

fromCV :: CV -> B Source #

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

forall :: MonadSymbolic m => String -> m (SBV B) Source #

forall_ :: MonadSymbolic m => m (SBV B) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV B] Source #

exists :: MonadSymbolic m => String -> m (SBV B) Source #

exists_ :: MonadSymbolic m => m (SBV B) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV B] 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 => Maybe Quantifier -> Maybe String -> m (SBV Q) Source #

literal :: Q -> SBV Q Source #

fromCV :: CV -> Q Source #

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

forall :: MonadSymbolic m => String -> m (SBV Q) Source #

forall_ :: MonadSymbolic m => m (SBV Q) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV Q] Source #

exists :: MonadSymbolic m => String -> m (SBV Q) Source #

exists_ :: MonadSymbolic m => m (SBV Q) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV Q] 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 # | Declare instances to make `L` a usable uninterpreted sort. First we need the `SymVal` instance, with the default definition sufficing.

Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.UISortAllSat

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV L) Source #

literal :: L -> SBV L Source #

fromCV :: CV -> L Source #

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

forall :: MonadSymbolic m => String -> m (SBV L) Source #

forall_ :: MonadSymbolic m => m (SBV L) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV L] Source #

exists :: MonadSymbolic m => String -> m (SBV L) Source #

exists_ :: MonadSymbolic m => m (SBV L) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV L] 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 a => SymVal [a] Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> Maybe String -> m (SBV [a]) Source #

literal :: [a] -> SBV [a] Source #

fromCV :: CV -> [a] Source #

isConcretely :: SBV [a] -> ([a] -> Bool) -> Bool Source #

forall :: MonadSymbolic m => String -> m (SBV [a]) Source #

forall_ :: MonadSymbolic m => m (SBV [a]) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV [a]] Source #

exists :: MonadSymbolic m => String -> m (SBV [a]) Source #

exists_ :: MonadSymbolic m => m (SBV [a]) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV [a]] 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 (Maybe a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (Maybe a)) Source #

forall_ :: MonadSymbolic m => m (SBV (Maybe a)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (Maybe a)] Source #

exists :: MonadSymbolic m => String -> m (SBV (Maybe a)) Source #

exists_ :: MonadSymbolic m => m (SBV (Maybe a)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (Maybe a)] 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 #

(Ord a, SymVal a) => SymVal (RCSet a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (RCSet a)) Source #

forall_ :: MonadSymbolic m => m (SBV (RCSet a)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (RCSet a)] Source #

exists :: MonadSymbolic m => String -> m (SBV (RCSet a)) Source #

exists_ :: MonadSymbolic m => m (SBV (RCSet a)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (RCSet a)] 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, IsNonZero n) => SymVal (IntN n) Source # | `SymVal` instance for `IntN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> 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 #

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

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

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

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

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

mkExistVars :: MonadSymbolic m => Int -> m [SBV (IntN n)] 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, IsNonZero n) => SymVal (WordN n) Source # | `SymVal` instance for `WordN`

Instance details

Defined in Data.SBV.Core.Sized

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> 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 #

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

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

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

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

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

mkExistVars :: MonadSymbolic m => Int -> m [SBV (WordN n)] 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 b) => SymVal (Either a b) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (Either a b)) Source #

forall_ :: MonadSymbolic m => m (SBV (Either a b)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (Either a b)] Source #

exists :: MonadSymbolic m => String -> m (SBV (Either a b)) Source #

exists_ :: MonadSymbolic m => m (SBV (Either a b)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (Either a b)] 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 #

(SymVal a, SymVal b) => SymVal (a, b) Source # | SymVal for 2-tuples

Instance details

Defined in Data.SBV.Core.Model

Methods

mkSymVal :: MonadSymbolic m => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (a, b)) Source #

forall_ :: MonadSymbolic m => m (SBV (a, b)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (a, b)] Source #

exists :: MonadSymbolic m => String -> m (SBV (a, b)) Source #

exists_ :: MonadSymbolic m => m (SBV (a, b)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (a, b)] 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 => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (a, b, c)) Source #

forall_ :: MonadSymbolic m => m (SBV (a, b, c)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (a, b, c)] Source #

exists :: MonadSymbolic m => String -> m (SBV (a, b, c)) Source #

exists_ :: MonadSymbolic m => m (SBV (a, b, c)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (a, b, c)] 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 => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (a, b, c, d)) Source #

forall_ :: MonadSymbolic m => m (SBV (a, b, c, d)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d)] Source #

exists :: MonadSymbolic m => String -> m (SBV (a, b, c, d)) Source #

exists_ :: MonadSymbolic m => m (SBV (a, b, c, d)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d)] 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 => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e)) Source #

forall_ :: MonadSymbolic m => m (SBV (a, b, c, d, e)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e)] Source #

exists :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e)) Source #

exists_ :: MonadSymbolic m => m (SBV (a, b, c, d, e)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e)] 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 => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f)) Source #

forall_ :: MonadSymbolic m => m (SBV (a, b, c, d, e, f)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e, f)] Source #

exists :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f)) Source #

exists_ :: MonadSymbolic m => m (SBV (a, b, c, d, e, f)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e, f)] 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 => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f, g)) Source #

forall_ :: MonadSymbolic m => m (SBV (a, b, c, d, e, f, g)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e, f, g)] Source #

exists :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f, g)) Source #

exists_ :: MonadSymbolic m => m (SBV (a, b, c, d, e, f, g)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e, f, g)] 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 => Maybe Quantifier -> 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 #

forall :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f, g, h)) Source #

forall_ :: MonadSymbolic m => m (SBV (a, b, c, d, e, f, g, h)) Source #

mkForallVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e, f, g, h)] Source #

exists :: MonadSymbolic m => String -> m (SBV (a, b, c, d, e, f, g, h)) Source #

exists_ :: MonadSymbolic m => m (SBV (a, b, c, d, e, f, g, h)) Source #

mkExistVars :: MonadSymbolic m => Int -> m [SBV (a, b, c, d, e, f, g, h)] 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 #

data CV Source #

`CV` represents a concrete word of a fixed size: For signed words, the most significant digit is considered to be the sign.

Constructors

CV |

Fields

- _cvKind :: !Kind
- cvVal :: !CVal

#### Instances

Instances details

Eq CV Source # |
Instance details Defined in Data.SBV.Core.Concrete Methods (==) :: CV -> CV -> Bool (/=) :: CV -> CV -> Bool
Ord CV Source # |
Instance details Defined in Data.SBV.Core.Concrete Methods compare :: CV -> CV -> Ordering (<) :: CV -> CV -> Bool (<=) :: CV -> CV -> Bool (>) :: CV -> CV -> Bool (>=) :: CV -> CV -> Bool max :: CV -> CV -> CV min :: CV -> CV -> CV
Show CV Source # | Show instance for `CV`.
Instance details Defined in Data.SBV.Core.Concrete Methods showsPrec :: Int -> CV -> ShowS show :: CV -> String showList :: [CV] -> ShowS
NFData CV |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: CV -> ()
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 #

isUnbounded :: CV -> Bool Source #

isUninterpreted :: 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 #

PrettyNum CV Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: CV -> String Source # binS :: CV -> String Source # hexP :: CV -> String Source # binP :: CV -> String Source # hex :: CV -> String Source # bin :: CV -> String 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 #
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 #

data CVal Source #

A constant value

Constructors

CAlgReal !AlgReal | Algebraic real
CInteger !Integer | Bit-vector/unbounded integer
CFloat !Float | Float
CDouble !Double | Double
CChar !Char | Character
CString !String | String
CList ![CVal] | List
CSet !(RCSet CVal) | Set. Can be regular or complemented.
CUserSort !(Maybe Int, String) | Value of an uninterpreted/user kind. The Maybe Int shows index position for enumerations
CTuple ![CVal] | Tuple
CMaybe !(Maybe CVal) | Maybe
CEither !(Either CVal CVal) | Disjoint union

#### Instances

Instances details

Eq CVal Source # | Eq instance for CVVal. Note that we cannot simply derive Eq/Ord, since CVAlgReal doesn't have proper instances for these when values are infinitely precise reals. However, we do need a structural eq/ord for Map indexes; so define custom ones here:
Instance details Defined in Data.SBV.Core.Concrete Methods (==) :: CVal -> CVal -> Bool (/=) :: CVal -> CVal -> Bool
Ord CVal Source # | Ord instance for VWVal. Same comments as the `Eq` instance why this cannot be derived.
Instance details Defined in Data.SBV.Core.Concrete Methods compare :: CVal -> CVal -> Ordering (<) :: CVal -> CVal -> Bool (<=) :: CVal -> CVal -> Bool (>) :: CVal -> CVal -> Bool (>=) :: CVal -> CVal -> Bool max :: CVal -> CVal -> CVal min :: CVal -> CVal -> CVal

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

Constructors

AlgRational Bool Rational | bool says it's exact (i.e., SMT-solver did not return it with ? at the end.)
AlgPolyRoot (Integer, AlgRealPoly) (Maybe String) | which root of this polynomial and an approximate decimal representation with given precision, if available

#### Instances

Instances details

Eq AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods (==) :: AlgReal -> AlgReal -> Bool (/=) :: AlgReal -> AlgReal -> Bool
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 recip :: AlgReal -> AlgReal fromRational :: Rational -> AlgReal
Num AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods (+) :: AlgReal -> AlgReal -> AlgReal (-) :: AlgReal -> AlgReal -> AlgReal (*) :: AlgReal -> AlgReal -> AlgReal negate :: AlgReal -> AlgReal abs :: AlgReal -> AlgReal signum :: AlgReal -> AlgReal fromInteger :: Integer -> AlgReal
Ord AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods compare :: AlgReal -> AlgReal -> Ordering (<) :: AlgReal -> AlgReal -> Bool (<=) :: AlgReal -> AlgReal -> Bool (>) :: AlgReal -> AlgReal -> Bool (>=) :: AlgReal -> AlgReal -> Bool max :: AlgReal -> AlgReal -> AlgReal min :: AlgReal -> AlgReal -> AlgReal
Real AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods toRational :: AlgReal -> Rational
Show AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods showsPrec :: Int -> AlgReal -> ShowS show :: AlgReal -> String showList :: [AlgReal] -> ShowS
Arbitrary AlgReal Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods arbitrary :: Gen AlgReal Source # shrink :: 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 # randomRIO :: (AlgReal, AlgReal) -> IO AlgReal Source # randomIO :: IO AlgReal 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 #

isUnbounded :: AlgReal -> Bool Source #

isUninterpreted :: 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 #

SymVal AlgReal Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

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

literal :: AlgReal -> SBV AlgReal Source #

fromCV :: CV -> AlgReal Source #

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

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

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

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

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

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

mkExistVars :: MonadSymbolic m => Int -> m [SBV AlgReal] 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 #

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 #
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 #

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 #
type MetricSpace AlgReal Source # |
Instance details Defined in Data.SBV.Core.Model type MetricSpace AlgReal = AlgReal

newtype AlgRealPoly Source #

A univariate polynomial, represented simply as a coefficient list. For instance, "5x^3 + 2x - 5" is represented as [(5, 3), (2, 1), (-5, 0)]

Constructors

AlgRealPoly [(Integer, Integer)] |

#### Instances

Instances details

Eq AlgRealPoly Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods (==) :: AlgRealPoly -> AlgRealPoly -> Bool (/=) :: AlgRealPoly -> AlgRealPoly -> Bool
Ord AlgRealPoly Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods compare :: AlgRealPoly -> AlgRealPoly -> Ordering (<) :: AlgRealPoly -> AlgRealPoly -> Bool (<=) :: AlgRealPoly -> AlgRealPoly -> Bool (>) :: AlgRealPoly -> AlgRealPoly -> Bool (>=) :: AlgRealPoly -> AlgRealPoly -> Bool max :: AlgRealPoly -> AlgRealPoly -> AlgRealPoly min :: AlgRealPoly -> AlgRealPoly -> AlgRealPoly
Show AlgRealPoly Source # |
Instance details Defined in Data.SBV.Core.AlgReals Methods showsPrec :: Int -> AlgRealPoly -> ShowS show :: AlgRealPoly -> String showList :: [AlgRealPoly] -> ShowS

data ExtCV Source #

A simple expression type over extendent 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 show :: ExtCV -> String showList :: [ExtCV] -> ShowS
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 #

isUnbounded :: ExtCV -> Bool Source #

isUninterpreted :: 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 show :: GeneralizedCV -> String showList :: [GeneralizedCV] -> ShowS
NFData GeneralizedCV |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: GeneralizedCV -> ()
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 #

isUnbounded :: GeneralizedCV -> Bool Source #

isUninterpreted :: 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 #

isRegularCV :: GeneralizedCV -> Bool Source #

Is this a regular CV?

cvSameType :: CV -> CV -> Bool Source #

Are two CV's of the same type?

cvToBool :: CV -> Bool Source #

Convert a CV to a Haskell boolean (NB. Assumes input is well-kinded)

mkConstCV :: Integral a => Kind -> a -> CV Source #

Create a constant word from an integral.

liftCV2 :: (AlgReal -> AlgReal -> b) -> (Integer -> Integer -> b) -> (Float -> Float -> b) -> (Double -> Double -> b) -> (Char -> Char -> b) -> (String -> String -> b) -> ([CVal] -> [CVal] -> b) -> ([CVal] -> [CVal] -> b) -> (Maybe CVal -> Maybe CVal -> b) -> (Either CVal CVal -> Either CVal CVal -> b) -> ((Maybe Int, String) -> (Maybe Int, String) -> b) -> CV -> CV -> b Source #

Lift a binary function through a `CV`.

mapCV :: (AlgReal -> AlgReal) -> (Integer -> Integer) -> (Float -> Float) -> (Double -> Double) -> (Char -> Char) -> (String -> String) -> ((Maybe Int, String) -> (Maybe Int, String)) -> CV -> CV Source #

Map a unary function through a `CV`.

mapCV2 :: (AlgReal -> AlgReal -> AlgReal) -> (Integer -> Integer -> Integer) -> (Float -> Float -> Float) -> (Double -> Double -> Double) -> (Char -> Char -> Char) -> (String -> String -> String) -> ((Maybe Int, String) -> (Maybe Int, String) -> (Maybe Int, String)) -> CV -> CV -> CV Source #

Map a binary function through a `CV`.

data SV Source #

A symbolic word, tracking it's signedness and size.

Constructors

SV !Kind !NodeId |

#### Instances

Instances details

Eq SV Source # | For equality, we merely use the node-id
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: SV -> SV -> Bool (/=) :: SV -> SV -> Bool
Ord SV Source # | Again, simply use the node-id for ordering
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: SV -> SV -> Ordering (<) :: SV -> SV -> Bool (<=) :: SV -> SV -> Bool (>) :: SV -> SV -> Bool (>=) :: SV -> SV -> Bool max :: SV -> SV -> SV min :: SV -> SV -> SV
Show SV Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SV -> ShowS show :: SV -> String showList :: [SV] -> ShowS
NFData SV Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SV -> ()
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 #

isUnbounded :: SV -> Bool Source #

isUninterpreted :: 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 #

trueSV :: SV Source #

Constant True as an `SV`. Note that this value always occupies slot -1.

falseSV :: SV Source #

Constant False as an `SV`. Note that this value always occupies slot -2.

trueCV :: CV Source #

Constant True as a `CV`. We represent it using the integer value 1.

falseCV :: CV Source #

Constant False as a `CV`. We represent it using the integer value 0.

normCV :: CV -> CV Source #

Normalize a CV. Essentially performs modular arithmetic to make sure the value can fit in the given bit-size. Note that this is rather tricky for negative values, due to asymmetry. (i.e., an 8-bit negative number represents values in the range -128 to 127; thus we have to be careful on the negative side.)

data SVal Source #

The Symbolic value. Either a constant (`Left`) or a symbolic value (`Right Cached`). Note that caching is essential for making sure sharing is preserved.

Constructors

SVal !Kind !(Either CV (Cached SV)) |

#### Instances

Instances details

Eq SVal Source # | This instance is only defined so that we can define an instance for `Bits`. `==` and `/=` simply throw an error.
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: SVal -> SVal -> Bool (/=) :: SVal -> SVal -> Bool
Show SVal Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SVal -> ShowS show :: SVal -> String showList :: [SVal] -> ShowS
NFData SVal Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SVal -> ()
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 #

isUnbounded :: SVal -> Bool Source #

isUninterpreted :: 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 #

ArithOverflow SVal Source # |
Instance details Defined in Data.SBV.Tools.Overflow Methods bvAddO :: SVal -> SVal -> (SBool, SBool) Source # bvSubO :: SVal -> SVal -> (SBool, SBool) Source # bvMulO :: SVal -> SVal -> (SBool, SBool) Source # bvMulOFast :: SVal -> SVal -> (SBool, SBool) Source # bvDivO :: SVal -> SVal -> (SBool, SBool) Source # bvNegO :: SVal -> (SBool, SBool) 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 #

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

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`

fromBool :: Bool -> SBool Source #

Conversion from `Bool` to `SBool`

newtype SBV a Source #

The Symbolic value. The parameter `a` is phantom, but is extremely important in keeping the user interface strongly typed.

Constructors

SBV |

Fields

- unSBV :: SVal

#### Instances

Instances details

IsString SString |
Instance details Defined in Data.SBV.Core.Model Methods fromString :: String -> SString
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 #
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 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 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 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 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 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 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 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 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 #
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 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 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 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 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 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 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 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 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 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 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 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 #

RegExpMatchable SString Source # | Matching symbolic strings.
Instance details Defined in Data.SBV.RegExp Methods match :: SString -> RegExp -> SBool 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 #
ExtractIO m => MProvable m SBool Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

forAll_ :: SBool -> SymbolicT m SBool Source #

forAll :: [String] -> SBool -> SymbolicT m SBool Source #

forSome_ :: SBool -> SymbolicT m SBool Source #

forSome :: [String] -> SBool -> SymbolicT m SBool Source #

prove :: SBool -> m ThmResult Source #

proveWith :: SMTConfig -> SBool -> m ThmResult Source #

sat :: SBool -> m SatResult Source #

satWith :: SMTConfig -> SBool -> m SatResult Source #

allSat :: SBool -> m AllSatResult Source #

allSatWith :: SMTConfig -> SBool -> m AllSatResult Source #

optimize :: OptimizeStyle -> SBool -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> SBool -> m OptimizeResult Source #

isVacuous :: SBool -> m Bool Source #

isVacuousWith :: SMTConfig -> SBool -> m Bool Source #

isTheorem :: SBool -> m Bool Source #

isTheoremWith :: SMTConfig -> SBool -> m Bool Source #

isSatisfiable :: SBool -> m Bool Source #

isSatisfiableWith :: SMTConfig -> SBool -> m Bool Source #

validate :: Bool -> SMTConfig -> SBool -> SMTResult -> m SMTResult 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 #
ExtractIO m => SExecutable m [SBV a] Source # |
Instance details Defined in Data.SBV.Provers.Prover Methods sName_ :: [SBV a] -> SymbolicT m () Source # sName :: [String] -> [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 # sName :: [String] -> SBV a -> SymbolicT m () Source # safe :: SBV a -> m [SafeResult] Source # safeWith :: SMTConfig -> SBV a -> m [SafeResult] Source #
(MonadIO m, SymVal a) => Queriable m (SBV a) a Source # | Generic `Queriable` instance for `SymVal`/`SMTValue` values
Instance details Defined in Data.SBV.Control.Utils Methods create :: QueryT m (SBV a) Source # project :: SBV a -> QueryT m a Source # embed :: a -> QueryT m (SBV a) Source #
(MonadIO m, SymVal a, Foldable t, Traversable t, Fresh m (t (SBV a))) => Queriable m (t (SBV a)) (t a) Source # | Generic `Queriable` instance for things that are `Fresh` and look like containers:
Instance details Defined in Data.SBV.Control.Utils Methods create :: QueryT m (t (SBV a)) Source # project :: t (SBV a) -> QueryT m (t a) Source # embed :: t a -> QueryT m (t (SBV a)) 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 #

sName :: [String] -> ((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 #

(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 #

sName :: [String] -> ((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, 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 #

sName :: [String] -> ((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, 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 # sName :: [String] -> ((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, 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 # sName :: [String] -> ((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, 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 # sName :: [String] -> ((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, 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 # sName :: [String] -> (SBV a -> p) -> SymbolicT m () Source # safe :: (SBV a -> p) -> m [SafeResult] Source # safeWith :: SMTConfig -> (SBV a -> p) -> 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 # sName :: [String] -> (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, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, MProvable m p) => MProvable 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

forAll_ :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SymbolicT m SBool Source #

forAll :: [String] -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SymbolicT m SBool Source #

forSome_ :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SymbolicT m SBool Source #

forSome :: [String] -> ((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 #

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 #

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 #

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 #

isVacuous :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m Bool Source #

isVacuousWith :: 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 #

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 #

validate :: Bool -> SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> SMTResult -> m SMTResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, MProvable m p) => MProvable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

forAll_ :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SymbolicT m SBool Source #

forAll :: [String] -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SymbolicT m SBool Source #

forSome_ :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SymbolicT m SBool Source #

forSome :: [String] -> ((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 #

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 #

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 #

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 #

isVacuous :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m Bool Source #

isVacuousWith :: 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 #

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 #

validate :: Bool -> SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> SMTResult -> m SMTResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, MProvable m p) => MProvable m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

forAll_ :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SymbolicT m SBool Source #

forAll :: [String] -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SymbolicT m SBool Source #

forSome_ :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SymbolicT m SBool Source #

forSome :: [String] -> ((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 #

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 #

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 #

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 #

isVacuous :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m Bool Source #

isVacuousWith :: 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 #

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 #

validate :: Bool -> SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> SMTResult -> m SMTResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, MProvable m p) => MProvable m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

forAll_ :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> SymbolicT m SBool Source #

forAll :: [String] -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> SymbolicT m SBool Source #

forSome_ :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> SymbolicT m SBool Source #

forSome :: [String] -> ((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 #

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 #

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 #

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 #

isVacuous :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m Bool Source #

isVacuousWith :: 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 #

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 #

validate :: Bool -> SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> SMTResult -> m SMTResult Source #

(SymVal a, SymVal b, SymVal c, MProvable m p) => MProvable m ((SBV a, SBV b, SBV c) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

forAll_ :: ((SBV a, SBV b, SBV c) -> p) -> SymbolicT m SBool Source #

forAll :: [String] -> ((SBV a, SBV b, SBV c) -> p) -> SymbolicT m SBool Source #

forSome_ :: ((SBV a, SBV b, SBV c) -> p) -> SymbolicT m SBool Source #

forSome :: [String] -> ((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 #

sat :: ((SBV a, SBV b, SBV c) -> p) -> m SatResult Source #

satWith :: 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 #

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 #

isVacuous :: ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isVacuousWith :: 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 #

isSatisfiable :: ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m Bool Source #

validate :: Bool -> SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> SMTResult -> m SMTResult Source #

(SymVal a, SymVal b, MProvable m p) => MProvable m ((SBV a, SBV b) -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

forAll_ :: ((SBV a, SBV b) -> p) -> SymbolicT m SBool Source #

forAll :: [String] -> ((SBV a, SBV b) -> p) -> SymbolicT m SBool Source #

forSome_ :: ((SBV a, SBV b) -> p) -> SymbolicT m SBool Source #

forSome :: [String] -> ((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 #

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

satWith :: 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 #

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

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

isVacuous :: ((SBV a, SBV b) -> p) -> m Bool Source #

isVacuousWith :: 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 #

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

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

validate :: Bool -> SMTConfig -> ((SBV a, SBV b) -> p) -> SMTResult -> m SMTResult Source #

(SymVal a, MProvable m p) => MProvable m (SBV a -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

forAll_ :: (SBV a -> p) -> SymbolicT m SBool Source #

forAll :: [String] -> (SBV a -> p) -> SymbolicT m SBool Source #

forSome_ :: (SBV a -> p) -> SymbolicT m SBool Source #

forSome :: [String] -> (SBV a -> p) -> SymbolicT m SBool Source #

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

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

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

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

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

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

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

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

isVacuous :: (SBV a -> p) -> m Bool Source #

isVacuousWith :: SMTConfig -> (SBV a -> p) -> m Bool Source #

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

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

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

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

validate :: Bool -> SMTConfig -> (SBV a -> p) -> SMTResult -> m SMTResult Source #

ExtractIO m => MProvable m (SymbolicT m SBool) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

forAll_ :: SymbolicT m SBool -> SymbolicT m SBool Source #

forAll :: [String] -> SymbolicT m SBool -> SymbolicT m SBool Source #

forSome_ :: SymbolicT m SBool -> SymbolicT m SBool Source #

forSome :: [String] -> SymbolicT m SBool -> SymbolicT m SBool Source #

prove :: SymbolicT m SBool -> m ThmResult Source #

proveWith :: SMTConfig -> SymbolicT m SBool -> m ThmResult Source #

sat :: SymbolicT m SBool -> m SatResult Source #

satWith :: SMTConfig -> SymbolicT m SBool -> m SatResult Source #

allSat :: SymbolicT m SBool -> m AllSatResult Source #

allSatWith :: SMTConfig -> SymbolicT m SBool -> m AllSatResult Source #

optimize :: OptimizeStyle -> SymbolicT m SBool -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> SymbolicT m SBool -> m OptimizeResult Source #

isVacuous :: SymbolicT m SBool -> m Bool Source #

isVacuousWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

isTheorem :: SymbolicT m SBool -> m Bool Source #

isTheoremWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

isSatisfiable :: SymbolicT m SBool -> m Bool Source #

isSatisfiableWith :: SMTConfig -> SymbolicT m SBool -> m Bool Source #

validate :: Bool -> SMTConfig -> SymbolicT m SBool -> SMTResult -> m SMTResult 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 # sName :: [String] -> (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 # sName :: [String] -> (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 # sName :: [String] -> (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 #

sName :: [String] -> (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 #

sName :: [String] -> (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] => 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) Methods fromList :: [Item (SList a)] -> SList a fromListN :: Int -> [Item (SList a)] -> SList a toList :: SList a -> [Item (SList a)]
(SymVal a, Bounded a) => Bounded (SBV a) |
Instance details Defined in Data.SBV.Core.Model Methods minBound :: SBV a maxBound :: SBV a
(Show a, Bounded a, Integral a, Num a, SymVal a) => Enum (SBV a) |
Instance details Defined in Data.SBV.Core.Model Methods succ :: SBV a -> SBV a pred :: SBV a -> SBV a toEnum :: Int -> SBV a fromEnum :: SBV a -> Int enumFrom :: SBV a -> [SBV a] enumFromThen :: SBV a -> SBV a -> [SBV a] enumFromTo :: SBV a -> SBV a -> [SBV a] enumFromThenTo :: SBV a -> SBV a -> SBV a -> [SBV a]
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 (/=) :: SBV a -> SBV a -> Bool
(Ord a, SymVal a, Fractional a, Floating a) => Floating (SBV a) | Define Floating instance on SBV's; only for base types that are already floating; i.e., SFloat and SDouble Note that most of the fields are "undefined" for symbolic values, we add methods as they are supported by SMTLib. Currently, the only symbolicly available function in this class is sqrt.

Instance details

Defined in Data.SBV.Core.Model

Methods

pi :: SBV a

exp :: SBV a -> SBV a

log :: SBV a -> SBV a

sqrt :: SBV a -> SBV a

(**) :: SBV a -> SBV a -> SBV a

logBase :: SBV a -> SBV a -> SBV a

sin :: SBV a -> SBV a

cos :: SBV a -> SBV a

tan :: SBV a -> SBV a

asin :: SBV a -> SBV a

acos :: SBV a -> SBV a

atan :: SBV a -> SBV a

sinh :: SBV a -> SBV a

cosh :: SBV a -> SBV a

tanh :: SBV a -> SBV a

asinh :: SBV a -> SBV a

acosh :: SBV a -> SBV a

atanh :: SBV a -> SBV a

log1p :: SBV a -> SBV a

expm1 :: SBV a -> SBV a

log1pexp :: SBV a -> SBV a

log1mexp :: SBV a -> SBV a

(Ord a, SymVal a, Fractional a) => Fractional (SBV a) |
Instance details Defined in Data.SBV.Core.Model Methods (/) :: SBV a -> SBV a -> SBV a recip :: SBV a -> SBV a fromRational :: Rational -> SBV a
(Ord a, Num a, SymVal a) => Num (SBV a) |
Instance details Defined in Data.SBV.Core.Model Methods (+) :: SBV a -> SBV a -> SBV a (-) :: SBV a -> SBV a -> SBV a (*) :: SBV a -> SBV a -> SBV a negate :: SBV a -> SBV a abs :: SBV a -> SBV a signum :: SBV a -> SBV a fromInteger :: Integer -> SBV a
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 show :: SBV a -> String showList :: [SBV a] -> ShowS
(SymVal a, Show a) => Show (IncS (SBV a)) | 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 show :: IncS (SBV a) -> String showList :: [IncS (SBV a)] -> ShowS
(SymVal a, Show a) => Show (FibS (SBV a)) | 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 show :: FibS (SBV a) -> String showList :: [FibS (SBV a)] -> ShowS
(SymVal a, Show a) => Show (GCDS (SBV a)) | 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 show :: GCDS (SBV a) -> String showList :: [GCDS (SBV a)] -> ShowS
(SymVal a, Show a) => Show (DivS (SBV a)) | 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 show :: DivS (SBV a) -> String showList :: [DivS (SBV a)] -> ShowS
(SymVal a, Show a) => Show (SqrtS (SBV a)) | 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 show :: SqrtS (SBV a) -> String showList :: [SqrtS (SBV a)] -> ShowS
(SymVal a, Show a) => Show (SumS (SBV a)) | 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 show :: SumS (SBV a) -> String showList :: [SumS (SBV a)] -> ShowS
Generic (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Data Associated Types type Rep (SBV a) :: Type -> Type Methods from :: SBV a -> Rep (SBV a) x to :: Rep (SBV a) x -> SBV a
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 #
(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 #
(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 # randomRIO :: (SBV a, SBV a) -> IO (SBV a) Source # randomIO :: IO (SBV a) Source #
NFData (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Data Methods rnf :: SBV a -> ()
(Ord a, Num a, Bits a, SymVal a) => Bits (SBV a) | 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

(.|.) :: SBV a -> SBV a -> SBV a

xor :: SBV a -> SBV a -> SBV a

complement :: SBV a -> SBV a

shift :: SBV a -> Int -> SBV a

rotate :: SBV a -> Int -> SBV a

zeroBits :: SBV a

bit :: Int -> SBV a

setBit :: SBV a -> Int -> SBV a

clearBit :: SBV a -> Int -> SBV a

complementBit :: SBV a -> Int -> SBV a

testBit :: SBV a -> Int -> Bool

bitSizeMaybe :: SBV a -> Maybe Int

bitSize :: SBV a -> Int

isSigned :: SBV a -> Bool

shiftL :: SBV a -> Int -> SBV a

unsafeShiftL :: SBV a -> Int -> SBV a

shiftR :: SBV a -> Int -> SBV a

unsafeShiftR :: SBV a -> Int -> SBV a

rotateL :: SBV a -> Int -> SBV a

rotateR :: SBV a -> Int -> SBV a

popCount :: SBV a -> Int

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 #

isUnbounded :: SBV a -> Bool Source #

isUninterpreted :: 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 #

Outputtable (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => SBV a -> m (SBV a) 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 #
HasKind a => Uninterpreted (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods uninterpret :: String -> SBV a Source # cgUninterpret :: String -> [String] -> SBV a -> SBV a Source # sbvUninterpret :: Maybe ([String], SBV a) -> String -> SBV 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 #
(KnownNat n, IsNonZero 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, IsNonZero 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 #
(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 #
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 #

ByteConverter (SWord 8) Source # | `SWord` 8 instance for `ByteConverter`
Instance details Defined in Data.SBV.Core.Sized 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.Core.Sized 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.Core.Sized 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.Core.Sized 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.Core.Sized 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.Core.Sized 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.Core.Sized 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.Core.Sized Methods toBytes :: SWord 1024 -> [SWord 8] Source # fromBytes :: [SWord 8] -> SWord 1024 Source #
(KnownNat n, IsNonZero 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, 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 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 c, SymVal b, HasKind a) => Uninterpreted ((SBV c, SBV b) -> SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods 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 # sbvUninterpret :: Maybe ([String], (SBV c, SBV b) -> SBV a) -> String -> (SBV c, SBV b) -> SBV a Source #
(SymVal d, SymVal c, SymVal b, HasKind a) => Uninterpreted ((SBV d, SBV c, SBV b) -> SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods 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 # sbvUninterpret :: Maybe ([String], (SBV d, SBV c, SBV b) -> SBV a) -> String -> (SBV d, SBV c, SBV b) -> SBV a Source #
(SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => Uninterpreted ((SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods 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 # sbvUninterpret :: Maybe ([String], (SBV e, SBV d, SBV c, SBV b) -> SBV a) -> String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #
(SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => Uninterpreted ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

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 #

sbvUninterpret :: Maybe ([String], (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> 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) => Uninterpreted ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

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 #

sbvUninterpret :: Maybe ([String], (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> 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) => Uninterpreted ((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

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 #

sbvUninterpret :: Maybe ([String], (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> String -> (SBV h, 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) => Uninterpreted (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

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 #

sbvUninterpret :: Maybe ([String], SBV h -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> String -> SBV h -> SBV g -> 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) => Uninterpreted (SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

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 #

sbvUninterpret :: Maybe ([String], SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> String -> SBV g -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => Uninterpreted (SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

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 #

sbvUninterpret :: Maybe ([String], SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> String -> SBV f -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal e, SymVal d, SymVal c, SymVal b, HasKind a) => Uninterpreted (SBV e -> SBV d -> SBV c -> SBV b -> SBV a) Source # |

Instance details

Defined in Data.SBV.Core.Model

Methods

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 #

sbvUninterpret :: Maybe ([String], SBV e -> SBV d -> SBV c -> SBV b -> SBV a) -> String -> SBV e -> SBV d -> SBV c -> SBV b -> SBV a Source #

(SymVal d, SymVal c, SymVal b, HasKind a) => Uninterpreted (SBV d -> SBV c -> SBV b -> SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods 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 # sbvUninterpret :: Maybe ([String], SBV d -> SBV c -> SBV b -> SBV a) -> String -> SBV d -> SBV c -> SBV b -> SBV a Source #
(SymVal c, SymVal b, HasKind a) => Uninterpreted (SBV c -> SBV b -> SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods 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 # sbvUninterpret :: Maybe ([String], SBV c -> SBV b -> SBV a) -> String -> SBV c -> SBV b -> SBV a Source #
(SymVal b, HasKind a) => Uninterpreted (SBV b -> SBV a) Source # |
Instance details Defined in Data.SBV.Core.Model Methods uninterpret :: String -> SBV b -> SBV a Source # cgUninterpret :: String -> [String] -> (SBV b -> SBV a) -> SBV b -> SBV a Source # sbvUninterpret :: Maybe ([String], SBV b -> SBV a) -> String -> SBV b -> SBV a 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 #
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-8.7-9mSEXJN8olRBwPWTmi3EMV" '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

newtype NodeId Source #

A symbolic node id

Constructors

NodeId Int |

#### Instances

Instances details

Eq NodeId Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: NodeId -> NodeId -> Bool (/=) :: NodeId -> NodeId -> Bool
Ord NodeId Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: NodeId -> NodeId -> Ordering (<) :: NodeId -> NodeId -> Bool (<=) :: NodeId -> NodeId -> Bool (>) :: NodeId -> NodeId -> Bool (>=) :: NodeId -> NodeId -> Bool max :: NodeId -> NodeId -> NodeId min :: NodeId -> NodeId -> NodeId

mkSymSBV :: forall a m. MonadSymbolic m => Maybe Quantifier -> Kind -> Maybe String -> m (SBV a) Source #

Generalization of `mkSymSBV`

data ArrayContext Source #

The context of a symbolic array as created

Constructors

ArrayFree (Maybe SV) | A new array, the contents are initialized with the given value, if any
ArrayMutate ArrayIndex SV SV | An array created by mutating another array at a given cell
ArrayMerge SV ArrayIndex ArrayIndex | An array created by symbolically merging two other arrays

#### Instances

Instances details

Show ArrayContext Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> ArrayContext -> ShowS show :: ArrayContext -> String showList :: [ArrayContext] -> ShowS
NFData ArrayContext Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: ArrayContext -> ()

type ArrayInfo = (String, (Kind, Kind), ArrayContext) Source #

Representation for symbolic arrays

class SymArray array where Source #

Flat 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.

While it's certainly possible for user to create instances of `SymArray`, the `SArray` and `SFunArray` instances already provided should cover most use cases in practice. Note that there are a few differences between these two models in terms of use models:

- `SArray` produces SMTLib arrays, and requires a solver that understands the array theory. `SFunArray` is internally handled, and thus can be used with any solver. (Note that all solvers except `abc` support arrays, so this isn't a big decision factor.)
- For both arrays, if a default value is supplied, then reading from uninitialized cell will return that value. If the default is not given, then reading from uninitialized cells is still OK for both arrays, and will produce an uninterpreted constant in both cases.
- Only `SArray` supports checking equality of arrays. (That is, checking if an entire array is equivalent to another.) `SFunArray`s cannot be checked for equality. In general, checking wholesale equality of arrays is a difficult decision problem and should be avoided if possible.
- Only `SFunArray` supports compilation to C. Programs using `SArray` will not be accepted by the C-code generator.
- You cannot use quickcheck on programs that contain these arrays. (Neither `SArray` nor `SFunArray`.)
- With `SArray`, SBV transfers all array-processing to the SMT-solver. So, it can generate programs more quickly, but they might end up being too hard for the solver to handle. With `SFunArray`, SBV only generates code for individual elements and the array itself never shows up in the resulting SMTLib program. This puts more onus on the SBV side and might have some performance impacts, but it might generate problems that are easier for the SMT solvers to handle.

As a rule of thumb, try `SArray` first. These should generate compact code. However, if the backend solver has hard time solving the generated problems, switch to `SFunArray`. If you still have issues, please report so we can see what the problem might be!

Minimal complete definition

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

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

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

Internal function, not exported to the user

#### Instances

Instances details

SymArray SFunArray Source # |

Instance details

Defined in Data.SBV.Core.Data

Methods

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

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

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

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

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

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

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 #

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 -> Maybe (SBV b) -> State -> IO (SArray a b) Source #

newtype SFunArray a b Source #

Arrays implemented internally, without translating to SMT-Lib functions:

- Internally handled by the library and not mapped to SMT-Lib, hence can be used with solvers that don't support arrays. (Such as abc.)
- Reading from an unintialized value is OK. If the default value is given in `newArray`, it will be the result. Otherwise, the read yields an uninterpreted constant.
- Cannot check for equality of arrays.
- Can be used in code-generation (i.e., compilation to C).
- Can not quick-check theorems using `SFunArray` values
- Typically faster as it gets compiled away during translation.

Constructors

SFunArray |

Fields

- unSFunArray :: SFunArr

#### Instances

Instances details

SymArray SFunArray Source # |

Instance details

Defined in Data.SBV.Core.Data

Methods

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

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

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

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

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

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

(HasKind a, HasKind b, MProvable m p) => MProvable m (SFunArray a b -> p) Source # |

Instance details

Defined in Data.SBV.Provers.Prover

Methods

forAll_ :: (SFunArray a b -> p) -> SymbolicT m SBool Source #

forAll :: [String] -> (SFunArray a b -> p) -> SymbolicT m SBool Source #

forSome_ :: (SFunArray a b -> p) -> SymbolicT m SBool Source #

forSome :: [String] -> (SFunArray a b -> p) -> SymbolicT m SBool Source #

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

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

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

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

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

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

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

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

isVacuous :: (SFunArray a b -> p) -> m Bool Source #

isVacuousWith :: SMTConfig -> (SFunArray a b -> p) -> m Bool Source #

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

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

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

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

validate :: Bool -> SMTConfig -> (SFunArray a b -> p) -> SMTResult -> m SMTResult Source #

(HasKind a, HasKind b) => Show (SFunArray a b) Source # |
Instance details Defined in Data.SBV.Core.Data Methods showsPrec :: Int -> SFunArray a b -> ShowS show :: SFunArray a b -> String showList :: [SFunArray a b] -> ShowS
SymVal b => Mergeable (SFunArray a b) Source # |
Instance details Defined in Data.SBV.Core.Model Methods symbolicMerge :: Bool -> SBool -> SFunArray a b -> SFunArray a b -> SFunArray a b Source # select :: (Ord b0, SymVal b0, Num b0) => [SFunArray a b] -> SFunArray a b -> SBV b0 -> SFunArray a b Source #

newtype 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 unintialized 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
- Typically slower as it heavily relies on SMT-solving for the array theory

Constructors

SArray |

Fields

- unSArray :: SArr

#### 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 #

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 -> Maybe (SBV b) -> State -> IO (SArray a b) Source #

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

Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

forAll :: [String] -> (SArray a b -> p) -> SymbolicT m SBool Source #

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

forSome :: [String] -> (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 #

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

satWith :: 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 #

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

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

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

isVacuousWith :: 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 #

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

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

validate :: Bool -> SMTConfig -> (SArray a b -> p) -> SMTResult -> m SMTResult 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 show :: SArray a b -> String showList :: [SArray a b] -> ShowS
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 #
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 #

sbvToSV :: State -> SBV a -> IO SV Source #

Convert a symbolic value to a symbolic-word

sbvToSymSV :: MonadSymbolic m => SBV a -> m SV Source #

Generalization of `sbvToSymSW`

forceSVArg :: SV -> IO () Source #

Forcing an argument; this is a necessary evil to make sure all the arguments to an uninterpreted function are evaluated before called; the semantics of uinterpreted functions is necessarily strict; deviating from Haskell's

data SBVExpr Source #

A symbolic expression

Constructors

SBVApp !Op ![SV] |

#### Instances

Instances details

Eq SBVExpr Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: SBVExpr -> SBVExpr -> Bool (/=) :: SBVExpr -> SBVExpr -> Bool
Ord SBVExpr Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: SBVExpr -> SBVExpr -> Ordering (<) :: SBVExpr -> SBVExpr -> Bool (<=) :: SBVExpr -> SBVExpr -> Bool (>) :: SBVExpr -> SBVExpr -> Bool (>=) :: SBVExpr -> SBVExpr -> Bool max :: SBVExpr -> SBVExpr -> SBVExpr min :: SBVExpr -> SBVExpr -> SBVExpr
Show SBVExpr Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SBVExpr -> ShowS show :: SBVExpr -> String showList :: [SBVExpr] -> ShowS
NFData SBVExpr Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SBVExpr -> ()

newExpr :: State -> Kind -> SBVExpr -> IO SV Source #

Create a new expression; hash-cons as necessary

cache :: (State -> IO a) -> Cached a Source #

Cache a state-based computation

data Cached a Source #

We implement a peculiar caching mechanism, applicable to the use case in implementation of SBV's. Whenever we do a state based computation, we do not want to keep on evaluating it in the then-current state. That will produce essentially a semantically equivalent value. Thus, we want to run it only once, and reuse that result, capturing the sharing at the Haskell level. This is similar to the "type-safe observable sharing" work, but also takes into the account of how symbolic simulation executes.

See Andy Gill's type-safe obervable sharing trick for the inspiration behind this technique: http://ku-fpg.github.io/files/Gill-09-TypeSafeReification.pdf

Note that this is *not* a general memo utility!

#### Instances

Instances details

NFData (Cached a) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Cached a -> ()

uncache :: Cached SV -> State -> IO SV Source #

Uncache a previously cached computation

uncacheAI :: Cached ArrayIndex -> State -> IO ArrayIndex Source #

Uncache, retrieving SMT array indexes

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 #

isUnbounded :: a -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Bool -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Char -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Double -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Float -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Int8 -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Int16 -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Int32 -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Int64 -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Integer -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Word8 -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Word16 -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Word32 -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Word64 -> Bool Source #

isUninterpreted :: 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 () 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 #

isUnbounded :: () -> Bool Source #

isUninterpreted :: () -> 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 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 #

isUnbounded :: AlgReal -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Kind -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: ExtCV -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: GeneralizedCV -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: CV -> Bool Source #

isUninterpreted :: 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 RoundingMode Source # | `RoundingMode` kind

Instance details

Defined in Data.SBV.Core.Symbolic

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 #

isUnbounded :: RoundingMode -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: SVal -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: SV -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: State -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: E -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: HumanHeightInCm -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Metres -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Day -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Color -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Nationality -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Beverage -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Pet -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Sport -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Color -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Color -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: U2Member -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Location -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Day -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: BinOp -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: UnOp -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: B -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: Q -> Bool Source #

isUninterpreted :: 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 # | Similarly, `HasKind`s default implementation is sufficient.

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 #

isUnbounded :: L -> Bool Source #

isUninterpreted :: 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 #

(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 #

isUnbounded :: [a] -> Bool Source #

isUninterpreted :: [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 (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 #

isUnbounded :: Maybe a -> Bool Source #

isUninterpreted :: 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 #

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 #

isUnbounded :: RCSet a -> Bool Source #

isUninterpreted :: 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 #

isUnbounded :: SBV a -> Bool Source #

isUninterpreted :: 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, IsNonZero 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 #

isUnbounded :: IntN n -> Bool Source #

isUninterpreted :: 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, IsNonZero 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 #

isUnbounded :: WordN n -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: Either a b -> Bool Source #

isUninterpreted :: 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 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 #

isUnbounded :: (a, b) -> Bool Source #

isUninterpreted :: (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 (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 #

isUnbounded :: Proxy a -> Bool Source #

isUninterpreted :: 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 #

(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 #

isUnbounded :: (a, b, c) -> Bool Source #

isUninterpreted :: (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 #

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

isUninterpreted :: (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 #

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

isUninterpreted :: (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 #

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

isUninterpreted :: (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 #

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

isUninterpreted :: (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 #

isUnbounded :: (a, b, c, d, e, f, g, h) -> Bool Source #

isUninterpreted :: (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 Op Source #

Symbolic operations

Constructors

Plus |
Times |
Minus |
UNeg |
Abs |
Quot |
Rem |
Equal |
NotEqual |
LessThan |
GreaterThan |
LessEq |
GreaterEq |
Ite |
And |
Or |
XOr |
Not |
Shl |
Shr |
Rol Int |
Ror Int |
Extract Int Int |
Join |
LkUp (Int, Kind, Kind, Int) !SV !SV |
ArrEq ArrayIndex ArrayIndex |
ArrRead ArrayIndex |
KindCast Kind Kind |
Uninterpreted String |
Label String |
IEEEFP FPOp |
PseudoBoolean PBOp |
OverflowOp OvOp |
StrOp StrOp |
SeqOp SeqOp |
SetOp SetOp |
TupleConstructor Int |
TupleAccess Int Int |
EitherConstructor Kind Kind Bool |
EitherIs Kind Kind Bool |
EitherAccess Bool |
MaybeConstructor Kind Bool |
MaybeIs Kind Bool |
MaybeAccess |

#### Instances

Instances details

Eq Op Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: Op -> Op -> Bool (/=) :: Op -> Op -> Bool
Ord Op Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: Op -> Op -> Ordering (<) :: Op -> Op -> Bool (<=) :: Op -> Op -> Bool (>) :: Op -> Op -> Bool (>=) :: Op -> Op -> Bool max :: Op -> Op -> Op min :: Op -> Op -> Op
Show Op Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> Op -> ShowS show :: Op -> String showList :: [Op] -> ShowS

data PBOp Source #

Pseudo-boolean operations

Constructors

PB_AtMost Int | At most k
PB_AtLeast Int | At least k
PB_Exactly Int | Exactly k
PB_Le [Int] Int | At most k, with coefficients given. Generalizes PB_AtMost
PB_Ge [Int] Int | At least k, with coefficients given. Generalizes PB_AtLeast
PB_Eq [Int] Int | Exactly k, with coefficients given. Generalized PB_Exactly

#### Instances

Instances details

Eq PBOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: PBOp -> PBOp -> Bool (/=) :: PBOp -> PBOp -> Bool
Ord PBOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: PBOp -> PBOp -> Ordering (<) :: PBOp -> PBOp -> Bool (<=) :: PBOp -> PBOp -> Bool (>) :: PBOp -> PBOp -> Bool (>=) :: PBOp -> PBOp -> Bool max :: PBOp -> PBOp -> PBOp min :: PBOp -> PBOp -> PBOp
Show PBOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> PBOp -> ShowS show :: PBOp -> String showList :: [PBOp] -> ShowS

data FPOp Source #

Floating point operations

Constructors

FP_Cast Kind Kind SV |
FP_Reinterpret Kind Kind |
FP_Abs |
FP_Neg |
FP_Add |
FP_Sub |
FP_Mul |
FP_Div |
FP_FMA |
FP_Sqrt |
FP_Rem |
FP_RoundToIntegral |
FP_Min |
FP_Max |
FP_ObjEqual |
FP_IsNormal |
FP_IsSubnormal |
FP_IsZero |
FP_IsInfinite |
FP_IsNaN |
FP_IsNegative |
FP_IsPositive |

#### Instances

Instances details

Eq FPOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: FPOp -> FPOp -> Bool (/=) :: FPOp -> FPOp -> Bool
Ord FPOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: FPOp -> FPOp -> Ordering (<) :: FPOp -> FPOp -> Bool (<=) :: FPOp -> FPOp -> Bool (>) :: FPOp -> FPOp -> Bool (>=) :: FPOp -> FPOp -> Bool max :: FPOp -> FPOp -> FPOp min :: FPOp -> FPOp -> FPOp
Show FPOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> FPOp -> ShowS show :: FPOp -> String showList :: [FPOp] -> ShowS

data StrOp Source #

String operations. Note that we do not define `StrAt` as it translates to `StrSubstr` trivially.

Constructors

StrConcat | Concatenation of one or more strings
StrLen | String length
StrUnit | Unit string
StrNth | Nth element
StrSubstr | Retrieves substring of `s` at `offset`
StrIndexOf | Retrieves first position of `sub` in `s`, `-1` if there are no occurrences
StrContains | Does `s` contain the substring `sub`?
StrPrefixOf | Is `pre` a prefix of `s`?
StrSuffixOf | Is `suf` a suffix of `s`?
StrReplace | Replace the first occurrence of `src` by `dst` in `s`
StrStrToNat | Retrieve integer encoded by string `s` (ground rewriting only)
StrNatToStr | Retrieve string encoded by integer `i` (ground rewriting only)
StrInRe RegExp | Check if string is in the regular expression

#### Instances

Instances details

Eq StrOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: StrOp -> StrOp -> Bool (/=) :: StrOp -> StrOp -> Bool
Ord StrOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: StrOp -> StrOp -> Ordering (<) :: StrOp -> StrOp -> Bool (<=) :: StrOp -> StrOp -> Bool (>) :: StrOp -> StrOp -> Bool (>=) :: StrOp -> StrOp -> Bool max :: StrOp -> StrOp -> StrOp min :: StrOp -> StrOp -> StrOp
Show StrOp Source # | Show instance for `StrOp`. Note that the mapping here is important to match the SMTLib equivalents, see here: http://rise4fun.com/z3/tutorialcontent/sequences
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> StrOp -> ShowS show :: StrOp -> String showList :: [StrOp] -> ShowS

data SeqOp Source #

Sequence operations.

Constructors

SeqConcat | See StrConcat
SeqLen | See StrLen
SeqUnit | See StrUnit
SeqNth | See StrNth
SeqSubseq | See StrSubseq
SeqIndexOf | See StrIndexOf
SeqContains | See StrContains
SeqPrefixOf | See StrPrefixOf
SeqSuffixOf | See StrSuffixOf
SeqReplace | See StrReplace

#### Instances

Instances details

Eq SeqOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: SeqOp -> SeqOp -> Bool (/=) :: SeqOp -> SeqOp -> Bool
Ord SeqOp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: SeqOp -> SeqOp -> Ordering (<) :: SeqOp -> SeqOp -> Bool (<=) :: SeqOp -> SeqOp -> Bool (>) :: SeqOp -> SeqOp -> Bool (>=) :: SeqOp -> SeqOp -> Bool max :: SeqOp -> SeqOp -> SeqOp min :: SeqOp -> SeqOp -> SeqOp
Show SeqOp Source # | Show instance for SeqOp. Again, mapping is important.
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SeqOp -> ShowS show :: SeqOp -> String showList :: [SeqOp] -> ShowS

data RegExp Source #

Regular expressions. Note that regular expressions themselves are concrete, but the `match` function from the `RegExpMatchable` class can check membership against a symbolic string/character. Also, we are preferring a datatype approach here, as opposed to coming up with some string-representation; there are way too many alternatives already so inventing one isn't a priority. Please get in touch if you would like a parser for this type as it might be easier to use.

Constructors

Literal String | Precisely match the given string
All | Accept every string
None | Accept no strings
Range Char Char | Accept range of characters
Conc [RegExp] | Concatenation
KStar RegExp | Kleene Star: Zero or more
KPlus RegExp | Kleene Plus: One or more
Opt RegExp | Zero or one
Loop Int Int RegExp | From `n` repetitions to `m` repetitions
Union [RegExp] | Union of regular expressions
Inter RegExp RegExp | Intersection of regular expressions

#### Instances

Instances details

Eq RegExp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: RegExp -> RegExp -> Bool (/=) :: RegExp -> RegExp -> Bool
Num RegExp Source # | Regular expressions as a `Num` instance. Note that only `+` (union) and `*` (concatenation) make sense.
Instance details Defined in Data.SBV.Core.Symbolic Methods (+) :: RegExp -> RegExp -> RegExp (-) :: RegExp -> RegExp -> RegExp (*) :: RegExp -> RegExp -> RegExp negate :: RegExp -> RegExp abs :: RegExp -> RegExp signum :: RegExp -> RegExp fromInteger :: Integer -> RegExp
Ord RegExp Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: RegExp -> RegExp -> Ordering (<) :: RegExp -> RegExp -> Bool (<=) :: RegExp -> RegExp -> Bool (>) :: RegExp -> RegExp -> Bool (>=) :: RegExp -> RegExp -> Bool max :: RegExp -> RegExp -> RegExp min :: RegExp -> RegExp -> RegExp
Show RegExp Source # | Show instance for `RegExp`. The mapping is done so the outcome matches the SMTLib string reg-exp operations
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> RegExp -> ShowS show :: RegExp -> String showList :: [RegExp] -> ShowS
IsString RegExp Source # | With overloaded strings, we can have direct literal regular expressions.
Instance details Defined in Data.SBV.Core.Symbolic Methods fromString :: String -> RegExp

type NamedSymVar = (SV, String) Source #

`NamedSymVar` pairs symbolic values and user given/automatically generated names

getTableIndex :: State -> Kind -> Kind -> [SV] -> IO Int Source #

Create a new table; hash-cons as necessary

newtype SBVPgm Source #

A program is a sequence of assignments

Constructors

SBVPgm |

Fields

- pgmAssignments :: Seq (SV, SBVExpr)

#### Instances

Instances details

NFData SBVPgm Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SBVPgm -> ()

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.

runSymbolic :: MonadIO m => SBVRunMode -> SymbolicT m a -> m (a, Result) Source #

Generalization of `runSymbolic`

data State Source #

The state of the symbolic interpreter

#### Instances

Instances details

NFData State Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: State -> ()

getPathCondition :: State -> SBool Source #

Get the current path condition

extendPathCondition :: State -> (SBool -> SBool) -> State Source #

Extend the path condition with the given test value.

inSMTMode :: State -> IO Bool Source #

Are we running in proof mode?

data SBVRunMode Source #

Different means of running a symbolic piece of code

Constructors

SMTMode QueryContext IStage Bool SMTConfig | In regular mode, with a stage. Bool is True if this is SAT.
CodeGen | Code generation mode.
Concrete (Maybe (Bool, [((Quantifier, NamedSymVar), Maybe CV)])) | Concrete simulation mode, with given environment if any. If Nothing: Random.

#### Instances

Instances details

Show SBVRunMode Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SBVRunMode -> ShowS show :: SBVRunMode -> String showList :: [SBVRunMode] -> ShowS

data Kind Source #

Kind of symbolic value

Constructors

KBool |
KBounded !Bool !Int |
KUnbounded |
KReal |
KUninterpreted String (Either String [String]) |
KFloat |
KDouble |
KChar |
KString |
KList Kind |
KSet Kind |
KTuple [Kind] |
KMaybe Kind |
KEither Kind Kind |

#### Instances

Instances details

Eq Kind Source # |
Instance details Defined in Data.SBV.Core.Kind Methods (==) :: Kind -> Kind -> Bool (/=) :: Kind -> Kind -> Bool
Ord Kind Source # |
Instance details Defined in Data.SBV.Core.Kind Methods compare :: Kind -> Kind -> Ordering (<) :: Kind -> Kind -> Bool (<=) :: Kind -> Kind -> Bool (>) :: Kind -> Kind -> Bool (>=) :: Kind -> Kind -> Bool max :: Kind -> Kind -> Kind min :: Kind -> Kind -> Kind
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 `KUninterpreted`, 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 show :: Kind -> String showList :: [Kind] -> ShowS
NFData Kind |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Kind -> ()
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 #

isUnbounded :: Kind -> Bool Source #

isUninterpreted :: 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 Outputtable a where Source #

A class representing what can be returned from a symbolic computation.

Methods

output :: MonadSymbolic m => a -> m a Source #

Generalization of `output`

#### Instances

Instances details

Outputtable () Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => () -> m () Source #
Outputtable a => Outputtable [a] Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => [a] -> m [a] Source #
Outputtable (SBV a) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => SBV a -> m (SBV a) Source #
(Outputtable a, Outputtable b) => Outputtable (a, b) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => (a, b) -> m (a, b) Source #
(Outputtable a, Outputtable b, Outputtable c) => Outputtable (a, b, c) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => (a, b, c) -> m (a, b, c) Source #
(Outputtable a, Outputtable b, Outputtable c, Outputtable d) => Outputtable (a, b, c, d) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => (a, b, c, d) -> m (a, b, c, d) Source #
(Outputtable a, Outputtable b, Outputtable c, Outputtable d, Outputtable e) => Outputtable (a, b, c, d, e) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => (a, b, c, d, e) -> m (a, b, c, d, e) Source #
(Outputtable a, Outputtable b, Outputtable c, Outputtable d, Outputtable e, Outputtable f) => Outputtable (a, b, c, d, e, f) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => (a, b, c, d, e, f) -> m (a, b, c, d, e, f) Source #
(Outputtable a, Outputtable b, Outputtable c, Outputtable d, Outputtable e, Outputtable f, Outputtable g) => Outputtable (a, b, c, d, e, f, g) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => (a, b, c, d, e, f, g) -> m (a, b, c, d, e, f, g) Source #
(Outputtable a, Outputtable b, Outputtable c, Outputtable d, Outputtable e, Outputtable f, Outputtable g, Outputtable h) => Outputtable (a, b, c, d, e, f, g, h) Source # |
Instance details Defined in Data.SBV.Core.Data Methods output :: MonadSymbolic m => (a, b, c, d, e, f, g, h) -> m (a, b, c, d, e, f, g, h) Source #

data Result Source #

Result of running a symbolic computation

Constructors

Result |

Fields

- reskinds :: Set Kind

  kinds used in the program

- resTraces :: [(String, CV)]

  quick-check counter-example information (if any)

- resObservables :: [(String, CV -> Bool, SV)]

  observable expressions (part of the model)

- resUISegs :: [(String, [String])]

  uninterpeted code segments

- resInputs :: ([(Quantifier, NamedSymVar)], [NamedSymVar])

  inputs (possibly existential) + tracker vars

- resConsts :: [(SV, CV)]

  constants

- resTables :: [((Int, Kind, Kind), [SV])]

  tables (automatically constructed) (tableno, index-type, result-type) elts

- resArrays :: [(Int, ArrayInfo)]

  arrays (user specified)

- resUIConsts :: [(String, SBVType)]

  uninterpreted constants

- resAxioms :: [(String, [String])]

  axioms

- resAsgns :: SBVPgm

  assignments

- resConstraints :: Seq (Bool, [(String, String)], SV)

  additional constraints (boolean)

- resAssertions :: [(String, Maybe CallStack, SV)]

  assertions

- resOutputs :: [SV]

  outputs

#### Instances

Instances details

Show Result Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> Result -> ShowS show :: Result -> String showList :: [Result] -> ShowS
NFData Result Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Result -> ()

class SolverContext m where Source #

Actions we can do in a context: Either at problem description time or while we are dynamically querying. `Symbolic` and `Query` are two instances of this class. Note that we use this mechanism internally and do not export it from SBV.

Minimal complete definition

constrain, softConstrain, namedConstraint, constrainWithAttribute, setOption, addAxiom, contextState

Methods

constrain :: SBool -> m () Source #

Add a constraint, any satisfying instance must satisfy this condition.

softConstrain :: SBool -> m () Source #

Add a soft constraint. The solver will try to satisfy this condition if possible, but won't if it cannot.

namedConstraint :: String -> SBool -> m () Source #

Add a named constraint. The name is used in unsat-core extraction.

constrainWithAttribute :: [(String, String)] -> SBool -> m () Source #

Add a constraint, with arbitrary attributes.

setInfo :: String -> [String] -> m () Source #

Set info. Example: `setInfo ":status" ["unsat"]`.

setOption :: SMTOption -> m () Source #

Set an option.

setLogic :: Logic -> m () Source #

Set the logic.

addAxiom :: String -> [String] -> m () Source #

Add a user specified axiom to the generated SMT-Lib file. The first argument is a mere string, use for commenting purposes. The second argument is intended to hold the multiple-lines of the axiom text as expressed in SMT-Lib notation. Note that we perform no checks on the axiom itself, to see whether it's actually well-formed or is sensical by any means. A separate formalization of SMT-Lib would be very useful here.

setTimeOut :: 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.

contextState :: m State Source #

Get the state associated with this context

#### Instances

Instances details

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 :: SBool -> SymbolicT m () Source #

softConstrain :: SBool -> SymbolicT m () Source #

namedConstraint :: String -> SBool -> SymbolicT m () Source #

constrainWithAttribute :: [(String, String)] -> SBool -> SymbolicT m () Source #

setInfo :: String -> [String] -> SymbolicT m () Source #

setOption :: SMTOption -> SymbolicT m () Source #

setLogic :: Logic -> SymbolicT m () Source #

addAxiom :: String -> [String] -> SymbolicT m () Source #

setTimeOut :: Integer -> SymbolicT m () Source #

contextState :: SymbolicT m State Source #

MonadIO m => SolverContext (QueryT m) Source # | `QueryT` as a `SolverContext`.

Instance details

Defined in Data.SBV.Control.Utils

Methods

constrain :: SBool -> QueryT m () Source #

softConstrain :: SBool -> QueryT m () Source #

namedConstraint :: String -> SBool -> QueryT m () Source #

constrainWithAttribute :: [(String, String)] -> SBool -> QueryT m () Source #

setInfo :: String -> [String] -> QueryT m () Source #

setOption :: SMTOption -> QueryT m () Source #

setLogic :: Logic -> QueryT m () Source #

addAxiom :: String -> [String] -> QueryT m () Source #

setTimeOut :: Integer -> QueryT m () Source #

contextState :: QueryT m State Source #

internalVariable :: State -> Kind -> IO SV Source #

Create an internal variable, which acts as an input but isn't visible to the user. Such variables are existentially quantified in a SAT context, and universally quantified in a proof context.

internalConstraint :: State -> Bool -> [(String, String)] -> SVal -> IO () Source #

Require a boolean condition to be true in the state. Only used for internal purposes.

isCodeGenMode :: State -> IO Bool Source #

Is this a CodeGen run? (i.e., generating code)

newtype SBVType Source #

A simple type for SBV computations, used mainly for uninterpreted constants. We keep track of the signedness/size of the arguments. A non-function will have just one entry in the list.

Constructors

SBVType [Kind] |

#### Instances

Instances details

Eq SBVType Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: SBVType -> SBVType -> Bool (/=) :: SBVType -> SBVType -> Bool
Ord SBVType Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods compare :: SBVType -> SBVType -> Ordering (<) :: SBVType -> SBVType -> Bool (<=) :: SBVType -> SBVType -> Bool (>) :: SBVType -> SBVType -> Bool (>=) :: SBVType -> SBVType -> Bool max :: SBVType -> SBVType -> SBVType min :: SBVType -> SBVType -> SBVType
Show SBVType Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SBVType -> ShowS show :: SBVType -> String showList :: [SBVType] -> ShowS
NFData SBVType Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SBVType -> ()

newUninterpreted :: State -> String -> SBVType -> Maybe [String] -> IO () Source #

Create a new uninterpreted symbol, possibly with user given code

data Quantifier Source #

Quantifiers: forall or exists. Note that we allow arbitrary nestings.

Constructors

ALL |
EX |

#### Instances

Instances details

Eq Quantifier Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: Quantifier -> Quantifier -> Bool (/=) :: Quantifier -> Quantifier -> Bool
Show Quantifier Source # | Show instance for `Quantifier`
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> Quantifier -> ShowS show :: Quantifier -> String showList :: [Quantifier] -> ShowS
NFData Quantifier Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Quantifier -> ()

needsExistentials :: [Quantifier] -> Bool Source #

Are there any existential quantifiers?

data SMTLibPgm Source #

Representation of an SMT-Lib program. In between pre and post goes the refuted models

Constructors

SMTLibPgm SMTLibVersion [String] |

#### Instances

Instances details

Show SMTLibPgm Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SMTLibPgm -> ShowS show :: SMTLibPgm -> String showList :: [SMTLibPgm] -> ShowS
NFData SMTLibPgm Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SMTLibPgm -> ()

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 maxBound :: SMTLibVersion
Enum SMTLibVersion Source # |

Instance details

Defined in Data.SBV.Core.Symbolic

Methods

succ :: SMTLibVersion -> SMTLibVersion

pred :: SMTLibVersion -> SMTLibVersion

toEnum :: Int -> SMTLibVersion

fromEnum :: SMTLibVersion -> Int

enumFrom :: SMTLibVersion -> [SMTLibVersion]

enumFromThen :: SMTLibVersion -> SMTLibVersion -> [SMTLibVersion]

enumFromTo :: SMTLibVersion -> SMTLibVersion -> [SMTLibVersion]

enumFromThenTo :: SMTLibVersion -> SMTLibVersion -> SMTLibVersion -> [SMTLibVersion]

Eq SMTLibVersion Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: SMTLibVersion -> SMTLibVersion -> Bool (/=) :: SMTLibVersion -> SMTLibVersion -> Bool
Show SMTLibVersion Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SMTLibVersion -> ShowS show :: SMTLibVersion -> String showList :: [SMTLibVersion] -> ShowS
NFData SMTLibVersion Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SMTLibVersion -> ()

smtLibVersionExtension :: SMTLibVersion -> String Source #

The extension associated with the version

smtLibReservedNames :: [String] Source #

Names reserved by SMTLib. This list is current as of Dec 6 2015; but of course there's no guarantee it'll stay that way.

data SolverCapabilities Source #

Translation tricks needed for specific capabilities afforded by each solver

Constructors

SolverCapabilities |

Fields

- supportsQuantifiers :: Bool

  Supports SMT-Lib2 style quantifiers?

- supportsUninterpretedSorts :: Bool

  Supports SMT-Lib2 style uninterpreted-sorts

- supportsUnboundedInts :: Bool

  Supports unbounded integers?

- supportsReals :: Bool

  Supports reals?

- supportsApproxReals :: Bool

  Supports printing of approximations of reals?

- supportsIEEE754 :: Bool

  Supports floating point numbers?

- supportsSets :: Bool

  Supports set operations?

- supportsOptimization :: Bool

  Supports optimization routines?

- supportsPseudoBooleans :: Bool

  Supports pseudo-boolean operations?

- supportsCustomQueries :: Bool

  Supports interactive queries per SMT-Lib?

- supportsGlobalDecls :: Bool

  Supports global declarations? (Needed for push-pop.)

- supportsDataTypes :: Bool

  Supports datatypes?

- supportsFlattenedModels :: Maybe [String]

  Supports flattened model output? (With given config lines.)

extractSymbolicSimulationState :: State -> IO Result Source #

Grab the program from a running symbolic simulation state.

data SMTScript Source #

A script, to be passed to the solver.

Constructors

SMTScript |

Fields

- scriptBody :: String

  Initial feed

- scriptModel :: [String]

  Continuation script, to extract results

#### Instances

Instances details

NFData SMTScript Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SMTScript -> ()

data Solver Source #

Solvers that SBV is aware of

Constructors

Z3 |
Yices |
Boolector |
CVC4 |
MathSAT |
ABC |

#### Instances

Instances details

Bounded Solver Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods minBound :: Solver maxBound :: Solver
Enum Solver Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods succ :: Solver -> Solver pred :: Solver -> Solver toEnum :: Int -> Solver fromEnum :: Solver -> Int enumFrom :: Solver -> [Solver] enumFromThen :: Solver -> Solver -> [Solver] enumFromTo :: Solver -> Solver -> [Solver] enumFromThenTo :: Solver -> Solver -> Solver -> [Solver]
Show Solver Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> Solver -> ShowS show :: Solver -> String showList :: [Solver] -> ShowS

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

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
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 -> ()
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, ([([CV], CV)], CV)) Source #

getModelUIFunValue :: String -> SMTResult -> Maybe (SBVType, ([([CV], CV)], CV)) Source #

data SMTModel Source #

A model, as returned by a solver

Constructors

SMTModel |

Fields

- modelObjectives :: [(String, GeneralizedCV)]

  Mapping of symbolic values to objective values.

- modelBindings :: Maybe [((Quantifier, NamedSymVar), Maybe CV)]

  Mapping of input variables as reported by the solver. Only collected if model validation is requested.

- modelAssocs :: [(String, CV)]

  Mapping of symbolic values to constants.

- modelUIFuns :: [(String, (SBVType, ([([CV], CV)], CV)))]

  Mapping of uninterpreted functions to association lists in the model. Note that an uninterpreted constant (function of arity 0) will be stored in the `modelAssocs` field.

#### Instances

Instances details

Show SMTModel Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SMTModel -> ShowS show :: SMTModel -> String showList :: [SMTModel] -> ShowS
NFData SMTModel Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SMTModel -> ()

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 and 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. If base 2 or 16 is used, then floating-point values will be printed in their internal memory-layout format as well, which can come in handy for bit-precise analysis.

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)

- 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.

- satTrackUFs :: Bool

  In a `sat` 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

- solver :: SMTSolver

  The actual SMT solver.

- allowQuantifiedQueries :: Bool

  Should we permit use of quantifiers in the query mode? (Default: False. See http://github.com/LeventErkok/sbv/issues/459 for why.)

- 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

NFData SMTConfig Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SMTConfig -> ()

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

Eq OptimizeStyle Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (==) :: OptimizeStyle -> OptimizeStyle -> Bool (/=) :: OptimizeStyle -> OptimizeStyle -> Bool
Show OptimizeStyle Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> OptimizeStyle -> ShowS show :: OptimizeStyle -> String showList :: [OptimizeStyle] -> ShowS
NFData OptimizeStyle Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: OptimizeStyle -> ()

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 show :: Penalty -> String showList :: [Penalty] -> ShowS
NFData Penalty Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Penalty -> ()

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 (<$) :: a -> Objective b -> Objective a
Show a => Show (Objective a) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> Objective a -> ShowS show :: Objective a -> String showList :: [Objective a] -> ShowS
NFData a => NFData (Objective a) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: Objective a -> ()

data QueryState Source #

The state we keep track of as we interact with the solver

Constructors

QueryState |

Fields

- queryAsk :: Maybe Int -> String -> IO String
- querySend :: Maybe Int -> String -> IO ()
- queryRetrieveResponse :: Maybe Int -> IO String
- queryConfig :: SMTConfig
- queryTerminate :: IO ()
- queryTimeOutValue :: Maybe Int
- queryAssertionStackDepth :: Int

newtype QueryT m a Source #

A query is a user-guided mechanism to directly communicate and extract results from the solver. A generalization of `Query`.

Constructors

QueryT |

Fields

- runQueryT :: ReaderT State m a

#### Instances

Instances details

MonadTrans QueryT Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods lift :: Monad m => m a -> QueryT m a
MonadSymbolic Query Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods symbolicEnv :: Query State Source #
MonadError e m => MonadError e (QueryT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods throwError :: e -> QueryT m a catchError :: QueryT m a -> (e -> QueryT m a) -> QueryT m a
MonadWriter w m => MonadWriter w (QueryT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods writer :: (a, w) -> QueryT m a tell :: w -> QueryT m () listen :: QueryT m a -> QueryT m (a, w) pass :: QueryT m (a, w -> w) -> QueryT m a
MonadReader r m => MonadReader r (QueryT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods ask :: QueryT m r local :: (r -> r) -> QueryT m a -> QueryT m a reader :: (r -> a) -> QueryT m a
MonadState s m => MonadState s (QueryT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods get :: QueryT m s put :: s -> QueryT m () state :: (s -> (a, s)) -> QueryT m a
Monad m => Monad (QueryT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods (>>=) :: QueryT m a -> (a -> QueryT m b) -> QueryT m b (>>) :: QueryT m a -> QueryT m b -> QueryT m b return :: a -> QueryT m a
Functor m => Functor (QueryT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods fmap :: (a -> b) -> QueryT m a -> QueryT m b (<$) :: a -> QueryT m b -> QueryT m a
Applicative m => Applicative (QueryT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods pure :: a -> QueryT m a (<*>) :: QueryT m (a -> b) -> QueryT m a -> QueryT m b liftA2 :: (a -> b -> c) -> QueryT m a -> QueryT m b -> QueryT m c (*>) :: QueryT m a -> QueryT m b -> QueryT m b (<*) :: QueryT m a -> QueryT m b -> QueryT m a
MonadIO m => MonadIO (QueryT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods liftIO :: IO a -> QueryT m a
Monad m => MonadQuery (QueryT m) Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods queryState :: QueryT m State Source #
MonadIO m => SolverContext (QueryT m) Source # | `QueryT` as a `SolverContext`.

Instance details

Defined in Data.SBV.Control.Utils

Methods

constrain :: SBool -> QueryT m () Source #

softConstrain :: SBool -> QueryT m () Source #

namedConstraint :: String -> SBool -> QueryT m () Source #

constrainWithAttribute :: [(String, String)] -> SBool -> QueryT m () Source #

setInfo :: String -> [String] -> QueryT m () Source #

setOption :: SMTOption -> QueryT m () Source #

setLogic :: Logic -> QueryT m () Source #

addAxiom :: String -> [String] -> QueryT m () Source #

setTimeOut :: Integer -> QueryT m () Source #

contextState :: QueryT m State Source #

newtype SMTProblem Source #

Internal representation of a symbolic simulation result

Constructors

SMTProblem | SMTLib representation, given the config

Fields

- smtLibPgm :: SMTConfig -> SMTLibPgm

# Operations useful for instantiating SBV type classes

genLiteral :: Integral a => Kind -> a -> SBV b Source #

Generate a finite constant bitvector

genFromCV :: Integral a => CV -> a Source #

Convert a constant to an integral value

data CV Source #

`CV` represents a concrete word of a fixed size: For signed words, the most significant digit is considered to be the sign.

Constructors

CV |

Fields

- _cvKind :: !Kind
- cvVal :: !CVal

#### Instances

Instances details

Eq CV Source # |
Instance details Defined in Data.SBV.Core.Concrete Methods (==) :: CV -> CV -> Bool (/=) :: CV -> CV -> Bool
Ord CV Source # |
Instance details Defined in Data.SBV.Core.Concrete Methods compare :: CV -> CV -> Ordering (<) :: CV -> CV -> Bool (<=) :: CV -> CV -> Bool (>) :: CV -> CV -> Bool (>=) :: CV -> CV -> Bool max :: CV -> CV -> CV min :: CV -> CV -> CV
Show CV Source # | Show instance for `CV`.
Instance details Defined in Data.SBV.Core.Concrete Methods showsPrec :: Int -> CV -> ShowS show :: CV -> String showList :: [CV] -> ShowS
NFData CV |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: CV -> ()
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 #

isUnbounded :: CV -> Bool Source #

isUninterpreted :: 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 #

PrettyNum CV Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: CV -> String Source # binS :: CV -> String Source # hexP :: CV -> String Source # binP :: CV -> String Source # hex :: CV -> String Source # bin :: CV -> String 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 #
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 #

genMkSymVar :: MonadSymbolic m => Kind -> Maybe Quantifier -> Maybe String -> m (SBV a) Source #

Generalization of `genMkSymVar`

genParse :: Integral a => Kind -> [CV] -> Maybe (a, [CV]) Source #

Parse a signed/sized value from a sequence of CVs

showModel :: SMTConfig -> SMTModel -> String Source #

Show a model in human readable form. Ignore bindings to those variables that start with "__internal_sbv_" and also those marked as "nonModelVar" in the config; as these are only for internal purposes

data SMTModel Source #

A model, as returned by a solver

Constructors

SMTModel |

Fields

- modelObjectives :: [(String, GeneralizedCV)]

  Mapping of symbolic values to objective values.

- modelBindings :: Maybe [((Quantifier, NamedSymVar), Maybe CV)]

  Mapping of input variables as reported by the solver. Only collected if model validation is requested.

- modelAssocs :: [(String, CV)]

  Mapping of symbolic values to constants.

- modelUIFuns :: [(String, (SBVType, ([([CV], CV)], CV)))]

  Mapping of uninterpreted functions to association lists in the model. Note that an uninterpreted constant (function of arity 0) will be stored in the `modelAssocs` field.

#### Instances

Instances details

Show SMTModel Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods showsPrec :: Int -> SMTModel -> ShowS show :: SMTModel -> String showList :: [SMTModel] -> ShowS
NFData SMTModel Source # |
Instance details Defined in Data.SBV.Core.Symbolic Methods rnf :: SMTModel -> ()

liftQRem :: (Eq a, SymVal a) => SBV a -> SBV a -> (SBV a, SBV a) Source #

Lift `quotRem` to symbolic words. Division by 0 is defined s.t. `x/0 = 0`; which holds even when `x` is `0` itself.

liftDMod :: (Ord a, SymVal a, Num a, SDivisible (SBV a)) => SBV a -> SBV a -> (SBV a, SBV a) Source #

Lift `divMod` to symbolic words. Division by 0 is defined s.t. `x/0 = 0`; which holds even when `x` is `0` itself. Essentially, this is conversion from quotRem (truncate to 0) to divMod (truncate towards negative infinity)

registerKind :: State -> Kind -> IO () Source #

Register a new kind with the system, used for uninterpreted sorts. NB: Is it safe to have new kinds in query mode? It could be that the new kind might introduce a constraint that effects the logic. For instance, if we're seeing `Double` for the first time and using a BV logic, then things would fall apart. But this should be rare, and hopefully the success-response checking mechanism will catch the rare cases where this is an issue. In either case, the user can always arrange for the right logic by calling `setLogic` appropriately, so it seems safe to just allow for this.

# Compilation to C, extras

compileToC' :: String -> SBVCodeGen a -> IO (a, CgConfig, CgPgmBundle) Source #

Lower level version of `compileToC`, producing a `CgPgmBundle`

compileToCLib' :: String -> [(String, SBVCodeGen a)] -> IO ([a], CgConfig, CgPgmBundle) Source #

Lower level version of `compileToCLib`, producing a `CgPgmBundle`

# Code generation primitives

# The codegen monad

newtype SBVCodeGen a Source #

The code-generation monad. Allows for precise layout of input values reference parameters (for returning composite values in languages such as C), and return values.

Constructors

SBVCodeGen (StateT CgState Symbolic a) |

#### Instances

Instances details

Monad SBVCodeGen Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods (>>=) :: SBVCodeGen a -> (a -> SBVCodeGen b) -> SBVCodeGen b (>>) :: SBVCodeGen a -> SBVCodeGen b -> SBVCodeGen b return :: a -> SBVCodeGen a
Functor SBVCodeGen Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods fmap :: (a -> b) -> SBVCodeGen a -> SBVCodeGen b (<$) :: a -> SBVCodeGen b -> SBVCodeGen a
MonadFail SBVCodeGen Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods fail :: String -> SBVCodeGen a
Applicative SBVCodeGen Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods pure :: a -> SBVCodeGen a (<*>) :: SBVCodeGen (a -> b) -> SBVCodeGen a -> SBVCodeGen b liftA2 :: (a -> b -> c) -> SBVCodeGen a -> SBVCodeGen b -> SBVCodeGen c (*>) :: SBVCodeGen a -> SBVCodeGen b -> SBVCodeGen b (<*) :: SBVCodeGen a -> SBVCodeGen b -> SBVCodeGen a
MonadIO SBVCodeGen Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods liftIO :: IO a -> SBVCodeGen a
MonadSymbolic SBVCodeGen Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods symbolicEnv :: SBVCodeGen State Source #
MonadState CgState SBVCodeGen Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods get :: SBVCodeGen CgState put :: CgState -> SBVCodeGen () state :: (CgState -> (a, CgState)) -> SBVCodeGen a

cgSym :: Symbolic a -> SBVCodeGen a Source #

Reach into symbolic monad from code-generation

# Specifying inputs, SBV variants

cgInput :: SymVal a => String -> SBVCodeGen (SBV a) Source #

Creates an atomic input in the generated code.

cgInputArr :: SymVal a => Int -> String -> SBVCodeGen [SBV a] Source #

Creates an array input in the generated code.

cgOutput :: String -> SBV a -> SBVCodeGen () Source #

Creates an atomic output in the generated code.

cgOutputArr :: SymVal a => String -> [SBV a] -> SBVCodeGen () Source #

Creates an array output in the generated code.

cgReturn :: SBV a -> SBVCodeGen () Source #

Creates a returned (unnamed) value in the generated code.

cgReturnArr :: SymVal a => [SBV a] -> SBVCodeGen () Source #

Creates a returned (unnamed) array value in the generated code.

# Specifying inputs, SVal variants

svCgInput :: Kind -> String -> SBVCodeGen SVal Source #

Creates an atomic input in the generated code.

svCgInputArr :: Kind -> Int -> String -> SBVCodeGen [SVal] Source #

Creates an array input in the generated code.

svCgOutput :: String -> SVal -> SBVCodeGen () Source #

Creates an atomic output in the generated code.

svCgOutputArr :: String -> [SVal] -> SBVCodeGen () Source #

Creates an array output in the generated code.

svCgReturn :: SVal -> SBVCodeGen () Source #

Creates a returned (unnamed) value in the generated code.

svCgReturnArr :: [SVal] -> SBVCodeGen () Source #

Creates a returned (unnamed) array value in the generated code.

# Settings

cgPerformRTCs :: Bool -> SBVCodeGen () Source #

Sets RTC (run-time-checks) for index-out-of-bounds, shift-with-large value etc. on/off. Default: `False`.

cgSetDriverValues :: [Integer] -> SBVCodeGen () Source #

Sets driver program run time values, useful for generating programs with fixed drivers for testing. Default: None, i.e., use random values.

cgAddPrototype :: [String] -> SBVCodeGen () Source #

Adds the given lines to the header file generated, useful for generating programs with uninterpreted functions.

cgAddDecl :: [String] -> SBVCodeGen () Source #

Adds the given lines to the program file generated, useful for generating programs with uninterpreted functions.

cgAddLDFlags :: [String] -> SBVCodeGen () Source #

Adds the given words to the compiler options in the generated Makefile, useful for linking extra stuff in.

cgIgnoreSAssert :: Bool -> SBVCodeGen () Source #

Ignore assertions (those generated by `sAssert` calls) in the generated C code

cgOverwriteFiles :: Bool -> SBVCodeGen () Source #

If passed `True`, then we will not ask the user if we're overwriting files as we generate the C code. Otherwise, we'll prompt.

cgShowU8UsingHex :: Bool -> SBVCodeGen () Source #

If passed `True`, then we will show 'SWord 8' type in hex. Otherwise we'll show it in decimal. All signed types are shown decimal, and all unsigned larger types are shown hexadecimal otherwise.

cgIntegerSize :: Int -> SBVCodeGen () Source #

Sets number of bits to be used for representing the `SInteger` type in the generated C code. The argument must be one of `8`, `16`, `32`, or `64`. Note that this is essentially unsafe as the semantics of unbounded Haskell integers becomes reduced to the corresponding bit size, as typical in most C implementations.

cgSRealType :: CgSRealType -> SBVCodeGen () Source #

Sets the C type to be used for representing the `SReal` type in the generated C code. The setting can be one of C's `"float"`, `"double"`, or `"long double"`, types, depending on the precision needed. Note that this is essentially unsafe as the semantics of infinite precision SReal values becomes reduced to the corresponding floating point type in C, and hence it is subject to rounding errors.

data CgSRealType Source #

Possible mappings for the `SReal` type when translated to C. Used in conjunction with the function `cgSRealType`. Note that the particular characteristics of the mapped types depend on the platform and the compiler used for compiling the generated C program. See http://en.wikipedia.org/wiki/C_data_types for details.

Constructors

CgFloat

    float

CgDouble

    double

CgLongDouble

    long double

#### Instances

Instances details

Eq CgSRealType Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods (==) :: CgSRealType -> CgSRealType -> Bool (/=) :: CgSRealType -> CgSRealType -> Bool
Show CgSRealType Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods showsPrec :: Int -> CgSRealType -> ShowS show :: CgSRealType -> String showList :: [CgSRealType] -> ShowS

# Infrastructure

class CgTarget a where Source #

Abstract over code generation for different languages

Methods

targetName :: a -> String Source #

translate :: a -> CgConfig -> String -> CgState -> Result -> CgPgmBundle Source #

data CgConfig Source #

Options for code-generation.

Constructors

CgConfig |

Fields

- cgRTC :: Bool

  If `True`, perform run-time-checks for index-out-of-bounds or shifting-by-large values etc.

- cgInteger :: Maybe Int

  Bit-size to use for representing SInteger (if any)

- cgReal :: Maybe CgSRealType

  Type to use for representing SReal (if any)

- cgDriverVals :: [Integer]

  Values to use for the driver program generated, useful for generating non-random drivers.

- cgGenDriver :: Bool

  If `True`, will generate a driver program

- cgGenMakefile :: Bool

  If `True`, will generate a makefile

- cgIgnoreAsserts :: Bool

  If `True`, will ignore `sAssert` calls

- cgOverwriteGenerated :: Bool

  If `True`, will overwrite the generated files without prompting.

- cgShowU8InHex :: Bool

  If `True`, then 8-bit unsigned values will be shown in hex as well, otherwise decimal. (Other types always shown in hex.)

data CgState Source #

Code-generation state

Constructors

CgState |

Fields

- cgInputs :: [(String, CgVal)]
- cgOutputs :: [(String, CgVal)]
- cgReturns :: [CgVal]
- cgPrototypes :: [String]
- cgDecls :: [String]
- cgLDFlags :: [String]
- cgFinalConfig :: CgConfig

#### Instances

Instances details

MonadState CgState SBVCodeGen Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods get :: SBVCodeGen CgState put :: CgState -> SBVCodeGen () state :: (CgState -> (a, CgState)) -> SBVCodeGen a

data CgPgmBundle Source #

Representation of a collection of generated programs.

Constructors

CgPgmBundle (Maybe Int, Maybe CgSRealType) [(FilePath, (CgPgmKind, [Doc]))] |

#### Instances

Instances details

Show CgPgmBundle Source # |
Instance details Defined in Data.SBV.Compilers.CodeGen Methods showsPrec :: Int -> CgPgmBundle -> ShowS show :: CgPgmBundle -> String showList :: [CgPgmBundle] -> ShowS

data CgPgmKind Source #

Different kinds of "files" we can produce. Currently this is quite C specific.

Constructors

CgMakefile [String] |
CgHeader [Doc] |
CgSource |
CgDriver |

data CgVal Source #

Abstraction of target language values

Constructors

CgAtomic SV |
CgArray [SV] |

defaultCgConfig :: CgConfig Source #

Default options for code generation. The run-time checks are turned-off, and the driver values are completely random.

initCgState :: CgState Source #

Initial configuration for code-generation

isCgDriver :: CgPgmKind -> Bool Source #

Is this a driver program?

isCgMakefile :: CgPgmKind -> Bool Source #

Is this a make file?

# Generating collateral

cgGenerateDriver :: Bool -> SBVCodeGen () Source #

Should we generate a driver program? Default: `True`. When a library is generated, it will have a driver if any of the contituent functions has a driver. (See `compileToCLib`.)

cgGenerateMakefile :: Bool -> SBVCodeGen () Source #

Should we generate a Makefile? Default: `True`.

codeGen :: CgTarget l => l -> CgConfig -> String -> SBVCodeGen a -> IO (a, CgConfig, CgPgmBundle) Source #

Generate code for a symbolic program, returning a Code-gen bundle, i.e., collection of makefiles, source code, headers, etc.

renderCgPgmBundle :: Maybe FilePath -> (CgConfig, CgPgmBundle) -> IO () Source #

Render a code-gen bundle to a directory or to stdout

# Various math utilities around floats

fpMaxH :: RealFloat a => a -> a -> a Source #

The SMT-Lib (in particular Z3) implementation for min/max for floats does not agree with Haskell's; and also it does not agree with what the hardware does. Sigh.. See: http://ghc.haskell.org/trac/ghc/ticket/10378 http://github.com/Z3Prover/z3/issues/68 So, we codify here what the Z3 (SMTLib) is implementing for fpMax. The discrepancy with Haskell is that the NaN propagation doesn't work in Haskell The discrepancy with x86 is that given +0/-0, x86 returns the second argument; SMTLib is non-deterministic

fpMinH :: RealFloat a => a -> a -> a Source #

SMTLib compliant definition for `fpMin`. See the comments for `fpMax`.

fp2fp :: (RealFloat a, RealFloat b) => a -> b Source #

Convert double to float and back. Essentially `fromRational . toRational` except careful on NaN, Infinities, and -0.

fpRemH :: RealFloat a => a -> a -> a Source #

Compute the "floating-point" remainder function, the float/double value that remains from the division of `x` and `y`. There are strict rules around 0's, Infinities, and NaN's as coded below, See http://smt-lib.org/papers/BTRW14.pdf, towards the end of section 4.c.

fpRoundToIntegralH :: RealFloat a => a -> a Source #

Convert a float to the nearest integral representable in that type

fpIsEqualObjectH :: RealFloat a => a -> a -> Bool Source #

Check that two floats are the exact same values, i.e., +0/-0 does not compare equal, and NaN's compare equal to themselves.

fpCompareObjectH :: RealFloat a => a -> a -> Ordering Source #

Ordering for floats, avoiding the +0-0NaN issues. Note that this is essentially used for indexing into a map, so we need to be total. Thus, the order we pick is: NaN -oo -0 +0 +oo The placement of NaN here is questionable, but immaterial.

fpIsNormalizedH :: RealFloat a => a -> Bool Source #

Check if a number is "normal." Note that +0/-0 is not considered a normal-number and also this is not simply the negation of isDenormalized!

# Pretty number printing

class PrettyNum a where Source #

PrettyNum class captures printing of numbers in hex and binary formats; also supporting negative numbers.

Methods

hexS :: a -> String Source #

Show a number in hexadecimal, starting with `0x` and type.

binS :: a -> String Source #

Show a number in binary, starting with `0b` and type.

hexP :: a -> String Source #

Show a number in hexadecimal, starting with `0x` but no type.

binP :: a -> String Source #

Show a number in binary, starting with `0b` but no type.

hex :: a -> String Source #

Show a number in hex, without prefix, or types.

bin :: a -> String Source #

Show a number in bin, without prefix, or types.

#### Instances

Instances details

PrettyNum Bool Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Bool -> String Source # binS :: Bool -> String Source # hexP :: Bool -> String Source # binP :: Bool -> String Source # hex :: Bool -> String Source # bin :: Bool -> String Source #
PrettyNum Int8 Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Int8 -> String Source # binS :: Int8 -> String Source # hexP :: Int8 -> String Source # binP :: Int8 -> String Source # hex :: Int8 -> String Source # bin :: Int8 -> String Source #
PrettyNum Int16 Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Int16 -> String Source # binS :: Int16 -> String Source # hexP :: Int16 -> String Source # binP :: Int16 -> String Source # hex :: Int16 -> String Source # bin :: Int16 -> String Source #
PrettyNum Int32 Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Int32 -> String Source # binS :: Int32 -> String Source # hexP :: Int32 -> String Source # binP :: Int32 -> String Source # hex :: Int32 -> String Source # bin :: Int32 -> String Source #
PrettyNum Int64 Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Int64 -> String Source # binS :: Int64 -> String Source # hexP :: Int64 -> String Source # binP :: Int64 -> String Source # hex :: Int64 -> String Source # bin :: Int64 -> String Source #
PrettyNum Integer Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Integer -> String Source # binS :: Integer -> String Source # hexP :: Integer -> String Source # binP :: Integer -> String Source # hex :: Integer -> String Source # bin :: Integer -> String Source #
PrettyNum Word8 Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Word8 -> String Source # binS :: Word8 -> String Source # hexP :: Word8 -> String Source # binP :: Word8 -> String Source # hex :: Word8 -> String Source # bin :: Word8 -> String Source #
PrettyNum Word16 Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Word16 -> String Source # binS :: Word16 -> String Source # hexP :: Word16 -> String Source # binP :: Word16 -> String Source # hex :: Word16 -> String Source # bin :: Word16 -> String Source #
PrettyNum Word32 Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Word32 -> String Source # binS :: Word32 -> String Source # hexP :: Word32 -> String Source # binP :: Word32 -> String Source # hex :: Word32 -> String Source # bin :: Word32 -> String Source #
PrettyNum Word64 Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: Word64 -> String Source # binS :: Word64 -> String Source # hexP :: Word64 -> String Source # binP :: Word64 -> String Source # hex :: Word64 -> String Source # bin :: Word64 -> String Source #
PrettyNum String Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: String -> String Source # binS :: String -> String Source # hexP :: String -> String Source # binP :: String -> String Source # hex :: String -> String Source # bin :: String -> String Source #
PrettyNum CV Source # |
Instance details Defined in Data.SBV.Utils.PrettyNum Methods hexS :: CV -> String Source # binS :: CV -> String Source # hexP :: CV -> String Source # binP :: CV -> String Source # hex :: CV -> String Source # bin :: CV -> 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 #

readBin :: Num a => String -> a Source #

A more convenient interface for reading binary numbers, also supports negative numbers

shex :: (Show a, Integral a) => Bool -> Bool -> (Bool, Int) -> a -> String Source #

Show as a hexadecimal value. First bool controls whether type info is printed while the second boolean controls wether 0x prefix is printed. The tuple is the signedness and the bit-length of the input. The length of the string will not depend on the value, but rather the bit-length.

chex :: (Show a, Integral a) => Bool -> Bool -> (Bool, Int) -> a -> String Source #

Show as hexadecimal, but for C programs. We have to be careful about printing min-bounds, since C does some funky casting, possibly losing the sign bit. In those cases, we use the defined constants in stdint.h. We also properly append the necessary suffixes as needed.

shexI :: Bool -> Bool -> Integer -> String Source #

Show as a hexadecimal value, integer version. Almost the same as shex above except we don't have a bit-length so the length of the string will depend on the actual value.

sbin :: (Show a, Integral a) => Bool -> Bool -> (Bool, Int) -> a -> String Source #

Similar to `shex`; except in binary.

sbinI :: Bool -> Bool -> Integer -> String Source #

Similar to `shexI`; except in binary.

showCFloat :: Float -> String Source #

A version of show for floats that generates correct C literals for nan/infinite. NB. Requires "math.h" to be included.

showCDouble :: Double -> String Source #

A version of show for doubles that generates correct C literals for nan/infinite. NB. Requires "math.h" to be included.

showHFloat :: Float -> String Source #

A version of show for floats that generates correct Haskell literals for nan/infinite

showHDouble :: Double -> String Source #

A version of show for doubles that generates correct Haskell literals for nan/infinite

showSMTFloat :: RoundingMode -> Float -> String Source #

A version of show for floats that generates correct SMTLib literals using the rounding mode

showSMTDouble :: RoundingMode -> Double -> String Source #

A version of show for doubles that generates correct SMTLib literals using the rounding mode

smtRoundingMode :: RoundingMode -> String Source #

Convert a rounding mode to the format SMT-Lib2 understands.

cvToSMTLib :: RoundingMode -> CV -> String Source #

Convert a CV to an SMTLib2 compliant value

mkSkolemZero :: RoundingMode -> Kind -> String Source #

Create a skolem 0 for the kind

# Timing computations

data Timing Source #

Specify how to save timing information, if at all.

Constructors

NoTiming |
PrintTiming |
SaveTiming (IORef NominalDiffTime) |

showTDiff :: NominalDiffTime -> String Source #

Show `NominalDiffTime` in human readable form. `NominalDiffTime` is essentially picoseconds (10^-12 seconds). We show it so that it's represented at the day:hour:minute:second.XXX granularity.

# Coordinating with the solver

In rare cases it might be necessary to send an arbitrary string down to the solver. Needless to say, this should be avoided if at all possible. Users should prefer the provided API. If you do find yourself needing `send` and `ask` directly, please get in touch to see if SBV can support a typed API for your use case. Similarly, the function `retrieveResponseFromSolver` might occasionally be necessary to clean-up the communication buffer. We would like to hear if you do need these functions regularly so we can provide better support.

sendStringToSolver :: (MonadIO m, MonadQuery m) => String -> m () Source #

Send an arbitrary string to the solver in a query. Note that this is inherently dangerous as it can put the solver in an arbitrary state and confuse SBV. If you use this feature, you are on your own!

sendRequestToSolver :: (MonadIO m, MonadQuery m) => String -> m String Source #

Send an arbitrary string to the solver in a query, and return a response. Note that this is inherently dangerous as it can put the solver in an arbitrary state and confuse SBV.

retrieveResponseFromSolver :: (MonadIO m, MonadQuery m) => String -> Maybe Int -> m [String] Source #

Retrieve multiple responses from the solver, until it responds with a user given tag that we shall arrange for internally. The optional timeout is in milliseconds. If the time-out is exceeded, then we will raise an error. Note that this is inherently dangerous as it can put the solver in an arbitrary state and confuse SBV. If you use this feature, you are on your own!

# Defining new metrics

addSValOptGoal :: MonadSymbolic m => Objective SVal -> m () Source #

Generalization of `addSValOptGoal`

sFloatAsComparableSWord32 :: SFloat -> SWord32 Source #

Convert a float to a comparable `SWord32`. The trick is to ignore the sign of -0, and if it's a negative value flip all the bits, and otherwise only flip the sign bit. This is known as the lexicographic ordering on floats and it works as long as you do not have a `NaN`.

sDoubleAsComparableSWord64 :: SDouble -> SWord64 Source #

Convert a double to a comparable `SWord64`. The trick is to ignore the sign of -0, and if it's a negative value flip all the bits, and otherwise only flip the sign bit. This is known as the lexicographic ordering on doubles and it works as long as you do not have a `NaN`.