grisette-0.2.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2021-2023
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Grisette.IR.SymPrim

Description

 
Synopsis

Symbolic type implementation

Extended types

data IntN (n :: Nat) Source #

Symbolic signed bit vectors.

Instances

Instances details
SizedBV IntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

sizedBVConcat :: forall (l :: Nat) (r :: Nat). (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => IntN l -> IntN r -> IntN (l + r) Source #

sizedBVZext :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> IntN l -> IntN r Source #

sizedBVSext :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> IntN l -> IntN r Source #

sizedBVExt :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> IntN l -> IntN r Source #

sizedBVSelect :: forall (n :: Nat) (ix :: Nat) (w :: Nat) proxy. (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => proxy ix -> proxy w -> IntN n -> IntN w Source #

(KnownNat n, 1 <= n) => SafeDivision ArithException (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SafeArith

Methods

safeDiv :: (MonadError ArithException uf, MonadUnion uf) => IntN n -> IntN n -> uf (IntN n) Source #

safeMod :: (MonadError ArithException uf, MonadUnion uf) => IntN n -> IntN n -> uf (IntN n) Source #

safeDivMod :: (MonadError ArithException uf, MonadUnion uf) => IntN n -> IntN n -> uf (IntN n, IntN n) Source #

safeQuot :: (MonadError ArithException uf, MonadUnion uf) => IntN n -> IntN n -> uf (IntN n) Source #

safeRem :: (MonadError ArithException uf, MonadUnion uf) => IntN n -> IntN n -> uf (IntN n) Source #

safeQuotRem :: (MonadError ArithException uf, MonadUnion uf) => IntN n -> IntN n -> uf (IntN n, IntN n) Source #

safeDiv' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> IntN n -> IntN n -> uf (IntN n) Source #

safeMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> IntN n -> IntN n -> uf (IntN n) Source #

safeDivMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> IntN n -> IntN n -> uf (IntN n, IntN n) Source #

safeQuot' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> IntN n -> IntN n -> uf (IntN n) Source #

safeRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> IntN n -> IntN n -> uf (IntN n) Source #

safeQuotRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> IntN n -> IntN n -> uf (IntN n, IntN n) Source #

(KnownNat n, 1 <= n) => SafeLinearArith ArithException (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SafeArith

Methods

safeAdd :: (MonadError ArithException uf, MonadUnion uf) => IntN n -> IntN n -> uf (IntN n) Source #

safeNeg :: (MonadError ArithException uf, MonadUnion uf) => IntN n -> uf (IntN n) Source #

safeMinus :: (MonadError ArithException uf, MonadUnion uf) => IntN n -> IntN n -> uf (IntN n) Source #

safeAdd' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> IntN n -> IntN n -> uf (IntN n) Source #

safeNeg' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> IntN n -> uf (IntN n) Source #

safeMinus' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> IntN n -> IntN n -> uf (IntN n) Source #

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

Defined in Grisette.Core.Data.BV

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, 1 <= n) => FiniteBits (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

(KnownNat n, 1 <= n) => Bounded (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

minBound :: IntN n #

maxBound :: IntN n #

(KnownNat n, 1 <= n) => Enum (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

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

Generic (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Associated Types

type Rep (IntN n) :: Type -> Type #

Methods

from :: IntN n -> Rep (IntN n) x #

to :: Rep (IntN n) x -> IntN n #

(KnownNat n, 1 <= n) => Num (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

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, 1 <= n) => Read (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

(KnownNat n, 1 <= n) => Integral (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

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, 1 <= n) => Real (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

toRational :: IntN n -> Rational #

(KnownNat n, 1 <= n) => Show (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

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

show :: IntN n -> String #

showList :: [IntN n] -> ShowS #

NFData (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

rnf :: IntN n -> () #

Eq (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

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

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

(KnownNat n, 1 <= n) => Ord (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

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, 1 <= n) => SEq (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

Methods

(==~) :: IntN n -> IntN n -> SymBool Source #

(/=~) :: IntN n -> IntN n -> SymBool Source #

(KnownNat n, 1 <= n) => EvaluateSym (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Evaluate

Methods

evaluateSym :: Bool -> Model -> IntN n -> IntN n Source #

(KnownNat n, 1 <= n) => ExtractSymbolics (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.ExtractSymbolics

(KnownNat n, 1 <= n) => Mergeable (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

(KnownNat n, 1 <= n) => SOrd (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SOrd

Methods

(<~) :: IntN n -> IntN n -> SymBool Source #

(<=~) :: IntN n -> IntN n -> SymBool Source #

(>~) :: IntN n -> IntN n -> SymBool Source #

(>=~) :: IntN n -> IntN n -> SymBool Source #

symCompare :: IntN n -> IntN n -> UnionM Ordering Source #

(KnownNat n, 1 <= n) => SubstituteSym (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Substitute

Methods

substituteSym :: LinkedRep cb sb => TypedSymbol cb -> sb -> IntN n -> IntN n Source #

(KnownNat w, 1 <= w) => SupportedPrim (IntN w) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Associated Types

type PrimConstraint (IntN w) Source #

(KnownNat n, 1 <= n) => SymRep (IntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType (IntN n) Source #

Hashable (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

hashWithSalt :: Int -> IntN n -> Int #

hash :: IntN n -> Int #

(KnownNat n, 1 <= n) => ToSym (IntN n) SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: IntN n -> SomeSymIntN Source #

(KnownNat n, 1 <= n) => GenSym (IntN n) (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => IntN n -> m (UnionM (IntN n)) Source #

(KnownNat n, 1 <= n) => GenSymSimple (IntN n) (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => IntN n -> m (IntN n) Source #

(KnownNat n, 1 <= n) => Solvable (IntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

con :: IntN n -> SymIntN n Source #

conView :: SymIntN n -> Maybe (IntN n) Source #

ssym :: String -> SymIntN n Source #

isym :: String -> Int -> SymIntN n Source #

sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> SymIntN n Source #

iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> SymIntN n Source #

(KnownNat n, 1 <= n) => ToCon (IntN n) (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.ToCon

Methods

toCon :: IntN n -> Maybe (IntN n) Source #

(KnownNat n, 1 <= n) => ToCon (SymIntN n) (IntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymIntN n -> Maybe (IntN n) Source #

(KnownNat n, 1 <= n) => ToSym (UnionM (IntN n)) (SymIntN n) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

toSym :: UnionM (IntN n) -> SymIntN n Source #

(KnownNat n, 1 <= n) => ToSym (IntN n) (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.ToSym

Methods

toSym :: IntN n -> IntN n Source #

(KnownNat n, 1 <= n) => ToSym (IntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: IntN n -> SymIntN n Source #

(KnownNat n, 1 <= n) => LinkedRep (IntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Lift (IntN n :: TYPE LiftedRep) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

lift :: Quote m => IntN n -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => IntN n -> Code m (IntN n) #

type Rep (IntN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

type Rep (IntN n) = D1 ('MetaData "IntN" "Grisette.Core.Data.BV" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'True) (C1 ('MetaCons "IntN" 'PrefixI 'True) (S1 ('MetaSel ('Just "unIntN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))
type PrimConstraint (IntN w) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

type PrimConstraint (IntN w) = (KnownNat w, 1 <= w)
type SymType (IntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type SymType (IntN n) = SymIntN n

data WordN (n :: Nat) Source #

Symbolic unsigned bit vectors.

Instances

Instances details
SizedBV WordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

sizedBVConcat :: forall (l :: Nat) (r :: Nat). (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => WordN l -> WordN r -> WordN (l + r) Source #

sizedBVZext :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> WordN l -> WordN r Source #

sizedBVSext :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> WordN l -> WordN r Source #

sizedBVExt :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> WordN l -> WordN r Source #

sizedBVSelect :: forall (n :: Nat) (ix :: Nat) (w :: Nat) proxy. (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => proxy ix -> proxy w -> WordN n -> WordN w Source #

(KnownNat n, 1 <= n) => SafeDivision ArithException (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SafeArith

Methods

safeDiv :: (MonadError ArithException uf, MonadUnion uf) => WordN n -> WordN n -> uf (WordN n) Source #

safeMod :: (MonadError ArithException uf, MonadUnion uf) => WordN n -> WordN n -> uf (WordN n) Source #

safeDivMod :: (MonadError ArithException uf, MonadUnion uf) => WordN n -> WordN n -> uf (WordN n, WordN n) Source #

safeQuot :: (MonadError ArithException uf, MonadUnion uf) => WordN n -> WordN n -> uf (WordN n) Source #

safeRem :: (MonadError ArithException uf, MonadUnion uf) => WordN n -> WordN n -> uf (WordN n) Source #

safeQuotRem :: (MonadError ArithException uf, MonadUnion uf) => WordN n -> WordN n -> uf (WordN n, WordN n) Source #

safeDiv' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> WordN n -> WordN n -> uf (WordN n) Source #

safeMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> WordN n -> WordN n -> uf (WordN n) Source #

safeDivMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> WordN n -> WordN n -> uf (WordN n, WordN n) Source #

safeQuot' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> WordN n -> WordN n -> uf (WordN n) Source #

safeRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> WordN n -> WordN n -> uf (WordN n) Source #

safeQuotRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> WordN n -> WordN n -> uf (WordN n, WordN n) Source #

(KnownNat n, 1 <= n) => SafeLinearArith ArithException (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SafeArith

Methods

safeAdd :: (MonadError ArithException uf, MonadUnion uf) => WordN n -> WordN n -> uf (WordN n) Source #

safeNeg :: (MonadError ArithException uf, MonadUnion uf) => WordN n -> uf (WordN n) Source #

safeMinus :: (MonadError ArithException uf, MonadUnion uf) => WordN n -> WordN n -> uf (WordN n) Source #

safeAdd' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> WordN n -> WordN n -> uf (WordN n) Source #

safeNeg' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> WordN n -> uf (WordN n) Source #

safeMinus' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> WordN n -> WordN n -> uf (WordN n) Source #

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

Defined in Grisette.Core.Data.BV

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, 1 <= n) => FiniteBits (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

(KnownNat n, 1 <= n) => Bounded (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

minBound :: WordN n #

maxBound :: WordN n #

(KnownNat n, 1 <= n) => Enum (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

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

Generic (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Associated Types

type Rep (WordN n) :: Type -> Type #

Methods

from :: WordN n -> Rep (WordN n) x #

to :: Rep (WordN n) x -> WordN n #

(KnownNat n, 1 <= n) => Num (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

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, 1 <= n) => Read (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

(KnownNat n, 1 <= n) => Integral (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

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, 1 <= n) => Real (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

toRational :: WordN n -> Rational #

(KnownNat n, 1 <= n) => Show (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

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

show :: WordN n -> String #

showList :: [WordN n] -> ShowS #

NFData (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

rnf :: WordN n -> () #

Eq (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

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

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

Ord (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

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 #

(KnownNat n, 1 <= n) => SEq (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

Methods

(==~) :: WordN n -> WordN n -> SymBool Source #

(/=~) :: WordN n -> WordN n -> SymBool Source #

(KnownNat n, 1 <= n) => EvaluateSym (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Evaluate

Methods

evaluateSym :: Bool -> Model -> WordN n -> WordN n Source #

(KnownNat n, 1 <= n) => ExtractSymbolics (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.ExtractSymbolics

(KnownNat n, 1 <= n) => Mergeable (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

(KnownNat n, 1 <= n) => SOrd (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SOrd

(KnownNat n, 1 <= n) => SubstituteSym (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Substitute

Methods

substituteSym :: LinkedRep cb sb => TypedSymbol cb -> sb -> WordN n -> WordN n Source #

(KnownNat w, 1 <= w) => SupportedPrim (WordN w) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Associated Types

type PrimConstraint (WordN w) Source #

(KnownNat n, 1 <= n) => SymRep (WordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType (WordN n) Source #

Hashable (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

hashWithSalt :: Int -> WordN n -> Int #

hash :: WordN n -> Int #

(KnownNat n, 1 <= n) => ToSym (WordN n) SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => GenSym (WordN n) (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => WordN n -> m (UnionM (WordN n)) Source #

(KnownNat n, 1 <= n) => GenSymSimple (WordN n) (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => WordN n -> m (WordN n) Source #

(KnownNat n, 1 <= n) => Solvable (WordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

con :: WordN n -> SymWordN n Source #

conView :: SymWordN n -> Maybe (WordN n) Source #

ssym :: String -> SymWordN n Source #

isym :: String -> Int -> SymWordN n Source #

sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> SymWordN n Source #

iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> SymWordN n Source #

(KnownNat n, 1 <= n) => ToCon (WordN n) (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.ToCon

Methods

toCon :: WordN n -> Maybe (WordN n) Source #

(KnownNat n, 1 <= n) => ToCon (SymWordN n) (WordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymWordN n -> Maybe (WordN n) Source #

(KnownNat n, 1 <= n) => ToSym (UnionM (WordN n)) (SymWordN n) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

toSym :: UnionM (WordN n) -> SymWordN n Source #

(KnownNat n, 1 <= n) => ToSym (WordN n) (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.ToSym

Methods

toSym :: WordN n -> WordN n Source #

(KnownNat n, 1 <= n) => ToSym (WordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: WordN n -> SymWordN n Source #

(KnownNat n, 1 <= n) => LinkedRep (WordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Lift (WordN n :: TYPE LiftedRep) Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

lift :: Quote m => WordN n -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => WordN n -> Code m (WordN n) #

type Rep (WordN n) Source # 
Instance details

Defined in Grisette.Core.Data.BV

type Rep (WordN n) = D1 ('MetaData "WordN" "Grisette.Core.Data.BV" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'True) (C1 ('MetaCons "WordN" 'PrefixI 'True) (S1 ('MetaSel ('Just "unWordN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))
type PrimConstraint (WordN w) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

type PrimConstraint (WordN w) = (KnownNat w, 1 <= w)
type SymType (WordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type SymType (WordN n) = SymWordN n

data SomeWordN where Source #

A non-indexed version of WordN.

Constructors

SomeWordN :: (KnownNat n, 1 <= n) => WordN n -> SomeWordN 

Instances

Instances details
Bits SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

FiniteBits SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Enum SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Num SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Integral SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Real SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Show SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

NFData SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

rnf :: SomeWordN -> () #

Eq SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Ord SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

SomeBV SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

someBVConcat :: SomeWordN -> SomeWordN -> SomeWordN Source #

someBVZext :: forall p (l :: Nat). KnownNat l => p l -> SomeWordN -> SomeWordN Source #

someBVSext :: forall p (l :: Nat). KnownNat l => p l -> SomeWordN -> SomeWordN Source #

someBVExt :: forall p (l :: Nat). KnownNat l => p l -> SomeWordN -> SomeWordN Source #

someBVSelect :: forall p (ix :: Nat) q (w :: Nat). (KnownNat ix, KnownNat w) => p ix -> q w -> SomeWordN -> SomeWordN Source #

SEq SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

EvaluateSym SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Evaluate

ExtractSymbolics SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.ExtractSymbolics

Mergeable SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

SOrd SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.SOrd

SubstituteSym SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Substitute

Methods

substituteSym :: LinkedRep cb sb => TypedSymbol cb -> sb -> SomeWordN -> SomeWordN Source #

Hashable SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

GenSym SomeWordN SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

GenSymSimple SomeWordN SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

ToCon SomeWordN SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.ToCon

ToCon SomeSymWordN SomeWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym SomeWordN SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.ToSym

ToSym SomeWordN SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Lift SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

lift :: Quote m => SomeWordN -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SomeWordN -> Code m SomeWordN #

ToSym (UnionM SomeWordN) SomeSymWordN Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

SafeDivision (Either BitwidthMismatch ArithException) SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.SafeArith

Methods

safeDiv :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeWordN -> SomeWordN -> uf SomeWordN Source #

safeMod :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeWordN -> SomeWordN -> uf SomeWordN Source #

safeDivMod :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeWordN -> SomeWordN -> uf (SomeWordN, SomeWordN) Source #

safeQuot :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeWordN -> SomeWordN -> uf SomeWordN Source #

safeRem :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeWordN -> SomeWordN -> uf SomeWordN Source #

safeQuotRem :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeWordN -> SomeWordN -> uf (SomeWordN, SomeWordN) Source #

safeDiv' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeWordN -> SomeWordN -> uf SomeWordN Source #

safeMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeWordN -> SomeWordN -> uf SomeWordN Source #

safeDivMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeWordN -> SomeWordN -> uf (SomeWordN, SomeWordN) Source #

safeQuot' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeWordN -> SomeWordN -> uf SomeWordN Source #

safeRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeWordN -> SomeWordN -> uf SomeWordN Source #

safeQuotRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeWordN -> SomeWordN -> uf (SomeWordN, SomeWordN) Source #

SafeLinearArith (Either BitwidthMismatch ArithException) SomeWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.SafeArith

data SomeIntN where Source #

A non-indexed version of IntN.

Constructors

SomeIntN :: (KnownNat n, 1 <= n) => IntN n -> SomeIntN 

Instances

Instances details
Bits SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

FiniteBits SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Enum SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Num SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Integral SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Real SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Show SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

NFData SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

rnf :: SomeIntN -> () #

Eq SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Ord SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

SomeBV SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

someBVConcat :: SomeIntN -> SomeIntN -> SomeIntN Source #

someBVZext :: forall p (l :: Nat). KnownNat l => p l -> SomeIntN -> SomeIntN Source #

someBVSext :: forall p (l :: Nat). KnownNat l => p l -> SomeIntN -> SomeIntN Source #

someBVExt :: forall p (l :: Nat). KnownNat l => p l -> SomeIntN -> SomeIntN Source #

someBVSelect :: forall p (ix :: Nat) q (w :: Nat). (KnownNat ix, KnownNat w) => p ix -> q w -> SomeIntN -> SomeIntN Source #

SEq SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

EvaluateSym SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Evaluate

ExtractSymbolics SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.ExtractSymbolics

Mergeable SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

SOrd SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.SOrd

SubstituteSym SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Substitute

Methods

substituteSym :: LinkedRep cb sb => TypedSymbol cb -> sb -> SomeIntN -> SomeIntN Source #

Hashable SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

hashWithSalt :: Int -> SomeIntN -> Int #

hash :: SomeIntN -> Int #

GenSym SomeIntN SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

GenSymSimple SomeIntN SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

ToCon SomeIntN SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.ToCon

ToCon SomeSymIntN SomeIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym SomeIntN SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.ToSym

ToSym SomeIntN SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Lift SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.BV

Methods

lift :: Quote m => SomeIntN -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SomeIntN -> Code m SomeIntN #

ToSym (UnionM SomeIntN) SomeSymIntN Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

SafeDivision (Either BitwidthMismatch ArithException) SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.SafeArith

Methods

safeDiv :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeIntN -> SomeIntN -> uf SomeIntN Source #

safeMod :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeIntN -> SomeIntN -> uf SomeIntN Source #

safeDivMod :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeIntN -> SomeIntN -> uf (SomeIntN, SomeIntN) Source #

safeQuot :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeIntN -> SomeIntN -> uf SomeIntN Source #

safeRem :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeIntN -> SomeIntN -> uf SomeIntN Source #

safeQuotRem :: (MonadError (Either BitwidthMismatch ArithException) uf, MonadUnion uf) => SomeIntN -> SomeIntN -> uf (SomeIntN, SomeIntN) Source #

safeDiv' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeIntN -> SomeIntN -> uf SomeIntN Source #

safeMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeIntN -> SomeIntN -> uf SomeIntN Source #

safeDivMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeIntN -> SomeIntN -> uf (SomeIntN, SomeIntN) Source #

safeQuot' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeIntN -> SomeIntN -> uf SomeIntN Source #

safeRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeIntN -> SomeIntN -> uf SomeIntN Source #

safeQuotRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (Either BitwidthMismatch ArithException -> e') -> SomeIntN -> SomeIntN -> uf (SomeIntN, SomeIntN) Source #

SafeLinearArith (Either BitwidthMismatch ArithException) SomeIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.SafeArith

data a =-> b infixr 0 Source #

Functions as a table. Use the # operator to apply the function.

>>> :set -XTypeOperators
>>> let f = TabularFun [(1, 2), (3, 4)] 0 :: Int =-> Int
>>> f # 1
2
>>> f # 2
0
>>> f # 3
4

Constructors

TabularFun 

Fields

Instances

Instances details
Generic1 ((=->) a :: Type -> Type) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Associated Types

type Rep1 ((=->) a) :: k -> Type #

Methods

from1 :: forall (a0 :: k). (a =-> a0) -> Rep1 ((=->) a) a0 #

to1 :: forall (a0 :: k). Rep1 ((=->) a) a0 -> a =-> a0 #

NFData a => NFData1 ((=->) a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

liftRnf :: (a0 -> ()) -> (a =-> a0) -> () #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (UnionM (ca =-> cb)) (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

toSym :: UnionM (ca =-> cb) -> sa =~> sb Source #

(Lift a, Lift b) => Lift (a =-> b :: Type) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

lift :: Quote m => (a =-> b) -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => (a =-> b) -> Code m (a =-> b) #

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

Defined in Grisette.IR.SymPrim.Data.TabularFun

Associated Types

type Rep (a =-> b) :: Type -> Type #

Methods

from :: (a =-> b) -> Rep (a =-> b) x #

to :: Rep (a =-> b) x -> a =-> b #

(Show a, Show b) => Show (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

showsPrec :: Int -> (a =-> b) -> ShowS #

show :: (a =-> b) -> String #

showList :: [a =-> b] -> ShowS #

(NFData a, NFData b) => NFData (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

rnf :: (a =-> b) -> () #

(Eq a, Eq b) => Eq (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

(==) :: (a =-> b) -> (a =-> b) -> Bool #

(/=) :: (a =-> b) -> (a =-> b) -> Bool #

Eq a => Function (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Associated Types

type Arg (a =-> b) Source #

type Ret (a =-> b) Source #

Methods

(#) :: (a =-> b) -> Arg (a =-> b) -> Ret (a =-> b) Source #

(SupportedPrim a, SupportedPrim b) => SupportedPrim (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Associated Types

type PrimConstraint (a =-> b) Source #

Methods

withPrim :: proxy (a =-> b) -> (PrimConstraint (a =-> b) => a0) -> a0 Source #

termCache :: Cache (Term (a =-> b)) Source #

pformatCon :: (a =-> b) -> String Source #

pformatSym :: TypedSymbol (a =-> b) -> String Source #

defaultValue :: a =-> b Source #

defaultValueDynamic :: proxy (a =-> b) -> ModelValue Source #

(SymRep a, SymRep b) => SymRep (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType (a =-> b) Source #

(Hashable a, Hashable b) => Hashable (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Methods

hashWithSalt :: Int -> (a =-> b) -> Int #

hash :: (a =-> b) -> Int #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Solvable (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

con :: (ca =-> cb) -> sa =~> sb Source #

conView :: (sa =~> sb) -> Maybe (ca =-> cb) Source #

ssym :: String -> sa =~> sb Source #

isym :: String -> Int -> sa =~> sb Source #

sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> sa =~> sb Source #

iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> sa =~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToCon (sa =~> sb) (ca =-> cb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: (sa =~> sb) -> Maybe (ca =-> cb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: (ca =-> cb) -> sa =~> sb Source #

(LinkedRep ca sa, LinkedRep cb sb) => LinkedRep (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

underlyingTerm :: (sa =~> sb) -> Term (ca =-> cb) Source #

wrapTerm :: Term (ca =-> cb) -> sa =~> sb Source #

type Rep1 ((=->) a :: Type -> Type) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type Rep1 ((=->) a :: Type -> Type) = D1 ('MetaData "=->" "Grisette.IR.SymPrim.Data.TabularFun" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'False) (C1 ('MetaCons "TabularFun" 'PrefixI 'True) (S1 ('MetaSel ('Just "funcTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 ((,) a)) :*: S1 ('MetaSel ('Just "defaultFuncValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Rep (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type Rep (a =-> b) = D1 ('MetaData "=->" "Grisette.IR.SymPrim.Data.TabularFun" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'False) (C1 ('MetaCons "TabularFun" 'PrefixI 'True) (S1 ('MetaSel ('Just "funcTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(a, b)]) :*: S1 ('MetaSel ('Just "defaultFuncValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)))
type Arg (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type Arg (a =-> b) = a
type Ret (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type Ret (a =-> b) = b
type PrimConstraint (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

type SymType (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type SymType (a =-> b) = SymType a =~> SymType b

data a --> b infixr 0 Source #

General symbolic function type. Use the # operator to apply the function. Note that this function should be applied to symbolic values only. It is by itself already a symbolic value, but can be considered partially concrete as the function body is specified. Use -~> for uninterpreted general symbolic functions.

The result would be partially evaluated.

>>> :set -XOverloadedStrings
>>> :set -XTypeOperators
>>> let f = ("x" :: TypedSymbol Integer) --> ("x" + 1 + "y" :: SymInteger) :: Integer --> Integer
>>> f # 1    -- 1 has the type SymInteger
(+ 2 y)
>>> f # "a"  -- "a" has the type SymInteger
(+ 1 (+ a y))

Instances

Instances details
Lift (a --> b :: Type) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Methods

lift :: Quote m => (a --> b) -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => (a --> b) -> Code m (a --> b) #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (UnionM (ca --> cb)) (sa -~> sb) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

toSym :: UnionM (ca --> cb) -> sa -~> sb Source #

Show (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Methods

showsPrec :: Int -> (a --> b) -> ShowS #

show :: (a --> b) -> String #

showList :: [a --> b] -> ShowS #

NFData (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Methods

rnf :: (a --> b) -> () #

Eq (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Methods

(==) :: (a --> b) -> (a --> b) -> Bool #

(/=) :: (a --> b) -> (a --> b) -> Bool #

(LinkedRep a sa, LinkedRep b sb) => Function (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Associated Types

type Arg (a --> b) Source #

type Ret (a --> b) Source #

Methods

(#) :: (a --> b) -> Arg (a --> b) -> Ret (a --> b) Source #

(SupportedPrim a, SupportedPrim b) => SupportedPrim (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Associated Types

type PrimConstraint (a --> b) Source #

Methods

withPrim :: proxy (a --> b) -> (PrimConstraint (a --> b) => a0) -> a0 Source #

termCache :: Cache (Term (a --> b)) Source #

pformatCon :: (a --> b) -> String Source #

pformatSym :: TypedSymbol (a --> b) -> String Source #

defaultValue :: a --> b Source #

defaultValueDynamic :: proxy (a --> b) -> ModelValue Source #

(SymRep ca, SymRep cb) => SymRep (ca --> cb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType (ca --> cb) Source #

Hashable (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Methods

hashWithSalt :: Int -> (a --> b) -> Int #

hash :: (a --> b) -> Int #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Solvable (ca --> cb) (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

con :: (ca --> cb) -> sa -~> sb Source #

conView :: (sa -~> sb) -> Maybe (ca --> cb) Source #

ssym :: String -> sa -~> sb Source #

isym :: String -> Int -> sa -~> sb Source #

sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> sa -~> sb Source #

iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> sa -~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToCon (sa -~> sb) (ca --> cb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: (sa -~> sb) -> Maybe (ca --> cb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (ca --> cb) (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: (ca --> cb) -> sa -~> sb Source #

(LinkedRep ca sa, LinkedRep cb sb) => LinkedRep (ca --> cb) (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

underlyingTerm :: (sa -~> sb) -> Term (ca --> cb) Source #

wrapTerm :: Term (ca --> cb) -> sa -~> sb Source #

type Arg (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

type Arg (a --> b) = SymType a
type Ret (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

type Ret (a --> b) = SymType b
type PrimConstraint (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

type SymType (ca --> cb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type SymType (ca --> cb) = SymType ca -~> SymType cb

(-->) :: (SupportedPrim ca, SupportedPrim cb, LinkedRep cb sb) => TypedSymbol ca -> sb -> ca --> cb infixr 0 Source #

Construction of general symbolic functions.

>>> f = "a" --> "a" + 1 :: Integer --> Integer
>>> f
\(a:ARG :: Integer) -> (+ 1 a:ARG)

This general symbolic function needs to be applied to symbolic values: >>> f # ("a" :: SymInteger) (+ 1 a)

Symbolic types

class (Lift t, Typeable t, Hashable t, Eq t, Show t, NFData t) => SupportedPrim t Source #

Indicates that a type is supported and can be represented as a symbolic term.

Minimal complete definition

defaultValue

Instances

Instances details
SupportedPrim Integer Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Associated Types

type PrimConstraint Integer Source #

SupportedPrim Bool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Associated Types

type PrimConstraint Bool Source #

(KnownNat w, 1 <= w) => SupportedPrim (IntN w) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Associated Types

type PrimConstraint (IntN w) Source #

(KnownNat w, 1 <= w) => SupportedPrim (WordN w) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Associated Types

type PrimConstraint (WordN w) Source #

(SupportedPrim a, SupportedPrim b) => SupportedPrim (a --> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Associated Types

type PrimConstraint (a --> b) Source #

Methods

withPrim :: proxy (a --> b) -> (PrimConstraint (a --> b) => a0) -> a0 Source #

termCache :: Cache (Term (a --> b)) Source #

pformatCon :: (a --> b) -> String Source #

pformatSym :: TypedSymbol (a --> b) -> String Source #

defaultValue :: a --> b Source #

defaultValueDynamic :: proxy (a --> b) -> ModelValue Source #

(SupportedPrim a, SupportedPrim b) => SupportedPrim (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.TabularFun

Associated Types

type PrimConstraint (a =-> b) Source #

Methods

withPrim :: proxy (a =-> b) -> (PrimConstraint (a =-> b) => a0) -> a0 Source #

termCache :: Cache (Term (a =-> b)) Source #

pformatCon :: (a =-> b) -> String Source #

pformatSym :: TypedSymbol (a =-> b) -> String Source #

defaultValue :: a =-> b Source #

defaultValueDynamic :: proxy (a =-> b) -> ModelValue Source #

class SupportedPrim con => SymRep con Source #

Type family to resolve the symbolic type associated with a concrete type.

Associated Types

type SymType con Source #

Instances

Instances details
SymRep Integer Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType Integer Source #

SymRep Bool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType Bool Source #

(KnownNat n, 1 <= n) => SymRep (IntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType (IntN n) Source #

(KnownNat n, 1 <= n) => SymRep (WordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType (WordN n) Source #

(SymRep ca, SymRep cb) => SymRep (ca --> cb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType (ca --> cb) Source #

(SymRep a, SymRep b) => SymRep (a =-> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type SymType (a =-> b) Source #

class ConRep sym Source #

Type family to resolve the concrete type associated with a symbolic type.

Associated Types

type ConType sym Source #

Instances

Instances details
ConRep SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType SymBool Source #

ConRep SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType SymInteger Source #

(KnownNat n, 1 <= n) => ConRep (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType (SymIntN n) Source #

(KnownNat n, 1 <= n) => ConRep (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType (SymWordN n) Source #

(ConRep a, ConRep b) => ConRep (a -~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType (a -~> b) Source #

(ConRep a, ConRep b) => ConRep (a =~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType (a =~> b) Source #

class (ConRep sym, SymRep con, sym ~ SymType con, con ~ ConType sym) => LinkedRep con sym | con -> sym, sym -> con Source #

One-to-one mapping between symbolic types and concrete types.

Minimal complete definition

underlyingTerm, wrapTerm

Instances

Instances details
LinkedRep Integer SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

LinkedRep Bool SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => LinkedRep (IntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => LinkedRep (WordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(LinkedRep ca sa, LinkedRep cb sb) => LinkedRep (ca --> cb) (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

underlyingTerm :: (sa -~> sb) -> Term (ca --> cb) Source #

wrapTerm :: Term (ca --> cb) -> sa -~> sb Source #

(LinkedRep ca sa, LinkedRep cb sb) => LinkedRep (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

underlyingTerm :: (sa =~> sb) -> Term (ca =-> cb) Source #

wrapTerm :: Term (ca =-> cb) -> sa =~> sb Source #

newtype SymBool Source #

Symbolic Boolean type.

>>> :set -XOverloadedStrings
>>> "a" :: SymBool
a
>>> "a" &&~ "b" :: SymBool
(&& a b)

More symbolic operations are available. Please refer to the documentation for the type class instances.

Constructors

SymBool 

Instances

Instances details
IsString SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

fromString :: String -> SymBool #

Generic SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type Rep SymBool :: Type -> Type #

Methods

from :: SymBool -> Rep SymBool x #

to :: Rep SymBool x -> SymBool #

Show SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

NFData SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

rnf :: SymBool -> () #

Eq SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

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

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

ITEOp SymBool Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

LogicalOp SymBool Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

SEq SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

EvaluateSym SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ExtractSymbolics SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Mergeable SymBool Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

SOrd SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

SimpleMergeable SymBool Source # 
Instance details

Defined in Grisette.Core.Data.Class.SimpleMergeable

SubstituteSym SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

substituteSym :: LinkedRep cb sb => TypedSymbol cb -> sb -> SymBool -> SymBool Source #

ConRep SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType SymBool Source #

AllSyms SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Hashable SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

hashWithSalt :: Int -> SymBool -> Int #

hash :: SymBool -> Int #

GenSym SymBool SymBool Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => SymBool -> m (UnionM SymBool) Source #

GenSym () SymBool Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (UnionM SymBool) Source #

GenSymSimple SymBool SymBool Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

GenSymSimple () SymBool Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m SymBool Source #

Solvable Bool SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToCon SymBool SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToCon SymBool Bool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym SymBool SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Bool SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Bool -> SymBool Source #

LinkedRep Bool SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym (UnionM Bool) SymBool Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Lift SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

lift :: Quote m => SymBool -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SymBool -> Code m SymBool #

type Rep SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type Rep SymBool = D1 ('MetaData "SymBool" "Grisette.IR.SymPrim.Data.SymPrim" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'True) (C1 ('MetaCons "SymBool" 'PrefixI 'True) (S1 ('MetaSel ('Just "underlyingBoolTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term Bool))))
type ConType SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

newtype SymInteger Source #

Symbolic (unbounded, mathematical) integer type.

>>> "a" + 1 :: SymInteger
(+ 1 a)

More symbolic operations are available. Please refer to the documentation for the type class instances.

Instances

Instances details
IsString SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Generic SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type Rep SymInteger :: Type -> Type #

Num SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Show SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

NFData SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

rnf :: SymInteger -> () #

Eq SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ITEOp SymInteger Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

SEq SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

EvaluateSym SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ExtractSymbolics SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Mergeable SymInteger Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

SOrd SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

SymIntegerOp SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

SimpleMergeable SymInteger Source # 
Instance details

Defined in Grisette.Core.Data.Class.SimpleMergeable

SubstituteSym SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

substituteSym :: LinkedRep cb sb => TypedSymbol cb -> sb -> SymInteger -> SymInteger Source #

ConRep SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType SymInteger Source #

AllSyms SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Hashable SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

GenSym SymInteger SymInteger Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

GenSym () SymInteger Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (UnionM SymInteger) Source #

GenSymSimple SymInteger SymInteger Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

GenSymSimple () SymInteger Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m SymInteger Source #

SafeDivision ArithException SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

safeDiv :: (MonadError ArithException uf, MonadUnion uf) => SymInteger -> SymInteger -> uf SymInteger Source #

safeMod :: (MonadError ArithException uf, MonadUnion uf) => SymInteger -> SymInteger -> uf SymInteger Source #

safeDivMod :: (MonadError ArithException uf, MonadUnion uf) => SymInteger -> SymInteger -> uf (SymInteger, SymInteger) Source #

safeQuot :: (MonadError ArithException uf, MonadUnion uf) => SymInteger -> SymInteger -> uf SymInteger Source #

safeRem :: (MonadError ArithException uf, MonadUnion uf) => SymInteger -> SymInteger -> uf SymInteger Source #

safeQuotRem :: (MonadError ArithException uf, MonadUnion uf) => SymInteger -> SymInteger -> uf (SymInteger, SymInteger) Source #

safeDiv' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymInteger -> SymInteger -> uf SymInteger Source #

safeMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymInteger -> SymInteger -> uf SymInteger Source #

safeDivMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymInteger -> SymInteger -> uf (SymInteger, SymInteger) Source #

safeQuot' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymInteger -> SymInteger -> uf SymInteger Source #

safeRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymInteger -> SymInteger -> uf SymInteger Source #

safeQuotRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymInteger -> SymInteger -> uf (SymInteger, SymInteger) Source #

SafeLinearArith ArithException SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Solvable Integer SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToCon SymInteger SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToCon SymInteger Integer Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym SymInteger SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Integer SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

LinkedRep Integer SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym (UnionM Integer) SymInteger Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Lift SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

lift :: Quote m => SymInteger -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SymInteger -> Code m SymInteger #

type Rep SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type Rep SymInteger = D1 ('MetaData "SymInteger" "Grisette.IR.SymPrim.Data.SymPrim" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'True) (C1 ('MetaCons "SymInteger" 'PrefixI 'True) (S1 ('MetaSel ('Just "underlyingIntegerTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term Integer))))
type ConType SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

newtype SymWordN (n :: Nat) Source #

Symbolic unsigned bit vector type. Indexed with the bit width. Signedness affects the semantics of the operations, including comparison/extension, etc.

>>> :set -XOverloadedStrings -XDataKinds -XBinaryLiterals
>>> "a" + 5 :: SymWordN 5
(+ 0b00101 a)
>>> sizedBVConcat (con 0b101 :: SymWordN 3) (con 0b110 :: SymWordN 3)
0b101110
>>> sizedBVExt (Proxy @6) (con 0b101 :: SymWordN 3)
0b000101
>>> (8 :: SymWordN 4) <~ (7 :: SymWordN 4)
false

More symbolic operations are available. Please refer to the documentation for the type class instances.

Constructors

SymWordN 

Instances

Instances details
SizedBV SymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

sizedBVConcat :: forall (l :: Nat) (r :: Nat). (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => SymWordN l -> SymWordN r -> SymWordN (l + r) Source #

sizedBVZext :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> SymWordN l -> SymWordN r Source #

sizedBVSext :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> SymWordN l -> SymWordN r Source #

sizedBVExt :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> SymWordN l -> SymWordN r Source #

sizedBVSelect :: forall (n :: Nat) (ix :: Nat) (w :: Nat) proxy. (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => proxy ix -> proxy w -> SymWordN n -> SymWordN w Source #

(KnownNat n, 1 <= n) => GenSym () (SymWordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (UnionM (SymWordN n)) Source #

(KnownNat n, 1 <= n) => GenSymSimple () (SymWordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (SymWordN n) Source #

(KnownNat n, 1 <= n) => SafeDivision ArithException (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

safeDiv :: (MonadError ArithException uf, MonadUnion uf) => SymWordN n -> SymWordN n -> uf (SymWordN n) Source #

safeMod :: (MonadError ArithException uf, MonadUnion uf) => SymWordN n -> SymWordN n -> uf (SymWordN n) Source #

safeDivMod :: (MonadError ArithException uf, MonadUnion uf) => SymWordN n -> SymWordN n -> uf (SymWordN n, SymWordN n) Source #

safeQuot :: (MonadError ArithException uf, MonadUnion uf) => SymWordN n -> SymWordN n -> uf (SymWordN n) Source #

safeRem :: (MonadError ArithException uf, MonadUnion uf) => SymWordN n -> SymWordN n -> uf (SymWordN n) Source #

safeQuotRem :: (MonadError ArithException uf, MonadUnion uf) => SymWordN n -> SymWordN n -> uf (SymWordN n, SymWordN n) Source #

safeDiv' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymWordN n -> SymWordN n -> uf (SymWordN n) Source #

safeMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymWordN n -> SymWordN n -> uf (SymWordN n) Source #

safeDivMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymWordN n -> SymWordN n -> uf (SymWordN n, SymWordN n) Source #

safeQuot' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymWordN n -> SymWordN n -> uf (SymWordN n) Source #

safeRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymWordN n -> SymWordN n -> uf (SymWordN n) Source #

safeQuotRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymWordN n -> SymWordN n -> uf (SymWordN n, SymWordN n) Source #

(KnownNat n, 1 <= n) => SafeLinearArith ArithException (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Word16 (SymWordN 16) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Word16 -> SymWordN 16 Source #

ToSym Word32 (SymWordN 32) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Word32 -> SymWordN 32 Source #

ToSym Word64 (SymWordN 64) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Word64 -> SymWordN 64 Source #

ToSym Word8 (SymWordN 8) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Word8 -> SymWordN 8 Source #

ToSym Word (SymWordN 64) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Word -> SymWordN 64 Source #

(KnownNat n, 1 <= n) => IsString (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

fromString :: String -> SymWordN n #

(KnownNat n, 1 <= n) => Bits (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Generic (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type Rep (SymWordN n) :: Type -> Type #

Methods

from :: SymWordN n -> Rep (SymWordN n) x #

to :: Rep (SymWordN n) x -> SymWordN n #

(KnownNat n, 1 <= n) => Num (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => Show (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

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

show :: SymWordN n -> String #

showList :: [SymWordN n] -> ShowS #

NFData (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

rnf :: SymWordN n -> () #

(KnownNat n, 1 <= n) => Eq (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

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

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

(KnownNat n, 1 <= n) => ITEOp (SymWordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

Methods

ites :: SymBool -> SymWordN n -> SymWordN n -> SymWordN n Source #

(KnownNat n, 1 <= n) => SEq (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => EvaluateSym (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

evaluateSym :: Bool -> Model -> SymWordN n -> SymWordN n Source #

(KnownNat n, 1 <= n) => ExtractSymbolics (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => Mergeable (SymWordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

(KnownNat n, 1 <= n) => SOrd (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => SimpleMergeable (SymWordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> SymWordN n -> SymWordN n -> SymWordN n Source #

(KnownNat n, 1 <= n) => SubstituteSym (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

substituteSym :: LinkedRep cb sb => TypedSymbol cb -> sb -> SymWordN n -> SymWordN n Source #

(KnownNat n, 1 <= n) => ConRep (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType (SymWordN n) Source #

(KnownNat n, 1 <= n) => AllSyms (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => Hashable (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

hashWithSalt :: Int -> SymWordN n -> Int #

hash :: SymWordN n -> Int #

ToCon (SymWordN 8) Word8 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymWordN 8 -> Maybe Word8 Source #

ToCon (SymWordN 16) Word16 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymWordN 16 -> Maybe Word16 Source #

ToCon (SymWordN 32) Word32 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymWordN 32 -> Maybe Word32 Source #

ToCon (SymWordN 64) Word64 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymWordN 64 -> Maybe Word64 Source #

ToCon (SymWordN 64) Word Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymWordN 64 -> Maybe Word Source #

(KnownNat n, 1 <= n) => GenSym (SymWordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => SymWordN n -> m (UnionM (SymWordN n)) Source #

(KnownNat n, 1 <= n) => GenSymSimple (SymWordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => SymWordN n -> m (SymWordN n) Source #

(KnownNat n, 1 <= n) => Solvable (WordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

con :: WordN n -> SymWordN n Source #

conView :: SymWordN n -> Maybe (WordN n) Source #

ssym :: String -> SymWordN n Source #

isym :: String -> Int -> SymWordN n Source #

sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> SymWordN n Source #

iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> SymWordN n Source #

(KnownNat n, 1 <= n) => ToCon (SymWordN n) (WordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymWordN n -> Maybe (WordN n) Source #

(KnownNat n, 1 <= n) => ToCon (SymWordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymWordN n -> Maybe (SymWordN n) Source #

(KnownNat n, 1 <= n) => ToSym (UnionM (WordN n)) (SymWordN n) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

toSym :: UnionM (WordN n) -> SymWordN n Source #

(KnownNat n, 1 <= n) => ToSym (WordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: WordN n -> SymWordN n Source #

(KnownNat n, 1 <= n) => ToSym (SymWordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: SymWordN n -> SymWordN n Source #

(KnownNat n, 1 <= n) => LinkedRep (WordN n) (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Lift (SymWordN n :: TYPE LiftedRep) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

lift :: Quote m => SymWordN n -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SymWordN n -> Code m (SymWordN n) #

type Rep (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type Rep (SymWordN n) = D1 ('MetaData "SymWordN" "Grisette.IR.SymPrim.Data.SymPrim" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'True) (C1 ('MetaCons "SymWordN" 'PrefixI 'True) (S1 ('MetaSel ('Just "underlyingWordNTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term (WordN n)))))
type ConType (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type ConType (SymWordN n) = WordN n

newtype SymIntN (n :: Nat) Source #

Symbolic signed bit vector type. Indexed with the bit width. Signedness affects the semantics of the operations, including comparison/extension, etc.

>>> :set -XOverloadedStrings -XDataKinds -XBinaryLiterals
>>> "a" + 5 :: SymIntN 5
(+ 0b00101 a)
>>> sizedBVConcat (con 0b101 :: SymIntN 3) (con 0b110 :: SymIntN 3)
0b101110
>>> sizedBVExt (Proxy @6) (con 0b101 :: SymIntN 3)
0b111101
>>> (8 :: SymIntN 4) <~ (7 :: SymIntN 4)
true

More symbolic operations are available. Please refer to the documentation for the type class instances.

Constructors

SymIntN 

Instances

Instances details
SizedBV SymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

sizedBVConcat :: forall (l :: Nat) (r :: Nat). (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => SymIntN l -> SymIntN r -> SymIntN (l + r) Source #

sizedBVZext :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> SymIntN l -> SymIntN r Source #

sizedBVSext :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> SymIntN l -> SymIntN r Source #

sizedBVExt :: forall (l :: Nat) (r :: Nat) proxy. (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) => proxy r -> SymIntN l -> SymIntN r Source #

sizedBVSelect :: forall (n :: Nat) (ix :: Nat) (w :: Nat) proxy. (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => proxy ix -> proxy w -> SymIntN n -> SymIntN w Source #

(KnownNat n, 1 <= n) => GenSym () (SymIntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (UnionM (SymIntN n)) Source #

(KnownNat n, 1 <= n) => GenSymSimple () (SymIntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (SymIntN n) Source #

(KnownNat n, 1 <= n) => SafeDivision ArithException (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

safeDiv :: (MonadError ArithException uf, MonadUnion uf) => SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeMod :: (MonadError ArithException uf, MonadUnion uf) => SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeDivMod :: (MonadError ArithException uf, MonadUnion uf) => SymIntN n -> SymIntN n -> uf (SymIntN n, SymIntN n) Source #

safeQuot :: (MonadError ArithException uf, MonadUnion uf) => SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeRem :: (MonadError ArithException uf, MonadUnion uf) => SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeQuotRem :: (MonadError ArithException uf, MonadUnion uf) => SymIntN n -> SymIntN n -> uf (SymIntN n, SymIntN n) Source #

safeDiv' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeDivMod' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymIntN n -> SymIntN n -> uf (SymIntN n, SymIntN n) Source #

safeQuot' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeQuotRem' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymIntN n -> SymIntN n -> uf (SymIntN n, SymIntN n) Source #

(KnownNat n, 1 <= n) => SafeLinearArith ArithException (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

safeAdd :: (MonadError ArithException uf, MonadUnion uf) => SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeNeg :: (MonadError ArithException uf, MonadUnion uf) => SymIntN n -> uf (SymIntN n) Source #

safeMinus :: (MonadError ArithException uf, MonadUnion uf) => SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeAdd' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

safeNeg' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymIntN n -> uf (SymIntN n) Source #

safeMinus' :: (MonadError e' uf, MonadUnion uf, Mergeable e') => (ArithException -> e') -> SymIntN n -> SymIntN n -> uf (SymIntN n) Source #

ToSym Int16 (SymIntN 16) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Int16 -> SymIntN 16 Source #

ToSym Int32 (SymIntN 32) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Int32 -> SymIntN 32 Source #

ToSym Int64 (SymIntN 64) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Int64 -> SymIntN 64 Source #

ToSym Int8 (SymIntN 8) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Int8 -> SymIntN 8 Source #

ToSym Int (SymIntN 64) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: Int -> SymIntN 64 Source #

(KnownNat n, 1 <= n) => IsString (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

fromString :: String -> SymIntN n #

(KnownNat n, 1 <= n) => Bits (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Generic (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type Rep (SymIntN n) :: Type -> Type #

Methods

from :: SymIntN n -> Rep (SymIntN n) x #

to :: Rep (SymIntN n) x -> SymIntN n #

(KnownNat n, 1 <= n) => Num (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

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

(-) :: SymIntN n -> SymIntN n -> SymIntN n #

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

negate :: SymIntN n -> SymIntN n #

abs :: SymIntN n -> SymIntN n #

signum :: SymIntN n -> SymIntN n #

fromInteger :: Integer -> SymIntN n #

(KnownNat n, 1 <= n) => Show (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

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

show :: SymIntN n -> String #

showList :: [SymIntN n] -> ShowS #

NFData (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

rnf :: SymIntN n -> () #

(KnownNat n, 1 <= n) => Eq (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

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

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

(KnownNat n, 1 <= n) => ITEOp (SymIntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

Methods

ites :: SymBool -> SymIntN n -> SymIntN n -> SymIntN n Source #

(KnownNat n, 1 <= n) => SEq (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => EvaluateSym (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

evaluateSym :: Bool -> Model -> SymIntN n -> SymIntN n Source #

(KnownNat n, 1 <= n) => ExtractSymbolics (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => Mergeable (SymIntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

(KnownNat n, 1 <= n) => SOrd (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => SimpleMergeable (SymIntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> SymIntN n -> SymIntN n -> SymIntN n Source #

(KnownNat n, 1 <= n) => SubstituteSym (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

substituteSym :: LinkedRep cb sb => TypedSymbol cb -> sb -> SymIntN n -> SymIntN n Source #

(KnownNat n, 1 <= n) => ConRep (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType (SymIntN n) Source #

(KnownNat n, 1 <= n) => AllSyms (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => Hashable (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

hashWithSalt :: Int -> SymIntN n -> Int #

hash :: SymIntN n -> Int #

ToCon (SymIntN 8) Int8 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymIntN 8 -> Maybe Int8 Source #

ToCon (SymIntN 16) Int16 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymIntN 16 -> Maybe Int16 Source #

ToCon (SymIntN 32) Int32 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymIntN 32 -> Maybe Int32 Source #

ToCon (SymIntN 64) Int64 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymIntN 64 -> Maybe Int64 Source #

ToCon (SymIntN 64) Int Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymIntN 64 -> Maybe Int Source #

(KnownNat n, 1 <= n) => GenSym (SymIntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => SymIntN n -> m (UnionM (SymIntN n)) Source #

(KnownNat n, 1 <= n) => GenSymSimple (SymIntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => SymIntN n -> m (SymIntN n) Source #

(KnownNat n, 1 <= n) => Solvable (IntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

con :: IntN n -> SymIntN n Source #

conView :: SymIntN n -> Maybe (IntN n) Source #

ssym :: String -> SymIntN n Source #

isym :: String -> Int -> SymIntN n Source #

sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> SymIntN n Source #

iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> SymIntN n Source #

(KnownNat n, 1 <= n) => ToCon (SymIntN n) (IntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymIntN n -> Maybe (IntN n) Source #

(KnownNat n, 1 <= n) => ToCon (SymIntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: SymIntN n -> Maybe (SymIntN n) Source #

(KnownNat n, 1 <= n) => ToSym (UnionM (IntN n)) (SymIntN n) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

toSym :: UnionM (IntN n) -> SymIntN n Source #

(KnownNat n, 1 <= n) => ToSym (IntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: IntN n -> SymIntN n Source #

(KnownNat n, 1 <= n) => ToSym (SymIntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: SymIntN n -> SymIntN n Source #

(KnownNat n, 1 <= n) => LinkedRep (IntN n) (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Lift (SymIntN n :: TYPE LiftedRep) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

lift :: Quote m => SymIntN n -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SymIntN n -> Code m (SymIntN n) #

type Rep (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type Rep (SymIntN n) = D1 ('MetaData "SymIntN" "Grisette.IR.SymPrim.Data.SymPrim" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'True) (C1 ('MetaCons "SymIntN" 'PrefixI 'True) (S1 ('MetaSel ('Just "underlyingIntNTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term (IntN n)))))
type ConType (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type ConType (SymIntN n) = IntN n

data SomeSymWordN where Source #

Symbolic unsigned bit vector type. Not indexed, but the bit width is fixed at the creation time.

A SomeSymWordN must be created by wrapping a SymWordN with the SomeSymWordN constructor to fix the bit width:

>>> (SomeSymWordN ("a" :: SymWordN 5))
a
>>> :set -XOverloadedStrings -XDataKinds -XBinaryLiterals
>>> (SomeSymWordN ("a" :: SymWordN 5)) + (SomeSymWordN (5 :: SymWordN 5))
(+ 0b00101 a)
>>> someBVConcat (SomeSymWordN (con 0b101 :: SymWordN 3)) (SomeSymWordN (con 0b110 :: SymWordN 3))
0b101110

More symbolic operations are available. Please refer to the documentation for the type class instances.

Constructors

SomeSymWordN :: (KnownNat n, 1 <= n) => SymWordN n -> SomeSymWordN 

Instances

Instances details
Bits SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Num SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Show SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Eq SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

SomeBV SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

someBVConcat :: SomeSymWordN -> SomeSymWordN -> SomeSymWordN Source #

someBVZext :: forall p (l :: Nat). KnownNat l => p l -> SomeSymWordN -> SomeSymWordN Source #

someBVSext :: forall p (l :: Nat). KnownNat l => p l -> SomeSymWordN -> SomeSymWordN Source #

someBVExt :: forall p (l :: Nat). KnownNat l => p l -> SomeSymWordN -> SomeSymWordN Source #

someBVSelect :: forall p (ix :: Nat) q (w :: Nat). (KnownNat ix, KnownNat w) => p ix -> q w -> SomeSymWordN -> SomeSymWordN Source #

ITEOp SomeSymWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

SEq SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

EvaluateSym SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ExtractSymbolics SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Mergeable SomeSymWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

SOrd SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

SimpleMergeable SomeSymWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.SimpleMergeable

SubstituteSym SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Hashable SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

GenSym SomeSymWordN SomeSymWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

GenSymSimple SomeSymWordN SomeSymWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

ToCon SomeSymWordN SomeWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToCon SomeSymWordN SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Word16 SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Word32 SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Word64 SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Word8 SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym SomeWordN SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym SomeSymWordN SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Word SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => GenSym (p n) SomeSymWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => p n -> m (UnionM SomeSymWordN) Source #

(KnownNat n, 1 <= n) => GenSymSimple (p n) SomeSymWordN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => p n -> m SomeSymWordN Source #

ToSym (UnionM SomeWordN) SomeSymWordN Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

(KnownNat n, 1 <= n) => ToSym (WordN n) SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

data SomeSymIntN where Source #

Symbolic signed bit vector type. Not indexed, but the bit width is fixed at the creation time.

A SomeSymIntN must be created by wrapping a SymIntN with the SomeSymIntN constructor to fix the bit width:

>>> (SomeSymIntN ("a" :: SymIntN 5))
a
>>> :set -XOverloadedStrings -XDataKinds -XBinaryLiterals
>>> (SomeSymIntN ("a" :: SymIntN 5)) + (SomeSymIntN (5 :: SymIntN 5))
(+ 0b00101 a)
>>> someBVConcat (SomeSymIntN (con 0b101 :: SymIntN 3)) (SomeSymIntN (con 0b110 :: SymIntN 3))
0b101110

More symbolic operations are available. Please refer to the documentation for the type class instances.

Constructors

SomeSymIntN :: (KnownNat n, 1 <= n) => SymIntN n -> SomeSymIntN 

Instances

Instances details
Bits SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Num SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Show SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Eq SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

SomeBV SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

someBVConcat :: SomeSymIntN -> SomeSymIntN -> SomeSymIntN Source #

someBVZext :: forall p (l :: Nat). KnownNat l => p l -> SomeSymIntN -> SomeSymIntN Source #

someBVSext :: forall p (l :: Nat). KnownNat l => p l -> SomeSymIntN -> SomeSymIntN Source #

someBVExt :: forall p (l :: Nat). KnownNat l => p l -> SomeSymIntN -> SomeSymIntN Source #

someBVSelect :: forall p (ix :: Nat) q (w :: Nat). (KnownNat ix, KnownNat w) => p ix -> q w -> SomeSymIntN -> SomeSymIntN Source #

ITEOp SomeSymIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

SEq SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

EvaluateSym SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ExtractSymbolics SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Mergeable SomeSymIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

SOrd SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

SimpleMergeable SomeSymIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.SimpleMergeable

SubstituteSym SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Hashable SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

GenSym SomeSymIntN SomeSymIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

GenSymSimple SomeSymIntN SomeSymIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

ToCon SomeSymIntN SomeIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToCon SomeSymIntN SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Int16 SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Int32 SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Int64 SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Int8 SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym SomeIntN SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym SomeSymIntN SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

ToSym Int SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => GenSym (p n) SomeSymIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => p n -> m (UnionM SomeSymIntN) Source #

(KnownNat n, 1 <= n) => GenSymSimple (p n) SomeSymIntN Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => p n -> m SomeSymIntN Source #

ToSym (UnionM SomeIntN) SomeSymIntN Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

(KnownNat n, 1 <= n) => ToSym (IntN n) SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: IntN n -> SomeSymIntN Source #

data sa =~> sb where infixr 0 Source #

Symbolic tabular function type.

>>> :set -XTypeOperators -XOverloadedStrings
>>> f' = "f" :: SymInteger =~> SymInteger
>>> f = (f' #)
>>> f 1
(apply f 1)
>>> f' = con (TabularFun [(1, 2), (2, 3)] 4) :: SymInteger =~> SymInteger
>>> f = (f' #)
>>> f 1
2
>>> f 2
3
>>> f 3
4
>>> f "b"
(ite (= b 1) 2 (ite (= b 2) 3 4))

Constructors

SymTabularFun :: (LinkedRep ca sa, LinkedRep cb sb) => Term (ca =-> cb) -> sa =~> sb 

Instances

Instances details
(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => GenSym () (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (UnionM (sa =~> sb)) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => GenSymSimple () (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (sa =~> sb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (UnionM (ca =-> cb)) (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

toSym :: UnionM (ca =-> cb) -> sa =~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => IsString (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

fromString :: String -> sa =~> sb #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Show (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

showsPrec :: Int -> (sa =~> sb) -> ShowS #

show :: (sa =~> sb) -> String #

showList :: [sa =~> sb] -> ShowS #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Eq (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

(==) :: (sa =~> sb) -> (sa =~> sb) -> Bool #

(/=) :: (sa =~> sb) -> (sa =~> sb) -> Bool #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ITEOp (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

Methods

ites :: SymBool -> (sa =~> sb) -> (sa =~> sb) -> sa =~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => EvaluateSym (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

evaluateSym :: Bool -> Model -> (sa =~> sb) -> sa =~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ExtractSymbolics (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

extractSymbolics :: (sa =~> sb) -> SymbolSet Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Function (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type Arg (sa =~> sb) Source #

type Ret (sa =~> sb) Source #

Methods

(#) :: (sa =~> sb) -> Arg (sa =~> sb) -> Ret (sa =~> sb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Mergeable (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => SimpleMergeable (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (sa =~> sb) -> (sa =~> sb) -> sa =~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => SubstituteSym (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

substituteSym :: LinkedRep cb sb0 => TypedSymbol cb -> sb0 -> (sa =~> sb) -> sa =~> sb Source #

(ConRep a, ConRep b) => ConRep (a =~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType (a =~> b) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => AllSyms (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: (sa =~> sb) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (sa =~> sb) -> [SomeSym] Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Hashable (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

hashWithSalt :: Int -> (sa =~> sb) -> Int #

hash :: (sa =~> sb) -> Int #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => GenSym (sa =~> sb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (sa =~> sb) -> m (UnionM (sa =~> sb)) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => GenSymSimple (sa =~> sb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => (sa =~> sb) -> m (sa =~> sb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Solvable (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

con :: (ca =-> cb) -> sa =~> sb Source #

conView :: (sa =~> sb) -> Maybe (ca =-> cb) Source #

ssym :: String -> sa =~> sb Source #

isym :: String -> Int -> sa =~> sb Source #

sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> sa =~> sb Source #

iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> sa =~> sb Source #

(SupportedPrim a, SupportedPrim b) => ToCon (a =~> b) (a =~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: (a =~> b) -> Maybe (a =~> b) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToCon (sa =~> sb) (ca =-> cb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: (sa =~> sb) -> Maybe (ca =-> cb) Source #

(SupportedPrim a, SupportedPrim b) => ToSym (a =~> b) (a =~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: (a =~> b) -> a =~> b Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: (ca =-> cb) -> sa =~> sb Source #

(LinkedRep ca sa, LinkedRep cb sb) => LinkedRep (ca =-> cb) (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

underlyingTerm :: (sa =~> sb) -> Term (ca =-> cb) Source #

wrapTerm :: Term (ca =-> cb) -> sa =~> sb Source #

type Arg (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type Arg (sa =~> sb) = sa
type Ret (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type Ret (sa =~> sb) = sb
type ConType (a =~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type ConType (a =~> b) = ConType a =-> ConType b

data sa -~> sb where infixr 0 Source #

Symbolic general function type.

>>> :set -XTypeOperators -XOverloadedStrings
>>> f' = "f" :: SymInteger -~> SymInteger
>>> f = (f' #)
>>> f 1
(apply f 1)
>>> f' = con ("a" --> "a" + 1) :: SymInteger -~> SymInteger
>>> f'
\(a:ARG :: Integer) -> (+ 1 a:ARG)
>>> f = (f' #)
>>> f 1
2
>>> f 2
3
>>> f 3
4
>>> f "b"
(+ 1 b)

Constructors

SymGeneralFun :: (LinkedRep ca sa, LinkedRep cb sb) => Term (ca --> cb) -> sa -~> sb 

Instances

Instances details
(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => GenSym () (sa -~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (UnionM (sa -~> sb)) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => GenSymSimple () (sa -~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (sa -~> sb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (UnionM (ca --> cb)) (sa -~> sb) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

Methods

toSym :: UnionM (ca --> cb) -> sa -~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => IsString (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

fromString :: String -> sa -~> sb #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Show (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

showsPrec :: Int -> (sa -~> sb) -> ShowS #

show :: (sa -~> sb) -> String #

showList :: [sa -~> sb] -> ShowS #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Eq (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

(==) :: (sa -~> sb) -> (sa -~> sb) -> Bool #

(/=) :: (sa -~> sb) -> (sa -~> sb) -> Bool #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ITEOp (sa -~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Bool

Methods

ites :: SymBool -> (sa -~> sb) -> (sa -~> sb) -> sa -~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => EvaluateSym (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

evaluateSym :: Bool -> Model -> (sa -~> sb) -> sa -~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ExtractSymbolics (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

extractSymbolics :: (sa -~> sb) -> SymbolSet Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Function (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type Arg (sa -~> sb) Source #

type Ret (sa -~> sb) Source #

Methods

(#) :: (sa -~> sb) -> Arg (sa -~> sb) -> Ret (sa -~> sb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Mergeable (sa -~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.Mergeable

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => SimpleMergeable (sa -~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (sa -~> sb) -> (sa -~> sb) -> sa -~> sb Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => SubstituteSym (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

substituteSym :: LinkedRep cb sb0 => TypedSymbol cb -> sb0 -> (sa -~> sb) -> sa -~> sb Source #

(ConRep a, ConRep b) => ConRep (a -~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Associated Types

type ConType (a -~> b) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => AllSyms (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: (sa -~> sb) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (sa -~> sb) -> [SomeSym] Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Hashable (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

hashWithSalt :: Int -> (sa -~> sb) -> Int #

hash :: (sa -~> sb) -> Int #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => GenSym (sa -~> sb) (sa -~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (sa -~> sb) -> m (UnionM (sa -~> sb)) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => GenSymSimple (sa -~> sb) (sa -~> sb) Source # 
Instance details

Defined in Grisette.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => (sa -~> sb) -> m (sa -~> sb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => Solvable (ca --> cb) (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

con :: (ca --> cb) -> sa -~> sb Source #

conView :: (sa -~> sb) -> Maybe (ca --> cb) Source #

ssym :: String -> sa -~> sb Source #

isym :: String -> Int -> sa -~> sb Source #

sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> sa -~> sb Source #

iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> sa -~> sb Source #

(SupportedPrim a, SupportedPrim b) => ToCon (a -~> b) (a -~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: (a -~> b) -> Maybe (a -~> b) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToCon (sa -~> sb) (ca --> cb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toCon :: (sa -~> sb) -> Maybe (ca --> cb) Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => ToSym (ca --> cb) (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: (ca --> cb) -> sa -~> sb Source #

(SupportedPrim a, SupportedPrim b) => ToSym (a -~> b) (a -~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

toSym :: (a -~> b) -> a -~> b Source #

(LinkedRep ca sa, LinkedRep cb sb) => LinkedRep (ca --> cb) (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

underlyingTerm :: (sa -~> sb) -> Term (ca --> cb) Source #

wrapTerm :: Term (ca --> cb) -> sa -~> sb Source #

type Arg (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type Arg (sa -~> sb) = sa
type Ret (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type Ret (sa -~> sb) = sb
type ConType (a -~> b) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

type ConType (a -~> b) = ConType a --> ConType b

data TypedSymbol t where Source #

A typed symbol is a symbol that is associated with a type. Note that the same symbol bodies with different types are considered different symbols and can coexist in a term.

Simple symbols can be created with the OverloadedStrings extension:

>>> :set -XOverloadedStrings
>>> "a" :: TypedSymbol Bool
a :: Bool

Constructors

SimpleSymbol :: SupportedPrim t => String -> TypedSymbol t 
IndexedSymbol :: SupportedPrim t => String -> Int -> TypedSymbol t 
WithInfo :: forall t a. (SupportedPrim t, Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => TypedSymbol t -> a -> TypedSymbol t 

Instances

Instances details
SymbolSetOps SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

ModelOps Model SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Lift (TypedSymbol t :: Type) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Methods

lift :: Quote m => TypedSymbol t -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => TypedSymbol t -> Code m (TypedSymbol t) #

SupportedPrim t => IsString (TypedSymbol t) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Show (TypedSymbol t) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

NFData (TypedSymbol t) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Methods

rnf :: TypedSymbol t -> () #

Eq (TypedSymbol t) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Ord (TypedSymbol t) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Hashable (TypedSymbol t) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term

Methods

hashWithSalt :: Int -> TypedSymbol t -> Int #

hash :: TypedSymbol t -> Int #

SymbolSetRep (TypedSymbol t) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d, TypedSymbol e) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d, TypedSymbol e, TypedSymbol f) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d, TypedSymbol e, TypedSymbol f, TypedSymbol g) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d, TypedSymbol e, TypedSymbol f, TypedSymbol g, TypedSymbol h) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

symSize :: forall con sym. LinkedRep con sym => sym -> Int Source #

Get the size of a symbolic term. Duplicate sub-terms are counted for only once.

>>> symSize (1 :: SymInteger)
1
>>> symSize ("a" :: SymInteger)
1
>>> symSize ("a" + 1 :: SymInteger)
3
>>> symSize (("a" + 1) * ("a" + 1) :: SymInteger)
4

symsSize :: forall con sym. LinkedRep con sym => [sym] -> Int Source #

Get the sum of the sizes of a list of symbolic terms. Duplicate sub-terms are counted for only once.

>>> symsSize [1, "a" :: SymInteger, "a" + 1 :: SymInteger]
3

class AllSyms a where Source #

Extract all symbolic primitive values that are represented as SMT terms.

Note: This type class can be derived for algebraic data types. You may need the DerivingVia and DerivingStrategies extenstions.

data X = ... deriving Generic deriving AllSyms via (Default X)

Minimal complete definition

allSymsS | allSyms

Methods

allSymsS :: a -> [SomeSym] -> [SomeSym] Source #

Convert a value to a list of symbolic primitive values. It should prepend to an existing list of symbolic primitive values.

allSyms :: a -> [SomeSym] Source #

Specialized allSymsS that prepends to an empty list.

Instances

Instances details
AllSyms Int16 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Int32 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Int64 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Int8 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Word16 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Word32 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Word64 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Word8 Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms ByteString Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms AssertionError Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms VerificationConditions Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms SomeSymIntN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms SomeSymWordN Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms SymBool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms SymInteger Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Integer Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms () Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: () -> [SomeSym] -> [SomeSym] Source #

allSyms :: () -> [SomeSym] Source #

AllSyms Bool Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Char Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Int Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms Word Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms a => AllSyms (Identity a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(Generic a, AllSyms' (Rep a)) => AllSyms (Default a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms a => AllSyms (UnionM a) Source # 
Instance details

Defined in Grisette.Core.Control.Monad.UnionM

AllSyms a => AllSyms (Union a) Source # 
Instance details

Defined in Grisette.Core.Data.Union

Methods

allSymsS :: Union a -> [SomeSym] -> [SomeSym] Source #

allSyms :: Union a -> [SomeSym] Source #

(KnownNat n, 1 <= n) => AllSyms (SymIntN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

(KnownNat n, 1 <= n) => AllSyms (SymWordN n) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: Maybe a -> [SomeSym] -> [SomeSym] Source #

allSyms :: Maybe a -> [SomeSym] Source #

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: [a] -> [SomeSym] -> [SomeSym] Source #

allSyms :: [a] -> [SomeSym] Source #

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: Either a b -> [SomeSym] -> [SomeSym] Source #

allSyms :: Either a b -> [SomeSym] Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => AllSyms (sa -~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: (sa -~> sb) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (sa -~> sb) -> [SomeSym] Source #

(SupportedPrim ca, SupportedPrim cb, LinkedRep ca sa, LinkedRep cb sb) => AllSyms (sa =~> sb) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: (sa =~> sb) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (sa =~> sb) -> [SomeSym] Source #

AllSyms (m (Maybe a)) => AllSyms (MaybeT m a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: MaybeT m a -> [SomeSym] -> [SomeSym] Source #

allSyms :: MaybeT m a -> [SomeSym] Source #

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: (a, b) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b) -> [SomeSym] Source #

AllSyms (m (Either e a)) => AllSyms (ExceptT e m a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: ExceptT e m a -> [SomeSym] -> [SomeSym] Source #

allSyms :: ExceptT e m a -> [SomeSym] Source #

AllSyms (m a) => AllSyms (IdentityT m a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

AllSyms (m (a, s)) => AllSyms (WriterT s m a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: WriterT s m a -> [SomeSym] -> [SomeSym] Source #

allSyms :: WriterT s m a -> [SomeSym] Source #

AllSyms (m (a, s)) => AllSyms (WriterT s m a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: WriterT s m a -> [SomeSym] -> [SomeSym] Source #

allSyms :: WriterT s m a -> [SomeSym] Source #

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: (a, b, c) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c) -> [SomeSym] Source #

(AllSyms (f a), AllSyms (g a)) => AllSyms (Sum f g a) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: Sum f g a -> [SomeSym] -> [SomeSym] Source #

allSyms :: Sum f g a -> [SomeSym] Source #

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: (a, b, c, d) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d) -> [SomeSym] Source #

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: (a, b, c, d, e) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e) -> [SomeSym] Source #

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

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

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

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

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

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

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

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

allSymsS :: (a, b, c, d, e, f, g, h) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e, f, g, h) -> [SomeSym] Source #

allSymsSize :: AllSyms a => a -> Int Source #

Get the total size of symbolic terms in a value. Duplicate sub-terms are counted for only once.

>>> allSymsSize ("a" :: SymInteger, "a" + "b" :: SymInteger, ("a" + "b") * "c" :: SymInteger)
5

Symbolic constant sets and models

newtype SymbolSet Source #

Symbolic constant set.

Instances

Instances details
Monoid SymbolSet Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Semigroup SymbolSet Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Generic SymbolSet Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Associated Types

type Rep SymbolSet :: Type -> Type #

Show SymbolSet Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Eq SymbolSet Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

ExtractSymbolics SymbolSet Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Hashable SymbolSet Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetOps SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

ModelOps Model SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol t) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d, TypedSymbol e) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d, TypedSymbol e, TypedSymbol f) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d, TypedSymbol e, TypedSymbol f, TypedSymbol g) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

SymbolSetRep (TypedSymbol a, TypedSymbol b, TypedSymbol c, TypedSymbol d, TypedSymbol e, TypedSymbol f, TypedSymbol g, TypedSymbol h) SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

type Rep SymbolSet Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

type Rep SymbolSet = D1 ('MetaData "SymbolSet" "Grisette.IR.SymPrim.Data.Prim.Model" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'True) (C1 ('MetaCons "SymbolSet" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSymbolSet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HashSet SomeTypedSymbol))))

newtype Model Source #

Model returned by the solver.

Instances

Instances details
Monoid Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

mempty :: Model #

mappend :: Model -> Model -> Model #

mconcat :: [Model] -> Model #

Semigroup Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

(<>) :: Model -> Model -> Model #

sconcat :: NonEmpty Model -> Model #

stimes :: Integral b => b -> Model -> Model #

Generic Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Associated Types

type Rep Model :: Type -> Type #

Methods

from :: Model -> Rep Model x #

to :: Rep Model x -> Model #

Show Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

showsPrec :: Int -> Model -> ShowS #

show :: Model -> String #

showList :: [Model] -> ShowS #

Eq Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

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

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

Hashable Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

hashWithSalt :: Int -> Model -> Int #

hash :: Model -> Int #

ModelOps Model SymbolSet TypedSymbol Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

ModelRep (ModelValuePair t) Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

ModelRep (ModelSymPair ct st) Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

buildModel :: ModelSymPair ct st -> Model Source #

(ModelRep a Model, ModelRep b Model) => ModelRep (a, b) Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

buildModel :: (a, b) -> Model Source #

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

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

buildModel :: (a, b, c) -> Model Source #

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

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

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

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

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

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

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

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

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

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

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

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

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

Defined in Grisette.IR.SymPrim.Data.Prim.Model

Methods

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

type Rep Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

type Rep Model = D1 ('MetaData "Model" "Grisette.IR.SymPrim.Data.Prim.Model" "grisette-0.2.0.0-CYZZ7WjRTnw1wxrPITB8ce" 'True) (C1 ('MetaCons "Model" 'PrefixI 'True) (S1 ('MetaSel ('Just "unModel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HashMap SomeTypedSymbol ModelValue))))

data ModelValuePair t Source #

A type used for building a model by hand.

>>> buildModel ("x" ::= (1 :: Integer), "y" ::= True) :: Model
Model {x -> 1 :: Integer, y -> True :: Bool}

Constructors

(TypedSymbol t) ::= t 

Instances

Instances details
Show t => Show (ModelValuePair t) Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

ModelRep (ModelValuePair t) Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.Prim.Model

data ModelSymPair ct st where Source #

A pair of a symbolic constant and its value. This is used to build a model from a list of symbolic constants and their values.

>>> buildModel ("a" := (1 :: Integer), "b" := True) :: Model
Model {a -> 1 :: Integer, b -> True :: Bool}

Constructors

(:=) :: LinkedRep ct st => st -> ct -> ModelSymPair ct st 

Instances

Instances details
ModelRep (ModelSymPair ct st) Model Source # 
Instance details

Defined in Grisette.IR.SymPrim.Data.SymPrim

Methods

buildModel :: ModelSymPair ct st -> Model Source #