sbv-14.5: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.
Copyright(c) Brian Schroeder
Levent Erkok
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.SBV.Trans

Description

More generalized alternative to Data.SBV for advanced client use

Synopsis

Symbolic types

Booleans

type SBool = SBV Bool Source #

A symbolic boolean/bit

Boolean values and functions

sTrue :: SBool Source #

Symbolic True

sNot :: SBool -> SBool Source #

Symbolic boolean negation

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

Symbolic conjunction

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

Symbolic disjunction

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

Symbolic logical xor

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

Symbolic nand

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

Symbolic nor

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

Symbolic implication

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

Symbolic boolean equivalence

fromBool :: Bool -> SBool Source #

Conversion from Bool to SBool

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

Returns 1 if the boolean is sTrue, otherwise 0.

Logical functions

sAnd :: [SBool] -> SBool Source #

Generalization of and

sOr :: [SBool] -> SBool Source #

Generalization of or

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

Generalization of any

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

Generalization of all

Bit-vectors

Unsigned bit-vectors

type SWord8 = SBV Word8 Source #

8-bit unsigned symbolic value

type SWord16 = SBV Word16 Source #

16-bit unsigned symbolic value

type SWord32 = SBV Word32 Source #

32-bit unsigned symbolic value

type SWord64 = SBV Word64 Source #

64-bit unsigned symbolic value

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

A symbolic unsigned bit-vector carrying its size info

data WordN (n :: Nat) Source #

An unsigned bit-vector carrying its size info

Instances

Instances details
KnownNat n => Arbitrary (WordN n) Source #

Quickcheck instance for WordN

Instance details

Defined in Data.SBV.Core.Sized

Methods

arbitrary :: Gen (WordN n) #

shrink :: WordN n -> [WordN n] #

(KnownNat n, BVIsNonZero n) => Bits (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Sized

Methods

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

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

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

complement :: WordN n -> WordN n #

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

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

zeroBits :: WordN n #

bit :: Int -> WordN n #

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

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

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

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

bitSizeMaybe :: WordN n -> Maybe Int #

bitSize :: WordN n -> Int #

isSigned :: WordN n -> Bool #

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

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

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

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

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

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

popCount :: WordN n -> Int #

(KnownNat n, BVIsNonZero n) => Bounded (WordN n) Source #

Bounded instance for WordN

Instance details

Defined in Data.SBV.Core.Sized

Methods

minBound :: WordN n #

maxBound :: WordN n #

(KnownNat n, BVIsNonZero n) => Enum (WordN n) Source #

Enum instance for WordN

Instance details

Defined in Data.SBV.Core.Sized

Methods

succ :: WordN n -> WordN n #

pred :: WordN n -> WordN n #

toEnum :: Int -> WordN n #

fromEnum :: WordN n -> Int #

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

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

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

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

KnownNat n => Num (SWord n) Source # 
Instance details

Defined in Data.SBV.Core.Data

Methods

(+) :: SWord n -> SWord n -> SWord n #

(-) :: SWord n -> SWord n -> SWord n #

(*) :: SWord n -> SWord n -> SWord n #

negate :: SWord n -> SWord n #

abs :: SWord n -> SWord n #

signum :: SWord n -> SWord n #

fromInteger :: Integer -> SWord n #

(KnownNat n, BVIsNonZero n) => Num (WordN n) Source #

Num instance for WordN

Instance details

Defined in Data.SBV.Core.Sized

Methods

(+) :: WordN n -> WordN n -> WordN n #

(-) :: WordN n -> WordN n -> WordN n #

(*) :: WordN n -> WordN n -> WordN n #

negate :: WordN n -> WordN n #

abs :: WordN n -> WordN n #

signum :: WordN n -> WordN n #

fromInteger :: Integer -> WordN n #

(KnownNat n, BVIsNonZero n) => Integral (WordN n) Source #

Integral instance for WordN

Instance details

Defined in Data.SBV.Core.Sized

Methods

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

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

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

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

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

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

toInteger :: WordN n -> Integer #

(KnownNat n, BVIsNonZero n) => Real (WordN n) Source #

Real instance for WordN

Instance details

Defined in Data.SBV.Core.Sized

Methods

toRational :: WordN n -> Rational #

Show (WordN n) Source #

Show instance for WordN

Instance details

Defined in Data.SBV.Core.Sized

Methods

showsPrec :: Int -> WordN n -> ShowS #

show :: WordN n -> String #

showList :: [WordN n] -> ShowS #

Eq (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Sized

Methods

(==) :: WordN n -> WordN n -> Bool #

(/=) :: WordN n -> WordN n -> Bool #

Ord (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Sized

Methods

compare :: WordN n -> WordN n -> Ordering #

(<) :: WordN n -> WordN n -> Bool #

(<=) :: WordN n -> WordN n -> Bool #

(>) :: WordN n -> WordN n -> Bool #

(>=) :: WordN n -> WordN n -> Bool #

max :: WordN n -> WordN n -> WordN n #

min :: WordN n -> WordN n -> WordN n #

ByteConverter (SWord 8) Source #

SWord 8 instance for ByteConverter

Instance details

Defined in Data.SBV

Methods

toBytes :: SWord 8 -> [SWord 8] Source #

fromBytes :: [SWord 8] -> SWord 8 Source #

ByteConverter (SWord 16) Source #

SWord 16 instance for ByteConverter

Instance details

Defined in Data.SBV

Methods

toBytes :: SWord 16 -> [SWord 8] Source #

fromBytes :: [SWord 8] -> SWord 16 Source #

ByteConverter (SWord 32) Source #

SWord 32 instance for ByteConverter

Instance details

Defined in Data.SBV

Methods

toBytes :: SWord 32 -> [SWord 8] Source #

fromBytes :: [SWord 8] -> SWord 32 Source #

ByteConverter (SWord 64) Source #

SWord 64 instance for ByteConverter

Instance details

Defined in Data.SBV

Methods

toBytes :: SWord 64 -> [SWord 8] Source #

fromBytes :: [SWord 8] -> SWord 64 Source #

ByteConverter (SWord 128) Source #

SWord 128 instance for ByteConverter

Instance details

Defined in Data.SBV

Methods

toBytes :: SWord 128 -> [SWord 8] Source #

fromBytes :: [SWord 8] -> SWord 128 Source #

ByteConverter (SWord 256) Source #

SWord 256 instance for ByteConverter

Instance details

Defined in Data.SBV

Methods

toBytes :: SWord 256 -> [SWord 8] Source #

fromBytes :: [SWord 8] -> SWord 256 Source #

ByteConverter (SWord 512) Source #

SWord 512 instance for ByteConverter

Instance details

Defined in Data.SBV

Methods

toBytes :: SWord 512 -> [SWord 8] Source #

fromBytes :: [SWord 8] -> SWord 512 Source #

ByteConverter (SWord 1024) Source #

SWord 1024 instance for ByteConverter

Instance details

Defined in Data.SBV

Methods

toBytes :: SWord 1024 -> [SWord 8] Source #

fromBytes :: [SWord 8] -> SWord 1024 Source #

(KnownNat n, BVIsNonZero n) => SymVal (WordN n) Source #

SymVal instance for WordN

Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => HasKind (WordN n) Source #

WordN has a kind

Instance details

Defined in Data.SBV.Core.Sized

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

Optimizing WordN

Instance details

Defined in Data.SBV.Core.Model

Associated Types

type MetricSpace (WordN n) 
Instance details

Defined in Data.SBV.Core.Model

type MetricSpace (WordN n) = WordN n
(KnownNat n, BVIsNonZero n) => OrdSymbolic (SWord n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: SWord n -> SWord n -> SBool Source #

(.<=) :: SWord n -> SWord n -> SBool Source #

(.>) :: SWord n -> SWord n -> SBool Source #

(.>=) :: SWord n -> SWord n -> SBool Source #

smin :: SWord n -> SWord n -> SWord n Source #

smax :: SWord n -> SWord n -> SWord n Source #

inRange :: SWord n -> (SWord n, SWord n) -> SBool Source #

(KnownNat n, BVIsNonZero n) => SDivisible (SWord n) Source #

SDivisible instance for SWord

Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

sQuot :: SWord n -> SWord n -> SWord n Source #

sRem :: SWord n -> SWord n -> SWord n Source #

sDiv :: SWord n -> SWord n -> SWord n Source #

sMod :: SWord n -> SWord n -> SWord n Source #

(KnownNat n, BVIsNonZero n) => SDivisible (WordN n) Source #

SDivisible instance for WordN

Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

sQuot :: WordN n -> WordN n -> WordN n Source #

sRem :: WordN n -> WordN n -> WordN n Source #

sDiv :: WordN n -> WordN n -> WordN n Source #

sMod :: WordN n -> WordN n -> WordN n Source #

(KnownNat n, BVIsNonZero n) => SFiniteBits (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => SIntegral (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => Zero (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

zero :: SBV (WordN n) Source #

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

(KnownNat n, BVIsNonZero n) => SatModel (WordN n) Source #

Constructing models for WordN

Instance details

Defined in Data.SBV.SMT.SMT

Methods

parseCVs :: [CV] -> Maybe (WordN n, [CV]) Source #

cvtModel :: (WordN n -> Maybe b) -> Maybe (WordN n, [CV]) -> Maybe (b, [CV]) Source #

(KnownNat n, BVIsNonZero n) => ArithOverflow (SWord n) Source # 
Instance details

Defined in Data.SBV.Tools.Overflow

Methods

bvAddO :: SWord n -> SWord n -> SBool Source #

bvSubO :: SWord n -> SWord n -> SBool Source #

bvMulO :: SWord n -> SWord n -> SBool Source #

bvDivO :: SWord n -> SWord n -> SBool Source #

bvNegO :: SWord n -> SBool Source #

(KnownNat n, BVIsNonZero n) => CheckedArithmetic (WordN n) Source # 
Instance details

Defined in Data.SBV.Tools.Overflow

Methods

(+!) :: SBV (WordN n) -> SBV (WordN n) -> SBV (WordN n) Source #

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

(*!) :: SBV (WordN n) -> SBV (WordN n) -> SBV (WordN n) Source #

(/!) :: SBV (WordN n) -> SBV (WordN n) -> SBV (WordN n) Source #

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

(KnownNat n, BVIsNonZero n) => Polynomial (SWord n) Source # 
Instance details

Defined in Data.SBV.Tools.Polynomial

Methods

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

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

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

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

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

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

showPoly :: SWord n -> String Source #

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

type MetricSpace (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

type MetricSpace (WordN n) = WordN n

Signed bit-vectors

type SInt8 = SBV Int8 Source #

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

type SInt16 = SBV Int16 Source #

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

type SInt32 = SBV Int32 Source #

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

type SInt64 = SBV Int64 Source #

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

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

A symbolic signed bit-vector carrying its size info

data IntN (n :: Nat) Source #

A signed bit-vector carrying its size info

Instances

Instances details
KnownNat n => Arbitrary (IntN n) Source #

Quickcheck instance for IntN

Instance details

Defined in Data.SBV.Core.Sized

Methods

arbitrary :: Gen (IntN n) #

shrink :: IntN n -> [IntN n] #

(KnownNat n, BVIsNonZero n) => Bits (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Sized

Methods

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

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

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

complement :: IntN n -> IntN n #

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

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

zeroBits :: IntN n #

bit :: Int -> IntN n #

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

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

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

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

bitSizeMaybe :: IntN n -> Maybe Int #

bitSize :: IntN n -> Int #

isSigned :: IntN n -> Bool #

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

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

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

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

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

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

popCount :: IntN n -> Int #

(KnownNat n, BVIsNonZero n) => Bounded (IntN n) Source #

Bounded instance for IntN

Instance details

Defined in Data.SBV.Core.Sized

Methods

minBound :: IntN n #

maxBound :: IntN n #

(KnownNat n, BVIsNonZero n) => Enum (IntN n) Source #

Enum instance for IntN

Instance details

Defined in Data.SBV.Core.Sized

Methods

succ :: IntN n -> IntN n #

pred :: IntN n -> IntN n #

toEnum :: Int -> IntN n #

fromEnum :: IntN n -> Int #

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

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

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

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

KnownNat n => Num (SInt n) Source # 
Instance details

Defined in Data.SBV.Core.Data

Methods

(+) :: SInt n -> SInt n -> SInt n #

(-) :: SInt n -> SInt n -> SInt n #

(*) :: SInt n -> SInt n -> SInt n #

negate :: SInt n -> SInt n #

abs :: SInt n -> SInt n #

signum :: SInt n -> SInt n #

fromInteger :: Integer -> SInt n #

(KnownNat n, BVIsNonZero n) => Num (IntN n) Source #

Num instance for IntN

Instance details

Defined in Data.SBV.Core.Sized

Methods

(+) :: IntN n -> IntN n -> IntN n #

(-) :: IntN n -> IntN n -> IntN n #

(*) :: IntN n -> IntN n -> IntN n #

negate :: IntN n -> IntN n #

abs :: IntN n -> IntN n #

signum :: IntN n -> IntN n #

fromInteger :: Integer -> IntN n #

(KnownNat n, BVIsNonZero n) => Integral (IntN n) Source #

Integral instance for IntN

Instance details

Defined in Data.SBV.Core.Sized

Methods

quot :: IntN n -> IntN n -> IntN n #

rem :: IntN n -> IntN n -> IntN n #

div :: IntN n -> IntN n -> IntN n #

mod :: IntN n -> IntN n -> IntN n #

quotRem :: IntN n -> IntN n -> (IntN n, IntN n) #

divMod :: IntN n -> IntN n -> (IntN n, IntN n) #

toInteger :: IntN n -> Integer #

(KnownNat n, BVIsNonZero n) => Real (IntN n) Source #

Real instance for IntN

Instance details

Defined in Data.SBV.Core.Sized

Methods

toRational :: IntN n -> Rational #

Show (IntN n) Source #

Show instance for IntN

Instance details

Defined in Data.SBV.Core.Sized

Methods

showsPrec :: Int -> IntN n -> ShowS #

show :: IntN n -> String #

showList :: [IntN n] -> ShowS #

Eq (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Sized

Methods

(==) :: IntN n -> IntN n -> Bool #

(/=) :: IntN n -> IntN n -> Bool #

Ord (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Sized

Methods

compare :: IntN n -> IntN n -> Ordering #

(<) :: IntN n -> IntN n -> Bool #

(<=) :: IntN n -> IntN n -> Bool #

(>) :: IntN n -> IntN n -> Bool #

(>=) :: IntN n -> IntN n -> Bool #

max :: IntN n -> IntN n -> IntN n #

min :: IntN n -> IntN n -> IntN n #

(KnownNat n, BVIsNonZero n) => SymVal (IntN n) Source #

SymVal instance for IntN

Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => HasKind (IntN n) Source #

IntN has a kind

Instance details

Defined in Data.SBV.Core.Sized

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

Optimizing IntN

Instance details

Defined in Data.SBV.Core.Model

Associated Types

type MetricSpace (IntN n) 
Instance details

Defined in Data.SBV.Core.Model

type MetricSpace (IntN n) = WordN n
(KnownNat n, BVIsNonZero n) => OrdSymbolic (SInt n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: SInt n -> SInt n -> SBool Source #

(.<=) :: SInt n -> SInt n -> SBool Source #

(.>) :: SInt n -> SInt n -> SBool Source #

(.>=) :: SInt n -> SInt n -> SBool Source #

smin :: SInt n -> SInt n -> SInt n Source #

smax :: SInt n -> SInt n -> SInt n Source #

inRange :: SInt n -> (SInt n, SInt n) -> SBool Source #

(KnownNat n, BVIsNonZero n) => SDivisible (SInt n) Source #

SDivisible instance for SInt

Instance details

Defined in Data.SBV.Core.Model

Methods

sQuotRem :: SInt n -> SInt n -> (SInt n, SInt n) Source #

sDivMod :: SInt n -> SInt n -> (SInt n, SInt n) Source #

sQuot :: SInt n -> SInt n -> SInt n Source #

sRem :: SInt n -> SInt n -> SInt n Source #

sDiv :: SInt n -> SInt n -> SInt n Source #

sMod :: SInt n -> SInt n -> SInt n Source #

(KnownNat n, BVIsNonZero n) => SDivisible (IntN n) Source #

SDivisible instance for IntN

Instance details

Defined in Data.SBV.Core.Model

Methods

sQuotRem :: IntN n -> IntN n -> (IntN n, IntN n) Source #

sDivMod :: IntN n -> IntN n -> (IntN n, IntN n) Source #

sQuot :: IntN n -> IntN n -> IntN n Source #

sRem :: IntN n -> IntN n -> IntN n Source #

sDiv :: IntN n -> IntN n -> IntN n Source #

sMod :: IntN n -> IntN n -> IntN n Source #

(KnownNat n, BVIsNonZero n) => SFiniteBits (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => SIntegral (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => Zero (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

zero :: SBV (IntN n) Source #

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

(KnownNat n, BVIsNonZero n) => SatModel (IntN n) Source #

Constructing models for IntN

Instance details

Defined in Data.SBV.SMT.SMT

Methods

parseCVs :: [CV] -> Maybe (IntN n, [CV]) Source #

cvtModel :: (IntN n -> Maybe b) -> Maybe (IntN n, [CV]) -> Maybe (b, [CV]) Source #

(KnownNat n, BVIsNonZero n) => ArithOverflow (SInt n) Source # 
Instance details

Defined in Data.SBV.Tools.Overflow

Methods

bvAddO :: SInt n -> SInt n -> SBool Source #

bvSubO :: SInt n -> SInt n -> SBool Source #

bvMulO :: SInt n -> SInt n -> SBool Source #

bvDivO :: SInt n -> SInt n -> SBool Source #

bvNegO :: SInt n -> SBool Source #

(KnownNat n, BVIsNonZero n) => CheckedArithmetic (IntN n) Source # 
Instance details

Defined in Data.SBV.Tools.Overflow

Methods

(+!) :: SBV (IntN n) -> SBV (IntN n) -> SBV (IntN n) Source #

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

(*!) :: SBV (IntN n) -> SBV (IntN n) -> SBV (IntN n) Source #

(/!) :: SBV (IntN n) -> SBV (IntN n) -> SBV (IntN n) Source #

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

type MetricSpace (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

type MetricSpace (IntN n) = WordN n

Converting between fixed-size and arbitrary bit-vectors

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

Type family to create the appropriate non-zero constraint

Equations

BVIsNonZero 0 = TypeError BVZeroWidth :: Constraint 
BVIsNonZero _1 = () 

type family FromSized t where ... Source #

Capture the correspondence between sized and fixed-sized BVs

type family ToSized t where ... Source #

Capture the correspondence between fixed-sized and sized BVs

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

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

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

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

Unbounded integers

type SInteger = SBV Integer Source #

Infinite precision signed symbolic value

Floating point numbers

type SFloat = SBV Float Source #

IEEE-754 single-precision floating point numbers

type SDouble = SBV Double Source #

IEEE-754 double-precision floating point numbers

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

A symbolic arbitrary precision floating point value

Algebraic reals

type SReal = SBV AlgReal Source #

Infinite precision symbolic algebraic real value

data AlgReal Source #

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

Instances

Instances details
Arbitrary AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

Data AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

Methods

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

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

toConstr :: AlgReal -> Constr #

dataTypeOf :: AlgReal -> DataType #

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

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

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

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

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

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

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

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

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

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

Enum AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

Floating SReal Source #

SReal Floating instance, used in conjunction with the dReal solver for delta-satisfiability. Note that we do not constant fold these values (except for pi), as Haskell doesn't really have any means of computing them for arbitrary rationals.

Instance details

Defined in Data.SBV.Core.Model

Generic AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

Methods

from :: AlgReal -> Rep AlgReal x #

to :: Rep AlgReal x -> AlgReal #

Num AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

Num SReal Source # 
Instance details

Defined in Data.SBV.Core.Data

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

Real AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

Show AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

NFData AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

Methods

rnf :: AlgReal -> () #

Eq AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

Methods

(==) :: AlgReal -> AlgReal -> Bool #

(/=) :: AlgReal -> AlgReal -> Bool #

Ord AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

Random AlgReal Source #

Random generates a rational, so perhaps not as random as one wants

Instance details

Defined in Data.SBV.Core.AlgReals

Methods

randomR :: RandomGen g => (AlgReal, AlgReal) -> g -> (AlgReal, g) #

random :: RandomGen g => g -> (AlgReal, g) #

randomRs :: RandomGen g => (AlgReal, AlgReal) -> g -> [AlgReal] #

randoms :: RandomGen g => g -> [AlgReal] #

SymVal AlgReal Source # 
Instance details

Defined in Data.SBV.Core.Model

IEEEFloatConvertible AlgReal Source # 
Instance details

Defined in Data.SBV.Core.Floating

HasKind AlgReal Source # 
Instance details

Defined in Data.SBV.Core.Kind

Metric AlgReal Source # 
Instance details

Defined in Data.SBV.Core.Model

Associated Types

type MetricSpace AlgReal 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SReal Source # 
Instance details

Defined in Data.SBV.Core.Model

(TypeError (((((('Text "A termination measure may not have a real-valued result." ':$$: 'Text "") ':$$: 'Text "The reals are not well-ordered: an infinite descending chain such as") ':$$: 'Text "1, 1/2, 1/4, ... has no least element, so a non-negative and strictly") ':$$: 'Text "decreasing real measure does not imply termination.") ':$$: 'Text "") ':$$: 'Text "Use an integer-valued measure instead (e.g. a count of remaining steps).") :: Constraint) => Zero AlgReal Source #

Algebraic reals are not permitted as measures, and we reject them at compile time. The reals are dense, hence not well-ordered: a merely non-negative and strictly-decreasing real measure does not imply termination (e.g. the chain 1, 1/2, 1/4, ... descends forever without reaching a minimum). Use an integer-valued measure instead.

Instance details

Defined in Data.SBV.Core.Model

EnumSymbolic AlgReal Source #

'EnumSymbolic instance for arbitrary AlgReal. We don't have to use the multiplicative trick here since alg-reals are precise. But, following rational in Haskell, we do use the stopping point of z + delta / 2.

Instance details

Defined in Data.SBV.List

SatModel AlgReal Source #

AlgReal as extracted from a model

Instance details

Defined in Data.SBV.SMT.SMT

Methods

parseCVs :: [CV] -> Maybe (AlgReal, [CV]) Source #

cvtModel :: (AlgReal -> Maybe b) -> Maybe (AlgReal, [CV]) -> Maybe (b, [CV]) Source #

type Rep AlgReal Source # 
Instance details

Defined in Data.SBV.Core.AlgReals

type MetricSpace AlgReal Source # 
Instance details

Defined in Data.SBV.Core.Model

sRealToSIntegerFloor :: SReal -> SInteger Source #

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

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

See sRealToSIntegerRM to select the rounding mode with a symbolic SRoundingMode.

sRealToSIntegerCeiling :: SReal -> SInteger Source #

Convert an SReal to an SInteger, ceiling version. That is, it computes the smallest integer n that satisfies r <= sIntegerToSReal n.

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

See sRealToSIntegerRM to select the rounding mode with a symbolic SRoundingMode.

sRealToSIntegerTruncate :: SReal -> SInteger Source #

Convert an SReal to an SInteger, truncating version. Truncate simply chops off the fractional part, essentially rounding towards zero.

For instance, 1.3 will be 1, and -1.3 will be -1.

See sRealToSIntegerRM to select the rounding mode with a symbolic SRoundingMode.

sRealToSIntegerRoundAway :: SReal -> SInteger Source #

Convert an SReal to an SInteger by converting to the nearest integer. If there is a tie (i.e., if the fractional component of the SReal is equal to 0.5), then round away from zero.

For instance:

  • 1.3 will be 1
  • 1.5 will be 2 (because abs 1 < abs 2)
  • 1.7 will be 2
  • 2.3 will be 2
  • 2.5 will be 3 (because abs 2 < abs 3)
  • 2.7 will be 3
  • -1.3 will be -1
  • -1.5 will be -2 (because abs (-1) < abs (-2))
  • -1.7 will be -2
  • -2.3 will be -2
  • -2.5 will be -3 (because abs (-2) < abs (-3))
  • -2.7 will be -3

See sRealToSIntegerRM to select the rounding mode with a symbolic SRoundingMode.

sRealToSIntegerRoundToEven :: SReal -> SInteger Source #

Convert an SReal to an SInteger by converting to the nearest integer. If there is a tie (i.e., if the fractional component of the SReal is equal to 0.5), then round to the nearest even integer.

For instance:

  • 1.3 will be 1
  • 1.5 will be 2 (because 2 is even)
  • 1.7 will be 2
  • 2.3 will be 2
  • 2.5 will be 2 (because 2 is even)
  • 2.7 will be 3
  • -1.3 will be -1
  • -1.5 will be -2 (because -2 is even)
  • -1.7 will be -2
  • -2.3 will be -2
  • -2.5 will be -2 (because -2 is even)
  • -2.7 will be -3

See sRealToSIntegerRM to select the rounding mode with a symbolic SRoundingMode.

sRealToSIntegerRM :: SRoundingMode -> SReal -> SInteger Source #

Convert an SReal to an SInteger according to the supplied SRoundingMode. This dispatches to sRealToSIntegerRoundToEven, sRealToSIntegerRoundAway, sRealToSIntegerCeiling, sRealToSIntegerFloor, and sRealToSIntegerTruncate for the round-nearest-even, round-nearest-away, round-toward-positive, round-toward-negative, and round-toward-zero modes respectively.

Note that we re-use the SRoundingMode type here, even though SRoundingMode is normally associated with floating-point operations. The floating-point resemblance is superficial, as this function does not use any floating-point functionality behind the scenes.

Characters, Strings and Regular Expressions

type SChar = SBV Char Source #

A symbolic character. Note that this is the full unicode character set. see: https://smt-lib.org/theories-UnicodeStrings.shtml for details.

type SString = SBV String Source #

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

Symbolic lists

type SList a = SBV [a] Source #

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

Arrays of symbolic values

readArray :: (SymVal key, SymVal val, HasKind val) => SArray key val -> SBV key -> SBV val Source #

Reading a value from an array.

writeArray :: (HasKind key, SymVal key, SymVal val, HasKind val) => SArray key val -> SBV key -> SBV val -> SArray key val Source #

Writing a value to an array. For the concrete case, we don't bother deleting earlier entries, we keep a history. The earlier a value is in the list, the "later" it happened; in a stack fashion.

type SArray a b = SBV (ArrayModel a b) Source #

Symbolic arrays. A symbolic array is more akin to a function in SMTLib (and thus in SBV), as opposed to contagious-storage with a finite range as found in many programming languages. Additionally, the domain uses object-equality in the SMTLib semantics. Object equality is the same as regular equality for most types, except for IEEE-Floats, where NaN doesn't compare equal to itself and +0 and -0 are not distinguished. So, if your index type is a float, then NaN can be stored correctly, and 0 and -0 will be distinguished. If you don't use floats, then you can treat this the same as regular equality in Haskell.

Creating symbolic values

Single value

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

Generalization of sBool

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

Generalization of sWord8

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

Generalization of sWord16

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

Generalization of sWord32

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

Generalization of sWord64

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

Generalization of sWord

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

Generalization of sInt8

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

Generalization of sInt16

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

Generalization of sInt32

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

Generalization of sInt64

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

Generalization of sInt

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

Generalization of sInteger

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

Generalization of sReal

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

Generalization of sFloat

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

Generalization of sDouble

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

Generalization of sChar

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

Generalization of sString

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

Generalization of sList

sArray :: (SymVal a, SymVal b, MonadSymbolic m) => String -> m (SArray a b) Source #

Generalization of sAray

List of values

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

Generalization of sBools

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

Generalization of sWord8s

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

Generalization of sWord16s

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

Generalization of sWord32s

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

Generalization of sWord64s

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

Generalization of sWord64s

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

Generalization of sInt8s

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

Generalization of sInt16s

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

Generalization of sInt32s

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

Generalization of sInt64s

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

Generalization of sInts

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

Generalization of sIntegers

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

Generalization of sReals

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

Generalization of sFloats

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

Generalization of sDoubles

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

Generalization of sChars

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

Generalization of sStrings

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

Generalization of sLists

sArrays :: (SymVal a, SymVal b, MonadSymbolic m) => [String] -> m [SArray a b] Source #

Generalization of sLists

Symbolic Equality and Comparisons

class EqSymbolic a where Source #

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

NB. Equality is a built-in notion in SMTLib, and is object-equality. While this mostly matches Haskell's notion of equality, the correspondence isn't exact. This mostly shows up in containers with floats inside, such as sequences of floats, sets of doubles, and arrays of doubles. While SBV tries to maintain Haskell semantics, it does resort to container equality for compound types. For instance, for an IEEE-float, -0 == 0. But for an SMTLib sequence, equals is done over objects. i.e., [0] == [-0] in Haskell, but literal [0] ./= literal [-0] when used as SMTLib sequences. The rabbit-hole goes deep here, especially when NaN is involved, which does not compare equal to itself per IEEE-semantics.

If you are not using floats, then you can ignore all this. If you do, then SBV will do the right thing for them when checking equality directly, but not when you use containers with floating-point elements. In the latter case, object-equality will be used.

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

Minimal complete definition

Nothing

Methods

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

Symbolic equality.

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

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

Symbolic inequality.

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

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

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

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

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

distinct :: [a] -> SBool Source #

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

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

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

allEqual :: [a] -> SBool Source #

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

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

Symbolic membership test.

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

Symbolic negated membership test.

Instances

Instances details
EqSymbolic RegExp Source #

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

Instance details

Defined in Data.SBV.Core.Model

EqSymbolic Bool Source # 
Instance details

Defined in Data.SBV.Core.Model

EqSymbolic a => EqSymbolic (NonEmpty a) Source # 
Instance details

Defined in Data.SBV.Core.Model

(HasKind a, SymVal a) => EqSymbolic (SBV a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

EqSymbolic a => EqSymbolic (S a) Source #

Symbolic equality for S.

Instance details

Defined in Documentation.SBV.Examples.ProofTools.BMC

Methods

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

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

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

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

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

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

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

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

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

EqSymbolic a => EqSymbolic (Maybe a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

EqSymbolic a => EqSymbolic [a] Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

(EqSymbolic a, EqSymbolic b) => EqSymbolic (Either a b) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

(EqSymbolic a, EqSymbolic b) => EqSymbolic (a, b) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

(EqSymbolic a, EqSymbolic b, EqSymbolic c) => EqSymbolic (a, b, c) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

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

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

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

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

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

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

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

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

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

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

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

Minimal complete definition

(.<)

Methods

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

Symbolic less than.

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

Symbolic less than or equal to.

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

Symbolic greater than.

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

Symbolic greater than or equal to.

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

Symbolic minimum.

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

Symbolic maximum.

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

Is the value within the allowed inclusive range?

Instances

Instances details
OrdSymbolic SChar Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SDouble Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SFloat Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SInt16 Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SInt32 Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SInt64 Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SInt8 Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SInteger Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SRational Source #

Symbolic ordering for SRational. Note that denominators are always positive.

Instance details

Defined in Data.SBV.Rational

OrdSymbolic SReal Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SWord16 Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SWord32 Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SWord64 Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SWord8 Source # 
Instance details

Defined in Data.SBV.Core.Model

OrdSymbolic SNat Source #

Symbolic ordering. We only define less-than, other methods use the defaults.

Instance details

Defined in Documentation.SBV.Examples.TP.Peano

OrdSymbolic a => OrdSymbolic (NonEmpty a) Source # 
Instance details

Defined in Data.SBV.Core.Model

(OrdSymbolic (SBV a), OrdSymbolic (SBV b), SymVal a, SymVal b) => OrdSymbolic (SBV (Either a b)) Source #

Custom OrdSymbolic instance over SEither.

Instance details

Defined in Data.SBV.Either

Methods

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

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

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

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

smin :: SBV (Either a b) -> SBV (Either a b) -> SBV (Either a b) Source #

smax :: SBV (Either a b) -> SBV (Either a b) -> SBV (Either a b) Source #

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

OrdSymbolic (SBV State) Source # 
Instance details

Defined in Documentation.SBV.Examples.Lists.BoundedMutex

OrdSymbolic (SBV E) Source # 
Instance details

Defined in Documentation.SBV.Examples.Misc.Enumerate

Methods

(.<) :: SBV E -> SBV E -> SBool Source #

(.<=) :: SBV E -> SBV E -> SBool Source #

(.>) :: SBV E -> SBV E -> SBool Source #

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

smin :: SBV E -> SBV E -> SBV E Source #

smax :: SBV E -> SBV E -> SBV E Source #

inRange :: SBV E -> (SBV E, SBV E) -> SBool Source #

OrdSymbolic (SBV E) Source # 
Instance details

Defined in Documentation.SBV.Examples.Misc.FirstOrderLogic

Methods

(.<) :: SBV E -> SBV E -> SBool Source #

(.<=) :: SBV E -> SBV E -> SBool Source #

(.>) :: SBV E -> SBV E -> SBool Source #

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

smin :: SBV E -> SBV E -> SBV E Source #

smax :: SBV E -> SBV E -> SBV E Source #

inRange :: SBV E -> (SBV E, SBV E) -> SBool Source #

OrdSymbolic (SBV Day) Source # 
Instance details

Defined in Documentation.SBV.Examples.Optimization.Enumerate

OrdSymbolic (SBV Day) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Birthday

OrdSymbolic (SBV Month) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Birthday

OrdSymbolic (SBV Action) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.DieHard

OrdSymbolic (SBV Beverage) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

OrdSymbolic (SBV Color) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

OrdSymbolic (SBV Nationality) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

OrdSymbolic (SBV Pet) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

OrdSymbolic (SBV Sport) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Fish

OrdSymbolic (SBV Color) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Garden

OrdSymbolic (SBV Color) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.HexPuzzle

OrdSymbolic (SBV Identity) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves

OrdSymbolic (SBV Statement) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.KnightsAndKnaves

OrdSymbolic (SBV Location) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Murder

OrdSymbolic (SBV Role) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Murder

OrdSymbolic (SBV Sex) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Murder

OrdSymbolic (SBV Handler) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

OrdSymbolic (SBV Location) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

OrdSymbolic (SBV Orangutan) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

OrdSymbolic (SBV Month) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.SquareBirthday

OrdSymbolic (SBV Location) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

OrdSymbolic (SBV U2Member) Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

OrdSymbolic (SBV Day) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

OrdSymbolic (SBV BinOp) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.FourFours

OrdSymbolic (SBV UnOp) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.FourFours

(OrdSymbolic (SBV a), SymVal a) => OrdSymbolic (SBV (Maybe a)) Source #

Custom OrdSymbolic instance over SMaybe.

Instance details

Defined in Data.SBV.Maybe

Methods

(.<) :: SBV (Maybe a) -> SBV (Maybe a) -> SBool Source #

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

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

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

smin :: SBV (Maybe a) -> SBV (Maybe a) -> SBV (Maybe a) Source #

smax :: SBV (Maybe a) -> SBV (Maybe a) -> SBV (Maybe a) Source #

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

(SymVal a, SymVal b) => OrdSymbolic (SBV (a, b)) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

(SymVal a, SymVal b, SymVal c) => OrdSymbolic (SBV (a, b, c)) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d) => OrdSymbolic (SBV (a, b, c, d)) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e) => OrdSymbolic (SBV (a, b, c, d, e)) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f) => OrdSymbolic (SBV (a, b, c, d, e, f)) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g) => OrdSymbolic (SBV (a, b, c, d, e, f, g)) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h) => OrdSymbolic (SBV (a, b, c, d, e, f, g, h)) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

(KnownNat n, BVIsNonZero n) => OrdSymbolic (SInt n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: SInt n -> SInt n -> SBool Source #

(.<=) :: SInt n -> SInt n -> SBool Source #

(.>) :: SInt n -> SInt n -> SBool Source #

(.>=) :: SInt n -> SInt n -> SBool Source #

smin :: SInt n -> SInt n -> SInt n Source #

smax :: SInt n -> SInt n -> SInt n Source #

inRange :: SInt n -> (SInt n, SInt n) -> SBool Source #

SymVal a => OrdSymbolic (SList a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: SList a -> SList a -> SBool Source #

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

(.>) :: SList a -> SList a -> SBool Source #

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

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

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

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

(KnownNat n, BVIsNonZero n) => OrdSymbolic (SWord n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(.<) :: SWord n -> SWord n -> SBool Source #

(.<=) :: SWord n -> SWord n -> SBool Source #

(.>) :: SWord n -> SWord n -> SBool Source #

(.>=) :: SWord n -> SWord n -> SBool Source #

smin :: SWord n -> SWord n -> SWord n Source #

smax :: SWord n -> SWord n -> SWord n Source #

inRange :: SWord n -> (SWord n, SWord n) -> SBool Source #

OrdSymbolic a => OrdSymbolic (Maybe a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

OrdSymbolic a => OrdSymbolic [a] Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

smin :: [a] -> [a] -> [a] Source #

smax :: [a] -> [a] -> [a] Source #

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

(OrdSymbolic a, OrdSymbolic b) => OrdSymbolic (Either a b) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

ValidFloat eb sb => OrdSymbolic (SFloatingPoint eb sb) Source # 
Instance details

Defined in Data.SBV.Core.Model

(OrdSymbolic a, OrdSymbolic b) => OrdSymbolic (a, b) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

(OrdSymbolic a, OrdSymbolic b, OrdSymbolic c) => OrdSymbolic (a, b, c) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

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

Defined in Data.SBV.Core.Model

Methods

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

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

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

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

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

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

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

class OrdSymbolic (SBV a) => Zero a where Source #

A class of values that capture the notion of a zero for measure values. Used in termination checking for recursive SMT functions.

Minimal complete definition

zero

Methods

zero :: SBV a Source #

nonNeg :: SBV a -> SBool Source #

Component-wise non-negativity check. For scalars this is simply >= 0. For tuples, every component must be >= 0, which is stronger than lexicographic >= (0, 0, ..). This is required for well-foundedness of the lexicographic ordering on the non-negative part.

Instances

Instances details
Zero Int16 Source # 
Instance details

Defined in Data.SBV.Core.Model

Zero Int32 Source # 
Instance details

Defined in Data.SBV.Core.Model

Zero Int64 Source # 
Instance details

Defined in Data.SBV.Core.Model

Zero Int8 Source # 
Instance details

Defined in Data.SBV.Core.Model

Zero Word16 Source # 
Instance details

Defined in Data.SBV.Core.Model

Zero Word32 Source # 
Instance details

Defined in Data.SBV.Core.Model

Zero Word64 Source # 
Instance details

Defined in Data.SBV.Core.Model

Zero Word8 Source #

Bounded bit-vectors as measures. These are all sound: each is a finite type, so a non-negative, strictly-decreasing chain of values is necessarily finite. (The default nonNeg x = x .>= 0 works for both the unsigned and signed cases.)

Instance details

Defined in Data.SBV.Core.Model

(TypeError (((((('Text "A termination measure may not have a real-valued result." ':$$: 'Text "") ':$$: 'Text "The reals are not well-ordered: an infinite descending chain such as") ':$$: 'Text "1, 1/2, 1/4, ... has no least element, so a non-negative and strictly") ':$$: 'Text "decreasing real measure does not imply termination.") ':$$: 'Text "") ':$$: 'Text "Use an integer-valued measure instead (e.g. a count of remaining steps).") :: Constraint) => Zero AlgReal Source #

Algebraic reals are not permitted as measures, and we reject them at compile time. The reals are dense, hence not well-ordered: a merely non-negative and strictly-decreasing real measure does not imply termination (e.g. the chain 1, 1/2, 1/4, ... descends forever without reaching a minimum). Use an integer-valued measure instead.

Instance details

Defined in Data.SBV.Core.Model

Zero Integer Source #

An integer as a measure

Instance details

Defined in Data.SBV.Core.Model

Zero Double Source #

A double as a measure

Instance details

Defined in Data.SBV.Core.Model

Zero Float Source #

A float as a measure

Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => Zero (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

zero :: SBV (IntN n) Source #

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

(KnownNat n, BVIsNonZero n) => Zero (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

zero :: SBV (WordN n) Source #

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

ValidFloat eb sb => Zero (FloatingPoint eb sb) Source #

A floating-point as a measure

Instance details

Defined in Data.SBV.Core.Model

Methods

zero :: SBV (FloatingPoint eb sb) Source #

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

Zero (Integer, Integer) Source #

A tuple of integers as a measure

Instance details

Defined in Data.SBV.Core.Model

Zero (Integer, Integer, Integer) Source #

A triple of integers as a measure

Instance details

Defined in Data.SBV.Core.Model

Zero (Integer, Integer, Integer, Integer) Source #

A quadruple of integers as a measure

Instance details

Defined in Data.SBV.Core.Model

Zero (Integer, Integer, Integer, Integer, Integer) Source #

A quintuple of integers as a measure

Instance details

Defined in Data.SBV.Core.Model

type family MeasureOf f r where ... Source #

Type family that maps a function type to its corresponding measure type. The measure function takes the same arguments but returns a different type.

Equations

MeasureOf (SBV a -> r) r' = SBV a -> MeasureOf r r' 
MeasureOf (SBV a) r = SBV r 

class Equality a where Source #

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

Methods

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

Instances

Instances details
(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> SBV g -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> SBV g -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> SBV g -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> SBV f -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> SBV e -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> SBV d -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: (SBV a -> SBV b -> SBV c -> SBV d -> z) -> (SBV a -> SBV b -> SBV c -> SBV d -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, SymVal c, EqSymbolic z) => Equality (SBV a -> SBV b -> SBV c -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: (SBV a -> SBV b -> SBV c -> z) -> (SBV a -> SBV b -> SBV c -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, EqSymbolic z) => Equality (SBV a -> SBV b -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: (SBV a -> SBV b -> z) -> (SBV a -> SBV b -> z) -> IO ThmResult Source #

(SymVal a, EqSymbolic z) => Equality (SBV a -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: (SBV a -> z) -> (SBV a -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, EqSymbolic z) => Equality ((SBV a, SBV b) -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: ((SBV a, SBV b) -> z) -> ((SBV a, SBV b) -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, SymVal c, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c) -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: ((SBV a, SBV b, SBV c) -> z) -> ((SBV a, SBV b, SBV c) -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d) -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: ((SBV a, SBV b, SBV c, SBV d) -> z) -> ((SBV a, SBV b, SBV c, SBV d) -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e) -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> z) -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> z) -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> z) -> IO ThmResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, EqSymbolic z) => Equality ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

(===) :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> z) -> IO ThmResult Source #

Conditionals: Mergeable values

class Mergeable a where Source #

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

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

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

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

Minimal complete definition

Nothing

Methods

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

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

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

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

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

Instances

Instances details
Mergeable Int16 Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Int32 Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Int64 Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Int8 Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Word16 Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Word32 Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Word64 Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Word8 Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Mostek Source # 
Instance details

Defined in Documentation.SBV.Examples.BitPrecise.Legato

Methods

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

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

Mergeable Jug Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Jugs

Methods

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

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

Mergeable Assignment Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.Orangutans

Mergeable Status Source # 
Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

Methods

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

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

Mergeable Integer Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable () Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

symbolicMerge :: Bool -> SBool -> () -> () -> () Source #

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

Mergeable Bool Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Char Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Double Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable Float Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable a => Mergeable (ZipList a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable a => Mergeable (NonEmpty a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

select :: (Ord b, SymVal b, Num b, Num (SBV b), OrdSymbolic (SBV b)) => [NonEmpty a] -> NonEmpty a -> SBV b -> NonEmpty 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, Num (SBV b), OrdSymbolic (SBV b)) => [SBV a] -> SBV a -> SBV b -> SBV a Source #

Mergeable a => Mergeable (Move a) Source #

Mergeable instance for Move simply pushes the merging the data after run of each branch starting from the same state.

Instance details

Defined in Documentation.SBV.Examples.Puzzles.U2Bridge

Methods

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

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

Mergeable a => Mergeable (AppS a) Source # 
Instance details

Defined in Documentation.SBV.Examples.WeakestPreconditions.Append

Methods

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

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

Mergeable a => Mergeable (IncS a) Source # 
Instance details

Defined in Documentation.SBV.Examples.WeakestPreconditions.Basics

Methods

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

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

Mergeable a => Mergeable (FibS a) Source # 
Instance details

Defined in Documentation.SBV.Examples.WeakestPreconditions.Fib

Methods

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

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

Mergeable a => Mergeable (GCDS a) Source # 
Instance details

Defined in Documentation.SBV.Examples.WeakestPreconditions.GCD

Methods

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

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

Mergeable a => Mergeable (DivS a) Source # 
Instance details

Defined in Documentation.SBV.Examples.WeakestPreconditions.IntDiv

Methods

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

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

Mergeable a => Mergeable (SqrtS a) Source # 
Instance details

Defined in Documentation.SBV.Examples.WeakestPreconditions.IntSqrt

Methods

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

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

Mergeable a => Mergeable (SumS a) Source # 
Instance details

Defined in Documentation.SBV.Examples.WeakestPreconditions.Sum

Methods

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

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

Mergeable a => Mergeable (Maybe a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

Mergeable a => Mergeable [a] Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

(Mergeable a, Mergeable b) => Mergeable (Either a b) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

(Ix a, Mergeable b) => Mergeable (Array a b) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

SymVal e => Mergeable (STree i e) Source # 
Instance details

Defined in Data.SBV.Tools.STree

Methods

symbolicMerge :: Bool -> SBool -> STree i e -> STree i e -> STree i e Source #

select :: (Ord b, SymVal b, Num b, Num (SBV b), OrdSymbolic (SBV b)) => [STree i e] -> STree i e -> SBV b -> STree i e Source #

(Mergeable a, Mergeable b) => Mergeable (LenS a b) Source # 
Instance details

Defined in Documentation.SBV.Examples.WeakestPreconditions.Length

Methods

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

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

(Mergeable a, Mergeable b) => Mergeable (a, b) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

symbolicMerge :: Bool -> SBool -> (a, b) -> (a, b) -> (a, b) Source #

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

Mergeable b => Mergeable (a -> b) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

symbolicMerge :: Bool -> SBool -> (a -> b) -> (a -> b) -> a -> b Source #

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

(Mergeable a, Mergeable b, Mergeable c) => Mergeable (a, b, c) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

(Mergeable a, Mergeable b, Mergeable c, Mergeable d) => Mergeable (a, b, c, d) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

(Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e) => Mergeable (a, b, c, d, e) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

select :: (Ord b0, SymVal b0, Num b0, Num (SBV b0), OrdSymbolic (SBV b0)) => [(a, b, c, d, e)] -> (a, b, c, d, e) -> SBV b0 -> (a, b, c, d, e) Source #

(Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e, Mergeable f) => Mergeable (a, b, c, d, e, f) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

select :: (Ord b0, SymVal b0, Num b0, Num (SBV b0), OrdSymbolic (SBV b0)) => [(a, b, c, d, e, f)] -> (a, b, c, d, e, f) -> SBV b0 -> (a, b, c, d, e, f) Source #

(Mergeable a, Mergeable b, Mergeable c, Mergeable d, Mergeable e, Mergeable f, Mergeable g) => Mergeable (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

select :: (Ord b0, SymVal b0, Num b0, Num (SBV b0), OrdSymbolic (SBV b0)) => [(a, b, c, d, e, f, g)] -> (a, b, c, d, e, f, g) -> SBV b0 -> (a, b, c, d, e, f, g) Source #

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

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

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

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

Symbolic integral numbers

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

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

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

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

Instances

Instances details
SIntegral Int16 Source # 
Instance details

Defined in Data.SBV.Core.Model

SIntegral Int32 Source # 
Instance details

Defined in Data.SBV.Core.Model

SIntegral Int64 Source # 
Instance details

Defined in Data.SBV.Core.Model

SIntegral Int8 Source # 
Instance details

Defined in Data.SBV.Core.Model

SIntegral Word16 Source # 
Instance details

Defined in Data.SBV.Core.Model

SIntegral Word32 Source # 
Instance details

Defined in Data.SBV.Core.Model

SIntegral Word64 Source # 
Instance details

Defined in Data.SBV.Core.Model

SIntegral Word8 Source # 
Instance details

Defined in Data.SBV.Core.Model

SIntegral Integer Source # 
Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => SIntegral (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => SIntegral (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Division and Modulus

class SDivisible a where Source #

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

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

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

NB. sQuot truncates toward zero (i.e., it implements truncating division), while sDiv truncates toward negative infinity (i.e., it implements flooring division). These match the conventions of Haskell's quot and div functions, respectively.

Similarly, sRem and sMod match the conventions of Haskell's rem and mod functions, respectively. That is:

     (x sQuot y)*y + (x sRem y) .== x
     (x sDiv  y)*y + (x sMod y) .== x

C code generation of division operations

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

Minimal complete definition

sQuotRem, sDivMod

Methods

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

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

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

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

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

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

Instances

Instances details
SDivisible Int16 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible Int32 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible Int64 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible Int8 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible Word16 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible Word32 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible Word64 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible Word8 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible CV Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

sQuot :: CV -> CV -> CV Source #

sRem :: CV -> CV -> CV Source #

sDiv :: CV -> CV -> CV Source #

sMod :: CV -> CV -> CV Source #

SDivisible SInt16 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible SInt32 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible SInt64 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible SInt8 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible SInteger Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible SWord16 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible SWord32 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible SWord64 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible SWord8 Source # 
Instance details

Defined in Data.SBV.Core.Model

SDivisible Integer Source # 
Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => SDivisible (SInt n) Source #

SDivisible instance for SInt

Instance details

Defined in Data.SBV.Core.Model

Methods

sQuotRem :: SInt n -> SInt n -> (SInt n, SInt n) Source #

sDivMod :: SInt n -> SInt n -> (SInt n, SInt n) Source #

sQuot :: SInt n -> SInt n -> SInt n Source #

sRem :: SInt n -> SInt n -> SInt n Source #

sDiv :: SInt n -> SInt n -> SInt n Source #

sMod :: SInt n -> SInt n -> SInt n Source #

(KnownNat n, BVIsNonZero n) => SDivisible (SWord n) Source #

SDivisible instance for SWord

Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

sQuot :: SWord n -> SWord n -> SWord n Source #

sRem :: SWord n -> SWord n -> SWord n Source #

sDiv :: SWord n -> SWord n -> SWord n Source #

sMod :: SWord n -> SWord n -> SWord n Source #

(KnownNat n, BVIsNonZero n) => SDivisible (IntN n) Source #

SDivisible instance for IntN

Instance details

Defined in Data.SBV.Core.Model

Methods

sQuotRem :: IntN n -> IntN n -> (IntN n, IntN n) Source #

sDivMod :: IntN n -> IntN n -> (IntN n, IntN n) Source #

sQuot :: IntN n -> IntN n -> IntN n Source #

sRem :: IntN n -> IntN n -> IntN n Source #

sDiv :: IntN n -> IntN n -> IntN n Source #

sMod :: IntN n -> IntN n -> IntN n Source #

(KnownNat n, BVIsNonZero n) => SDivisible (WordN n) Source #

SDivisible instance for WordN

Instance details

Defined in Data.SBV.Core.Model

Methods

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

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

sQuot :: WordN n -> WordN n -> WordN n Source #

sRem :: WordN n -> WordN n -> WordN n Source #

sDiv :: WordN n -> WordN n -> WordN n Source #

sMod :: WordN n -> WordN n -> WordN n Source #

Bit-vector operations

Conversions

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

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

Shifts and rotates

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Finite bit-vector operations

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

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

Minimal complete definition

sFiniteBitSize

Methods

sFiniteBitSize :: SBV a -> Int Source #

Bit size.

lsb :: SBV a -> SBool Source #

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

msb :: SBV a -> SBool Source #

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

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

Big-endian blasting of a word into its bits.

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

Little-endian blasting of a word into its bits.

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

Reconstruct from given bits, given in little-endian.

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

Reconstruct from given bits, given in little-endian.

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

Replacement for testBit, returning SBool instead of Bool.

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

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

sPopCount :: SBV a -> SWord8 Source #

Variant of popCount, returning a symbolic value.

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

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

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

Variant of setBitTo when the index is symbolic. If the index it out-of-bounds, then the result is underspecified.

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

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

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

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

sCountLeadingZeros :: SBV a -> SWord8 Source #

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

sCountTrailingZeros :: SBV a -> SWord8 Source #

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

Instances

Instances details
SFiniteBits Int16 Source # 
Instance details

Defined in Data.SBV.Core.Model

SFiniteBits Int32 Source # 
Instance details

Defined in Data.SBV.Core.Model

SFiniteBits Int64 Source # 
Instance details

Defined in Data.SBV.Core.Model

SFiniteBits Int8 Source # 
Instance details

Defined in Data.SBV.Core.Model

SFiniteBits Word16 Source # 
Instance details

Defined in Data.SBV.Core.Model

SFiniteBits Word32 Source # 
Instance details

Defined in Data.SBV.Core.Model

SFiniteBits Word64 Source # 
Instance details

Defined in Data.SBV.Core.Model

SFiniteBits Word8 Source # 
Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => SFiniteBits (IntN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

(KnownNat n, BVIsNonZero n) => SFiniteBits (WordN n) Source # 
Instance details

Defined in Data.SBV.Core.Model

Splitting, joining, and extending bit-vectors

bvExtract Source #

Arguments

:: forall (i :: Nat) (j :: Nat) (n :: Nat) bv proxy. (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat i, KnownNat j, (i + 1) <= n, j <= i, BVIsNonZero ((i - j) + 1)) 
=> proxy i

i: Start position, numbered from n-1 to 0

-> proxy j

j: End position, numbered from n-1 to 0, j <= i must hold

-> SBV (bv n)

Input bit vector of size n

-> SBV (bv ((i - j) + 1))

Output is of size i - j + 1

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

(#) infixr 5 Source #

Arguments

:: forall (n :: Nat) bv (m :: Nat). (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat m, BVIsNonZero m, SymVal (bv m)) 
=> SBV (bv n)

First input, of size n, becomes the left side

-> SBV (bv m)

Second input, of size m, becomes the right side

-> SBV (bv (n + m))

Concatenation, of size n+m

Join two bit-vectors.

zeroExtend Source #

Arguments

:: forall (n :: Nat) (m :: Nat) bv. (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat m, BVIsNonZero m, SymVal (bv m), (n + 1) <= m, SIntegral (bv (m - n)), BVIsNonZero (m - n)) 
=> SBV (bv n)

Input, of size n

-> SBV (bv m)

Output, of size m. n < m must hold

Zero extend a bit-vector.

signExtend Source #

Arguments

:: forall (n :: Nat) (m :: Nat) bv. (KnownNat n, BVIsNonZero n, SymVal (bv n), KnownNat m, BVIsNonZero m, SymVal (bv m), (n + 1) <= m, SFiniteBits (bv n), SIntegral (bv (m - n)), BVIsNonZero (m - n)) 
=> SBV (bv n)

Input, of size n

-> SBV (bv m)

Output, of size m. n < m must hold

Sign extend a bit-vector.

bvDrop Source #

Arguments

:: forall (i :: Nat) (n :: Nat) (m :: Natural) bv proxy. (KnownNat n, BVIsNonZero n, KnownNat i, (i + 1) <= n, ((i + m) - n) <= 0, BVIsNonZero (n - i)) 
=> proxy i

i: Number of bits to drop. i < n must hold.

-> SBV (bv n)

Input, of size n

-> SBV (bv m)

Output, of size m. m = n - i holds.

Drop bits from the top of a bit-vector.

bvTake Source #

Arguments

:: forall (i :: Nat) (n :: Nat) bv proxy. (KnownNat n, BVIsNonZero n, KnownNat i, BVIsNonZero i, i <= n) 
=> proxy i

i: Number of bits to take. 0 < i <= n must hold.

-> SBV (bv n)

Input, of size n

-> SBV (bv i)

Output, of size i

Take bits from the top of a bit-vector.

Exponentiation

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

Symbolic exponentiation using bit blasting and repeated squaring.

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

IEEE-floating point numbers

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

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

Minimal complete definition

Nothing

Methods

fpAbs :: SBV a -> SBV a Source #

Compute the floating point absolute value.

fpNeg :: SBV a -> SBV a Source #

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

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

Add two floating point values, using the given rounding mode

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

Subtract two floating point values, using the given rounding mode

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

Multiply two floating point values, using the given rounding mode

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

Divide two floating point values, using the given rounding mode

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fpIsNormal :: SBV a -> SBool Source #

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

fpIsSubnormal :: SBV a -> SBool Source #

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

fpIsZero :: SBV a -> SBool Source #

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

fpIsInfinite :: SBV a -> SBool Source #

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

fpIsNaN :: SBV a -> SBool Source #

Is the floating-point number a NaN value?

fpIsNegative :: SBV a -> SBool Source #

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

fpIsPositive :: SBV a -> SBool Source #

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

fpIsNegativeZero :: SBV a -> SBool Source #

Is the floating point number -0?

fpIsPositiveZero :: SBV a -> SBool Source #

Is the floating point number +0?

fpIsPoint :: SBV a -> SBool Source #

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

Instances

Instances details
IEEEFloating Double Source #

SDouble instance

Instance details

Defined in Data.SBV.Core.Floating

IEEEFloating Float Source #

SFloat instance

Instance details

Defined in Data.SBV.Core.Floating

ValidFloat eb sb => IEEEFloating (FloatingPoint eb sb) Source # 
Instance details

Defined in Data.SBV.Core.Floating

Methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

data RoundingMode Source #

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

Constructors

RoundNearestTiesToEven

Round to nearest representable floating point value. If precisely at half-way, pick the even number. (In this context, even means the lowest-order bit is zero.)

RoundNearestTiesToAway

Round to nearest representable floating point value. If precisely at half-way, pick the number further away from 0. (That is, for positive values, pick the greater; for negative values, pick the smaller.)

RoundTowardPositive

Round towards positive infinity. (Also known as rounding-up or ceiling.)

RoundTowardNegative

Round towards negative infinity. (Also known as rounding-down or floor.)

RoundTowardZero

Round towards zero. (Also known as truncation.)

Instances

Instances details
Arbitrary RoundingMode Source #

Arbitrary instance for RoundingMode

Instance details

Defined in Data.SBV.Utils.Numeric

Bounded RoundingMode Source # 
Instance details

Defined in Data.SBV.Utils.Numeric

Enum RoundingMode Source # 
Instance details

Defined in Data.SBV.Utils.Numeric

Show RoundingMode Source # 
Instance details

Defined in Data.SBV.Utils.Numeric

SymVal RoundingMode Source # 
Instance details

Defined in Data.SBV.Core.Model

HasKind RoundingMode Source # 
Instance details

Defined in Data.SBV.Core.Kind

SatModel RoundingMode Source #

A rounding mode, extracted from a model. (Default definition suffices)

Instance details

Defined in Data.SBV.SMT.SMT

Methods

parseCVs :: [CV] -> Maybe (RoundingMode, [CV]) Source #

cvtModel :: (RoundingMode -> Maybe b) -> Maybe (RoundingMode, [CV]) -> Maybe (b, [CV]) Source #

type SRoundingMode = SBV RoundingMode Source #

The symbolic variant of RoundingMode

nan :: Floating a => a Source #

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

infinity :: Floating a => a Source #

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

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

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

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

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

Rounding modes

sCaseRoundingMode Source #

Arguments

:: Mergeable r 
=> r

What to return in the sRoundNearestTiesToEven case.

-> r

What to return in the sRoundNearestTiesToAway case.

-> r

What to return in the sRoundTowardPositive case.

-> r

What to return in the sRoundTowardNegative case.

-> r

What to return in the sRoundTowardZero case.

-> SRoundingMode 
-> r 

Case analyzer for the type RoundingMode.

Conversion to/from floats

class SymVal a => IEEEFloatConvertible a where Source #

Conversion to and from floats

Minimal complete definition

Nothing

Methods

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

Convert from an IEEE74 single precision float.

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

Convert to an IEEE-754 Single-precision float.

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

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

Convert from an IEEE74 double precision float.

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

Convert to an IEEE-754 Double-precision float.

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

Convert from an arbitrary floating point.

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

Convert to an arbitrary floating point.

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

Instances

Instances details
IEEEFloatConvertible Int16 Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Int32 Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Int64 Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Int8 Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Word16 Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Word32 Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Word64 Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Word8 Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible AlgReal Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Integer Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Double Source # 
Instance details

Defined in Data.SBV.Core.Floating

IEEEFloatConvertible Float Source # 
Instance details

Defined in Data.SBV.Core.Floating

ValidFloat eb sb => IEEEFloatConvertible (FloatingPoint eb sb) Source # 
Instance details

Defined in Data.SBV.Core.Floating

Bit-pattern conversions

sFloatAsSWord32 :: SFloat -> SWord32 Source #

Convert an SFloat to an SWord32, preserving the bit-correspondence. Note that since the representation for NaNs are not unique, this function will return a symbolic value when given a concrete NaN.

Implementation note: Since there's no corresponding function in SMTLib for conversion to bit-representation due to partiality, we use a translation trick by allocating a new word variable, converting it to float, and requiring it to be equivalent to the input. In code-generation mode, we simply map it to a simple conversion.

sWord32AsSFloat :: SWord32 -> SFloat Source #

Reinterpret the bits in a 32-bit word as a single-precision floating point number

sDoubleAsSWord64 :: SDouble -> SWord64 Source #

Convert an SDouble to an SWord64, preserving the bit-correspondence. Note that since the representation for NaNs are not unique, this function will return a symbolic value when given a concrete NaN.

See the implementation note for sFloatAsSWord32, as it applies here as well.

sWord64AsSDouble :: SWord64 -> SDouble Source #

Reinterpret the bits in a 32-bit word as a single-precision floating point number

sFloatingPointAsSWord :: forall (eb :: Nat) (sb :: Nat). (ValidFloat eb sb, KnownNat (eb + sb), BVIsNonZero (eb + sb)) => SFloatingPoint eb sb -> SWord (eb + sb) Source #

Convert a float to the word containing the corresponding bit pattern

sWordAsSFloatingPoint :: forall (eb :: Natural) (sb :: Natural). (KnownNat (eb + sb), BVIsNonZero (eb + sb), ValidFloat eb sb) => SWord (eb + sb) -> SFloatingPoint eb sb Source #

Convert a word to an arbitrary float, by reinterpreting the bits of the word as the corresponding bits of the float.

Extracting bit patterns from floats

blastSFloat :: SFloat -> (SBool, [SBool], [SBool]) Source #

Extract the sign/exponent/mantissa of a single-precision float. The output will have 8 bits in the second argument for exponent, and 23 in the third for the mantissa.

blastSDouble :: SDouble -> (SBool, [SBool], [SBool]) Source #

Extract the sign/exponent/mantissa of a single-precision float. The output will have 11 bits in the second argument for exponent, and 52 in the third for the mantissa.

blastSFloatingPoint :: forall (eb :: Nat) (sb :: Nat). (ValidFloat eb sb, KnownNat (eb + sb), BVIsNonZero (eb + sb)) => SFloatingPoint eb sb -> (SBool, [SBool], [SBool]) Source #

Extract the sign/exponent/mantissa of an arbitrary precision float. The output will have eb bits in the second argument for exponent, and sb-1 bits in the third for mantissa.

Symbolic types

mkSymbolic :: [Name] -> Q [Dec] Source #

Create a mutually recursive group of ADTs.

class SMTDefinable a where Source #

SMT definable constants and functions, which can also be uninterpreted. This class captures functions that we can generate standalone-code for in the SMT solver. Note that we also allow uninterpreted constants and functions too. An uninterpreted constant is a value that is indexed by its name. The only property the prover assumes -- about these values are that they are equivalent to themselves; i.e., (for functions) they return the same results when applied to same arguments. We support uninterpreted-functions as a general means of black-box'ing operations that are irrelevant for the purposes of the proof; i.e., when the proofs can be performed without any knowledge about the function itself.

Minimal complete definition: sbvDefineValue. However, most instances in practice are already provided by SBV, so end-users should not need to define their own instances.

Minimal complete definition

sbvDefineValueFun, sbvFun2smt, registerFunction

Methods

smtFunctionDef :: String -> Measure a -> a -> a Source #

Generate the code for this value as an SMTLib function, instead of the usual unrolling semantics. This is useful for generating sub-functions in generated SMTLib problem, or handling recursive (and mutually-recursive) definitions that wouldn't terminate in an unrolling symbolic simulation context.

IMPORTANT NOTE The string argument names this function. SBV identifies the function by this name: if you use this function twice (or use it recursively), it will simply assume this name uniquely identifies the function being defined. If two calls to smtFunction (or its variants) use the same name but different bodies, SBV will raise an error at runtime.

Furthermore, if the call to smtFunction happens in the scope of a parameter, you must make sure the string is chosen to keep it unique per parameter value. For instance, if you have:

  bar :: SInteger -> SInteger -> SInteger
  bar k = smtFunction "bar" (x -> x+k)   -- Note the capture of k!

and you call bar 2 and bar 3, SBV will detect that the two bodies differ and raise an error. You should use a concrete argument to make the name unique:

  bar :: String -> SInteger -> SInteger -> SInteger
  bar tag k = smtFunction ("bar_" ++ tag) (x -> x+k)   -- Tag should make the name unique!

Then, make sure you use bar "two" 2 and bar "three" 3 etc. to preserve the invariant.

Additionally, the function argument must not capture any non-constant variables in the context. You can also define higher-order functions, see smtHOFunction for that purpose.

registerFunction :: a -> Symbolic () Source #

Register a function. This function is typically not needed as SBV will register functions used automatically upon first use. However, there are scenarios (in particular query contexts) where the definition isn't used before query-mode starts, and SBV (for historical reasons) requires functions to be known before query-mode starts executing. In such cases, use this function to register them with the system.

uninterpret :: String -> a Source #

Uninterpret a value, i.e., add this value as a completely undefined value/function that the solver is free to instantiate to satisfy other constraints.

Known issues

Usually using an uninterpret function will register itself to the solver, but sometimes the laziness of the evaluation might render this unreliable.

For example, when working with quantifiers and uninterpreted functions with the following code:

runSMTWith z3 $ do
  let f = uninterpret "f" :: SInteger -> SInteger
  query $ do
    constrain $ \(Forall (b :: SInteger)) -> f b .== f b
    checkSat

The solver will complain about the unknown constant f (Int).

A workaround of this is to explicit register them with registerUISMTFunction:

runSMTWith z3 $ do
  let f = uninterpret "f" :: SInteger -> SInteger
  registerUISMTFunction f
  query $ do
    constrain $ \(Forall (b :: SInteger)) -> f b .== f b
    checkSat

See https://github.com/LeventErkok/sbv/issues/711 for more info.

uninterpretWithArgs :: String -> [String] -> a Source #

Uninterpret a value, with named arguments in case of functions. SBV will use these names when it shows the values for the arguments. If the given names are more than needed we ignore the excess. If not enough, we add from a stock set of variables.

cgUninterpret :: String -> [String] -> a -> a Source #

Uninterpret a value, only for the purposes of code-generation. For execution and verification the value is used as is. For code-generation, the alternate definition is used. This is useful when we want to take advantage of native libraries on the target languages.

sbvDefineValue :: UIName -> Maybe [String] -> UIKind a -> a Source #

More generalized form of uninterpretation that wraps sbvDefineValueFun; this function should not be needed by end-user-code

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> a) -> SBVs as -> a Source #

The most generalized form of uninterpretation, that generates an uninterpreted function over a sequence of SBVs values; this function is internal-only, and should not be needed by end-user-code

sym :: String -> a Source #

A synonym for uninterpret. Allows us to create variables without having to call free explicitly, i.e., without being in the symbolic monad.

symWithKind :: String -> a Source #

Like sym, but appends the type's kind to the name, ensuring uniqueness across different type instantiations of the same polymorphic definition. Used internally by sCase.

sbv2smt :: ExtractIO m => a -> m String Source #

Render an uninterpreted value as an SMTLib definition

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> a) -> m String Source #

Render an uninterpreted value function as an SMTLib definition

mkADTConstructor :: String -> a Source #

Make this name a constructor, coming from an ADT. Only used internally

mkADTTester :: String -> a Source #

mkADTAccessor :: String -> a Source #

Instances

Instances details
SymVal a => SMTDefinable (SBV a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunctionDef :: String -> Measure (SBV a) -> SBV a -> SBV a Source #

registerFunction :: SBV a -> Symbolic () Source #

uninterpret :: String -> SBV a Source #

uninterpretWithArgs :: String -> [String] -> SBV a Source #

cgUninterpret :: String -> [String] -> SBV a -> SBV a Source #

sbvDefineValue :: UIName -> Maybe [String] -> UIKind (SBV a) -> SBV a Source #

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> SBV a) -> SBVs as -> SBV a Source #

sym :: String -> SBV a Source #

symWithKind :: String -> SBV a Source #

sbv2smt :: ExtractIO m => SBV a -> m String Source #

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> SBV a) -> m String Source #

mkADTConstructor :: String -> SBV a Source #

mkADTTester :: String -> SBV a Source #

mkADTAccessor :: String -> SBV a Source #

(SymVal a, SMTDefinable b) => SMTDefinable (SBV a -> b) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunctionDef :: String -> Measure (SBV a -> b) -> (SBV a -> b) -> SBV a -> b Source #

registerFunction :: (SBV a -> b) -> Symbolic () Source #

uninterpret :: String -> SBV a -> b Source #

uninterpretWithArgs :: String -> [String] -> SBV a -> b Source #

cgUninterpret :: String -> [String] -> (SBV a -> b) -> SBV a -> b Source #

sbvDefineValue :: UIName -> Maybe [String] -> UIKind (SBV a -> b) -> SBV a -> b Source #

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> SBV a -> b) -> SBVs as -> SBV a -> b Source #

sym :: String -> SBV a -> b Source #

symWithKind :: String -> SBV a -> b Source #

sbv2smt :: ExtractIO m => (SBV a -> b) -> m String Source #

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> SBV a -> b) -> m String Source #

mkADTConstructor :: String -> SBV a -> b Source #

mkADTTester :: String -> SBV a -> b Source #

mkADTAccessor :: String -> SBV a -> b Source #

(SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV k, SBV j, SBV i, 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

smtFunctionDef :: String -> Measure ((SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> ((SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpretWithArgs :: String -> [String] -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: UIName -> Maybe [String] -> UIKind ((SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbv2smt :: ExtractIO m => ((SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: String -> (SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV l, SBV k, SBV j, SBV i, 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

smtFunctionDef :: String -> Measure ((SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> ((SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpretWithArgs :: String -> [String] -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: UIName -> Maybe [String] -> UIKind ((SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbv2smt :: ExtractIO m => ((SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: String -> (SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal m, SymVal l, SymVal k, SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV m, SBV l, SBV k, SBV j, SBV i, 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

smtFunctionDef :: String -> Measure ((SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> ((SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpretWithArgs :: String -> [String] -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: UIName -> Maybe [String] -> UIKind ((SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbv2smt :: ExtractIO m0 => ((SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m0 String Source #

sbvFun2smt :: forall (as :: RList Type) m0. (SymVals as, ExtractIO m0) => (SBVs as -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m0 String Source #

mkADTConstructor :: String -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: String -> (SBV m, SBV l, SBV k, SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV c, SBV b) -> SBV a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunctionDef :: String -> Measure ((SBV c, SBV b) -> SBV a) -> ((SBV c, SBV b) -> SBV a) -> (SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV c, SBV b) -> SBV a Source #

uninterpretWithArgs :: String -> [String] -> (SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV c, SBV b) -> SBV a) -> (SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: UIName -> Maybe [String] -> UIKind ((SBV c, SBV b) -> SBV a) -> (SBV c, SBV b) -> SBV a Source #

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV c, SBV b) -> SBV a Source #

sbv2smt :: ExtractIO m => ((SBV c, SBV b) -> SBV a) -> m String Source #

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: String -> (SBV c, SBV b) -> SBV a Source #

(SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV d, SBV c, SBV b) -> SBV a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunctionDef :: String -> Measure ((SBV d, SBV c, SBV b) -> SBV a) -> ((SBV d, SBV c, SBV b) -> SBV a) -> (SBV d, SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

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

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

sbvDefineValue :: UIName -> Maybe [String] -> UIKind ((SBV d, SBV c, SBV b) -> SBV a) -> (SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

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

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: String -> (SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunctionDef :: String -> Measure ((SBV e, SBV d, SBV c, SBV b) -> SBV a) -> ((SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV e, SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

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

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

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

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV e, SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

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

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: String -> (SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunctionDef :: String -> Measure ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> ((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 #

registerFunction :: ((SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

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

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

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

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

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

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: 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, SymVal a, HasKind a) => SMTDefinable ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunctionDef :: String -> Measure ((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) -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

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

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

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

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

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

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: 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, SymVal a, HasKind a) => SMTDefinable ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) Source # 
Instance details

Defined in Data.SBV.Core.Model

Methods

smtFunctionDef :: String -> Measure ((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) -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

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

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

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

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

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

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: String -> (SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV i, 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

smtFunctionDef :: String -> Measure ((SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> ((SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpretWithArgs :: String -> [String] -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: UIName -> Maybe [String] -> UIKind ((SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

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

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: String -> (SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

(SymVal j, SymVal i, SymVal h, SymVal g, SymVal f, SymVal e, SymVal d, SymVal c, SymVal b, SymVal a, HasKind a) => SMTDefinable ((SBV j, SBV i, 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

smtFunctionDef :: String -> Measure ((SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> ((SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

registerFunction :: ((SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> Symbolic () Source #

uninterpret :: String -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

uninterpretWithArgs :: String -> [String] -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

cgUninterpret :: String -> [String] -> ((SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValue :: UIName -> Maybe [String] -> UIKind ((SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbvDefineValueFun :: forall (as :: RList Type). UIName -> Maybe [String] -> SymValInsts as -> UIKind (SBVs as -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> SBVs as -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sym :: String -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

symWithKind :: String -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

sbv2smt :: ExtractIO m => ((SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

sbvFun2smt :: forall (as :: RList Type) m. (SymVals as, ExtractIO m) => (SBVs as -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a) -> m String Source #

mkADTConstructor :: String -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTTester :: String -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

mkADTAccessor :: String -> (SBV j, SBV i, SBV h, SBV g, SBV f, SBV e, SBV d, SBV c, SBV b) -> SBV a Source #

smtFunction :: (SMTDefinable a, Typeable a, Lambda Symbolic a) => String -> a -> a Source #

Define an SMT function. If the function is recursive, SBV will automatically try to prove termination by guessing a measure based on argument types. If the guess fails, use smtFunctionWithMeasure to provide an explicit measure.

smtFunctionWithMeasure :: (SMTDefinable f, Typeable f, Lambda Symbolic f, Zero r, OrdSymbolic (SBV r), SymVal r, ApplyMeasure f r) => String -> (MeasureOf f r, [MeasureHelper]) -> f -> f Source #

Define an SMT function with an explicit termination measure. Use this when smtFunction cannot automatically determine a suitable measure. The measure function takes the same arguments as the original function but returns a value that must be non-negative and strictly decrease at each recursive call.

The pair (measure, helpers) provides the measure function and a list of auxiliary MeasureHelper properties needed to verify the measure. Each helper is first proven (by running its TP proof), then asserted as an axiom in the measure verification session. Use measureLemma to create helpers from TP proofs. Pass [] when no helpers are needed.

Properties, proofs, and satisfiability

type Predicate = Symbolic SBool Source #

A predicate is a symbolic program that returns a (symbolic) boolean value. For all intents and purposes, it can be treated as an n-ary function from symbolic-values to a boolean. The Symbolic monad captures the underlying representation, and can/should be ignored by the users of the library, unless you are building further utilities on top of SBV itself. Instead, simply use the Predicate type when necessary.

type ConstraintSet = Symbolic () Source #

A constraint set is a symbolic program that returns no values. The idea is that the constraints/min-max goals will serve as the collection of constraints that will be used for sat/optimize calls.

class ExtractIO m => ProvableM (m :: Type -> Type) a where Source #

A type a is provable if we can turn it into a predicate, i.e., it has to return a boolean. This class captures essentially prove calls.

Minimal complete definition

proofArgReduce

Methods

proofArgReduce :: a -> SymbolicT m SBool Source #

Reduce an arg, for proof purposes.

prove :: a -> m ThmResult Source #

Generalization of prove

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

Generalization of proveWith

dprove :: a -> m ThmResult Source #

Generalization of dprove

dproveWith :: SMTConfig -> a -> m ThmResult Source #

Generalization of dproveWith

isVacuousProof :: a -> m Bool Source #

Generalization of isVacuousProof

isVacuousProofWith :: SMTConfig -> a -> m Bool Source #

Generalization of isVacuousProofWith

isTheorem :: a -> m Bool Source #

Generalization of isTheorem

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

Generalization of isTheoremWith

Instances

Instances details
ExtractIO m => ProvableM m SBool Source # 
Instance details

Defined in Data.SBV.Provers.Prover

ExtractIO m => ProvableM m (SymbolicT m SBool) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

(ExtractIO m, ProvableM m a) => ProvableM m (SymbolicT m a) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

(ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (Exists nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (Exists nm a -> r) -> SymbolicT m SBool Source #

prove :: (Exists nm a -> r) -> m ThmResult Source #

proveWith :: SMTConfig -> (Exists nm a -> r) -> m ThmResult Source #

dprove :: (Exists nm a -> r) -> m ThmResult Source #

dproveWith :: SMTConfig -> (Exists nm a -> r) -> m ThmResult Source #

isVacuousProof :: (Exists nm a -> r) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (Exists nm a -> r) -> m Bool Source #

isTheorem :: (Exists nm a -> r) -> m Bool Source #

isTheoremWith :: SMTConfig -> (Exists nm a -> r) -> m Bool Source #

(KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (ExistsN n nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (ExistsN n nm a -> r) -> SymbolicT m SBool Source #

prove :: (ExistsN n nm a -> r) -> m ThmResult Source #

proveWith :: SMTConfig -> (ExistsN n nm a -> r) -> m ThmResult Source #

dprove :: (ExistsN n nm a -> r) -> m ThmResult Source #

dproveWith :: SMTConfig -> (ExistsN n nm a -> r) -> m ThmResult Source #

isVacuousProof :: (ExistsN n nm a -> r) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (ExistsN n nm a -> r) -> m Bool Source #

isTheorem :: (ExistsN n nm a -> r) -> m Bool Source #

isTheoremWith :: SMTConfig -> (ExistsN n nm a -> r) -> m Bool Source #

(ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r, EqSymbolic (SBV a)) => ProvableM m (ExistsUnique nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

(ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (Forall nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (Forall nm a -> r) -> SymbolicT m SBool Source #

prove :: (Forall nm a -> r) -> m ThmResult Source #

proveWith :: SMTConfig -> (Forall nm a -> r) -> m ThmResult Source #

dprove :: (Forall nm a -> r) -> m ThmResult Source #

dproveWith :: SMTConfig -> (Forall nm a -> r) -> m ThmResult Source #

isVacuousProof :: (Forall nm a -> r) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (Forall nm a -> r) -> m Bool Source #

isTheorem :: (Forall nm a -> r) -> m Bool Source #

isTheoremWith :: SMTConfig -> (Forall nm a -> r) -> m Bool Source #

(KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, ProvableM m r) => ProvableM m (ForallN n nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (ForallN n nm a -> r) -> SymbolicT m SBool Source #

prove :: (ForallN n nm a -> r) -> m ThmResult Source #

proveWith :: SMTConfig -> (ForallN n nm a -> r) -> m ThmResult Source #

dprove :: (ForallN n nm a -> r) -> m ThmResult Source #

dproveWith :: SMTConfig -> (ForallN n nm a -> r) -> m ThmResult Source #

isVacuousProof :: (ForallN n nm a -> r) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (ForallN n nm a -> r) -> m Bool Source #

isTheorem :: (ForallN n nm a -> r) -> m Bool Source #

isTheoremWith :: SMTConfig -> (ForallN n nm a -> r) -> m Bool Source #

(SymVal a, ProvableM m p) => ProvableM m (SBV a -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

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

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

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

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

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

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

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

(SymVals as, ProvableM m p) => ProvableM m (SBVs as -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: (SBVs as -> p) -> SymbolicT m SBool Source #

prove :: (SBVs as -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> (SBVs as -> p) -> m ThmResult Source #

dprove :: (SBVs as -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> (SBVs as -> p) -> m ThmResult Source #

isVacuousProof :: (SBVs as -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> (SBVs as -> p) -> m Bool Source #

isTheorem :: (SBVs as -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> (SBVs as -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, SymVal i, SymVal j, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, SymVal i, SymVal j, SymVal k, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m Bool Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, SymVal i, SymVal j, SymVal k, SymVal l, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

proofArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> SymbolicT m SBool Source #

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m ThmResult Source #

isVacuousProof :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m Bool Source #

isVacuousProofWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m Bool Source #

isTheorem :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m Bool Source #

isTheoremWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m Bool Source #

(SymVal a, SymVal b, ProvableM m p) => ProvableM m ((SBV a, SBV b) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

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

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

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

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

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

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

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

(SymVal a, SymVal b, SymVal c, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

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

dprove :: ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m ThmResult Source #

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

prove :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m ThmResult Source #

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

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

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m ThmResult Source #

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

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

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m ThmResult Source #

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

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

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m ThmResult Source #

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m ThmResult Source #

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, SymVal i, ProvableM m p) => ProvableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

prove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m ThmResult Source #

proveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m ThmResult Source #

dprove :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m ThmResult Source #

dproveWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m ThmResult Source #

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

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

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

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

type Provable = ProvableM IO Source #

Provable is specialization of ProvableM to the IO monad. Unless you are using transformers explicitly, this is the type you should prefer.

class ExtractIO m => SatisfiableM (m :: Type -> Type) a where Source #

A type a is satisfiable if it has constraints, potentially returning a boolean. This class captures essentially sat and optimize calls.

Minimal complete definition

satArgReduce

Methods

satArgReduce :: a -> SymbolicT m SBool Source #

Reduce an arg, for sat purposes.

sat :: a -> m SatResult Source #

Generalization of sat

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

Generalization of satWith

dsat :: a -> m SatResult Source #

Generalization of sat

dsatWith :: SMTConfig -> a -> m SatResult Source #

Generalization of satWith

allSat :: a -> m AllSatResult Source #

Generalization of allSat

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

Generalization of allSatWith

isSatisfiable :: a -> m Bool Source #

Generalization of isSatisfiable

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

Generalization of isSatisfiableWith

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

Generalization of optimize

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

Generalization of optimizeWith

Instances

Instances details
ExtractIO m => SatisfiableM m SBool Source # 
Instance details

Defined in Data.SBV.Provers.Prover

ExtractIO m => SatisfiableM m (SymbolicT m SBool) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

ExtractIO m => SatisfiableM m (SymbolicT m ()) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

(ExtractIO m, SatisfiableM m a) => SatisfiableM m (SymbolicT m a) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

(ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (Exists nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (Exists nm a -> r) -> SymbolicT m SBool Source #

sat :: (Exists nm a -> r) -> m SatResult Source #

satWith :: SMTConfig -> (Exists nm a -> r) -> m SatResult Source #

dsat :: (Exists nm a -> r) -> m SatResult Source #

dsatWith :: SMTConfig -> (Exists nm a -> r) -> m SatResult Source #

allSat :: (Exists nm a -> r) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (Exists nm a -> r) -> m AllSatResult Source #

isSatisfiable :: (Exists nm a -> r) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (Exists nm a -> r) -> m Bool Source #

optimize :: OptimizeStyle -> (Exists nm a -> r) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (Exists nm a -> r) -> m OptimizeResult Source #

(KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (ExistsN n nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (ExistsN n nm a -> r) -> SymbolicT m SBool Source #

sat :: (ExistsN n nm a -> r) -> m SatResult Source #

satWith :: SMTConfig -> (ExistsN n nm a -> r) -> m SatResult Source #

dsat :: (ExistsN n nm a -> r) -> m SatResult Source #

dsatWith :: SMTConfig -> (ExistsN n nm a -> r) -> m SatResult Source #

allSat :: (ExistsN n nm a -> r) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (ExistsN n nm a -> r) -> m AllSatResult Source #

isSatisfiable :: (ExistsN n nm a -> r) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (ExistsN n nm a -> r) -> m Bool Source #

optimize :: OptimizeStyle -> (ExistsN n nm a -> r) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (ExistsN n nm a -> r) -> m OptimizeResult Source #

(ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r, EqSymbolic (SBV a)) => SatisfiableM m (ExistsUnique nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

(ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (Forall nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (Forall nm a -> r) -> SymbolicT m SBool Source #

sat :: (Forall nm a -> r) -> m SatResult Source #

satWith :: SMTConfig -> (Forall nm a -> r) -> m SatResult Source #

dsat :: (Forall nm a -> r) -> m SatResult Source #

dsatWith :: SMTConfig -> (Forall nm a -> r) -> m SatResult Source #

allSat :: (Forall nm a -> r) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (Forall nm a -> r) -> m AllSatResult Source #

isSatisfiable :: (Forall nm a -> r) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (Forall nm a -> r) -> m Bool Source #

optimize :: OptimizeStyle -> (Forall nm a -> r) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (Forall nm a -> r) -> m OptimizeResult Source #

(KnownNat n, ExtractIO m, SymVal a, Constraint Symbolic r, SatisfiableM m r) => SatisfiableM m (ForallN n nm a -> r) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (ForallN n nm a -> r) -> SymbolicT m SBool Source #

sat :: (ForallN n nm a -> r) -> m SatResult Source #

satWith :: SMTConfig -> (ForallN n nm a -> r) -> m SatResult Source #

dsat :: (ForallN n nm a -> r) -> m SatResult Source #

dsatWith :: SMTConfig -> (ForallN n nm a -> r) -> m SatResult Source #

allSat :: (ForallN n nm a -> r) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (ForallN n nm a -> r) -> m AllSatResult Source #

isSatisfiable :: (ForallN n nm a -> r) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (ForallN n nm a -> r) -> m Bool Source #

optimize :: OptimizeStyle -> (ForallN n nm a -> r) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (ForallN n nm a -> r) -> m OptimizeResult Source #

(SymVal a, SatisfiableM m p) => SatisfiableM m (SBV a -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

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

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

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

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

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

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

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

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

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

(SymVals as, SatisfiableM m p) => SatisfiableM m (SBVs as -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: (SBVs as -> p) -> SymbolicT m SBool Source #

sat :: (SBVs as -> p) -> m SatResult Source #

satWith :: SMTConfig -> (SBVs as -> p) -> m SatResult Source #

dsat :: (SBVs as -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> (SBVs as -> p) -> m SatResult Source #

allSat :: (SBVs as -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> (SBVs as -> p) -> m AllSatResult Source #

isSatisfiable :: (SBVs as -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> (SBVs as -> p) -> m Bool Source #

optimize :: OptimizeStyle -> (SBVs as -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> (SBVs as -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, SymVal i, SymVal j, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, SymVal i, SymVal j, SymVal k, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, SymVal i, SymVal j, SymVal k, SymVal l, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

satArgReduce :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> SymbolicT m SBool Source #

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m AllSatResult Source #

isSatisfiable :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m Bool Source #

isSatisfiableWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m Bool Source #

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i, SBV j, SBV k, SBV l) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

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

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

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

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

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

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

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

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

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

(SymVal a, SymVal b, SymVal c, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

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

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

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

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

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

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

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

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m AllSatResult Source #

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

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

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m SatResult Source #

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

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m AllSatResult Source #

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

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

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m SatResult Source #

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

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m AllSatResult Source #

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

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

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

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

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

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

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

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

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m SatResult Source #

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

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m AllSatResult Source #

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

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

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m AllSatResult Source #

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

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

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h) -> p) -> m OptimizeResult Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SymVal h, SymVal i, SatisfiableM m p) => SatisfiableM m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

sat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m SatResult Source #

satWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m SatResult Source #

dsat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m SatResult Source #

dsatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m SatResult Source #

allSat :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m AllSatResult Source #

allSatWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m AllSatResult Source #

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

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

optimize :: OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m OptimizeResult Source #

optimizeWith :: SMTConfig -> OptimizeStyle -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g, SBV h, SBV i) -> p) -> m OptimizeResult Source #

type Satisfiable = SatisfiableM IO Source #

Satisfiable is specialization of SatisfiableM to the IO monad. Unless you are using transformers explicitly, this is the type you should prefer.

generateSMTBenchmarkSat :: SatisfiableM m a => a -> m String Source #

Create an SMT-Lib2 benchmark, for a SAT query.

generateSMTBenchmarkProof :: ProvableM m a => a -> m String Source #

Create an SMT-Lib2 benchmark, for a Proof query.

solve :: MonadSymbolic m => [SBool] -> m SBool Source #

Generalization of solve

Constraints

General constraints

constrain :: (SolverContext m, QuantifiedBool a) => a -> m () Source #

Add a constraint, any satisfying instance must satisfy this condition.

softConstrain :: (SolverContext m, QuantifiedBool a) => a -> m () Source #

Add a soft constraint. The solver will try to satisfy this condition if possible, but won't if it cannot.

Constraint Vacuity

Named constraints and attributes

namedConstraint :: (SolverContext m, QuantifiedBool a) => String -> a -> m () Source #

Add a named constraint. The name is used in unsat-core extraction.

constrainWithAttribute :: (SolverContext m, QuantifiedBool a) => [(String, String)] -> a -> m () Source #

Add a constraint, with arbitrary attributes.

Unsat cores

Cardinality constraints

pbAtMost :: [SBool] -> Int -> SBool Source #

sTrue if at most k of the input arguments are sTrue

pbAtLeast :: [SBool] -> Int -> SBool Source #

sTrue if at least k of the input arguments are sTrue

pbExactly :: [SBool] -> Int -> SBool Source #

sTrue if exactly k of the input arguments are sTrue

pbLe :: [(Int, SBool)] -> Int -> SBool Source #

sTrue if the sum of coefficients for sTrue elements is at most k. Generalizes pbAtMost.

pbGe :: [(Int, SBool)] -> Int -> SBool Source #

sTrue if the sum of coefficients for sTrue elements is at least k. Generalizes pbAtLeast.

pbEq :: [(Int, SBool)] -> Int -> SBool Source #

sTrue if the sum of coefficients for sTrue elements is exactly least k. Useful for coding exactly K-of-N constraints, and in particular mutex constraints.

pbMutexed :: [SBool] -> SBool Source #

sTrue if there is at most one set bit

pbStronglyMutexed :: [SBool] -> SBool Source #

sTrue if there is exactly one set bit

Checking safety

sAssert :: HasKind a => Maybe CallStack -> String -> SBool -> SBV a -> SBV a Source #

Symbolic assert. Check that the given boolean condition is always sTrue in the given path. The optional first argument can be used to provide call-stack info via GHC's location facilities.

isSafe :: SafeResult -> Bool Source #

Check if a safe-call was safe or not, turning a SafeResult to a Bool.

class ExtractIO m => SExecutable (m :: Type -> Type) a where Source #

Symbolically executable program fragments. This class is mainly used for safe calls, and is sufficiently populated internally to cover most use cases. Users can extend it as they wish to allow safe checks for SBV programs that return/take types that are user-defined.

Minimal complete definition

sName

Methods

sName :: a -> SymbolicT m () Source #

Generalization of sName

safe :: a -> m [SafeResult] Source #

Generalization of safe

safeWith :: SMTConfig -> a -> m [SafeResult] Source #

Generalization of safeWith

Instances

Instances details
ExtractIO m => SExecutable m () Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

sName :: () -> SymbolicT m () Source #

safe :: () -> m [SafeResult] Source #

safeWith :: SMTConfig -> () -> m [SafeResult] Source #

ExtractIO m => SExecutable m (SBV a) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

sName :: SBV a -> SymbolicT m () Source #

safe :: SBV a -> m [SafeResult] Source #

safeWith :: SMTConfig -> SBV a -> m [SafeResult] Source #

ExtractIO m => SExecutable m [SBV a] Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

sName :: [SBV a] -> SymbolicT m () Source #

safe :: [SBV a] -> m [SafeResult] Source #

safeWith :: SMTConfig -> [SBV a] -> m [SafeResult] Source #

(ExtractIO m, NFData a) => SExecutable m (SymbolicT m a) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b) => SExecutable m (SBV a, SBV b) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

sName :: (SBV a, SBV b) -> SymbolicT m () Source #

safe :: (SBV a, SBV b) -> m [SafeResult] Source #

safeWith :: SMTConfig -> (SBV a, SBV b) -> m [SafeResult] Source #

(SymVal a, SExecutable m p) => SExecutable m (SBV a -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

safe :: (SBV a -> p) -> m [SafeResult] Source #

safeWith :: SMTConfig -> (SBV a -> p) -> m [SafeResult] Source #

(SymVal a, SymVal b, SExecutable m p) => SExecutable m ((SBV a, SBV b) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

safe :: ((SBV a, SBV b) -> p) -> m [SafeResult] Source #

safeWith :: SMTConfig -> ((SBV a, SBV b) -> p) -> m [SafeResult] Source #

(SymVal a, SymVal b, SymVal c, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

safe :: ((SBV a, SBV b, SBV c) -> p) -> m [SafeResult] Source #

safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c) -> p) -> m [SafeResult] Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

safe :: ((SBV a, SBV b, SBV c, SBV d) -> p) -> m [SafeResult] Source #

safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d) -> p) -> m [SafeResult] Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

safe :: ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m [SafeResult] Source #

safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e) -> p) -> m [SafeResult] Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

safe :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m [SafeResult] Source #

safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) -> p) -> m [SafeResult] Source #

(SymVal a, SymVal b, SymVal c, SymVal d, SymVal e, SymVal f, SymVal g, SExecutable m p) => SExecutable m ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

safe :: ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m [SafeResult] Source #

safeWith :: SMTConfig -> ((SBV a, SBV b, SBV c, SBV d, SBV e, SBV f, SBV g) -> p) -> m [SafeResult] Source #

(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c) => SExecutable m (SBV a, SBV b, SBV c) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

sName :: (SBV a, SBV b, SBV c) -> SymbolicT m () Source #

safe :: (SBV a, SBV b, SBV c) -> m [SafeResult] Source #

safeWith :: SMTConfig -> (SBV a, SBV b, SBV c) -> m [SafeResult] Source #

(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d) => SExecutable m (SBV a, SBV b, SBV c, SBV d) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

sName :: (SBV a, SBV b, SBV c, SBV d) -> SymbolicT m () Source #

safe :: (SBV a, SBV b, SBV c, SBV d) -> m [SafeResult] Source #

safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d) -> m [SafeResult] Source #

(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

safe :: (SBV a, SBV b, SBV c, SBV d, SBV e) -> m [SafeResult] Source #

safeWith :: SMTConfig -> (SBV a, SBV b, SBV c, SBV d, SBV e) -> m [SafeResult] Source #

(ExtractIO m, NFData a, SymVal a, NFData b, SymVal b, NFData c, SymVal c, NFData d, SymVal d, NFData e, SymVal e, NFData f, SymVal f) => SExecutable m (SBV a, SBV b, SBV c, SBV d, SBV e, SBV f) Source # 
Instance details

Defined in Data.SBV.Provers.Prover

Methods

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

safe :: (SBV a,