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.Data.SymPrim

Description

 
Synopsis

Documentation

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

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

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 #

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

data SomeSym where Source #

Some symbolic value with LinkedRep constraint.

Constructors

SomeSym :: LinkedRep con sym => sym -> SomeSym 

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

unarySomeSymIntN :: (forall n. (KnownNat n, 1 <= n) => SymIntN n -> r) -> String -> SomeSymIntN -> r Source #

unarySomeSymIntNR1 :: (forall n. (KnownNat n, 1 <= n) => SymIntN n -> SymIntN n) -> String -> SomeSymIntN -> SomeSymIntN Source #

binSomeSymIntN :: (forall n. (KnownNat n, 1 <= n) => SymIntN n -> SymIntN n -> r) -> String -> SomeSymIntN -> SomeSymIntN -> r Source #

binSomeSymIntNR1 :: (forall n. (KnownNat n, 1 <= n) => SymIntN n -> SymIntN n -> SymIntN n) -> String -> SomeSymIntN -> SomeSymIntN -> SomeSymIntN Source #

unarySomeSymWordN :: (forall n. (KnownNat n, 1 <= n) => SymWordN n -> r) -> String -> SomeSymWordN -> r Source #

binSomeSymWordN :: (forall n. (KnownNat n, 1 <= n) => SymWordN n -> SymWordN n -> r) -> String -> SomeSymWordN -> SomeSymWordN -> r Source #

Orphan instances

SymRep Integer Source # 
Instance details

Associated Types

type SymType Integer Source #

SymRep Bool Source # 
Instance details

Associated Types

type SymType Bool Source #

LinkedRep Integer SymInteger Source # 
Instance details

LinkedRep Bool SymBool Source # 
Instance details

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

Associated Types

type SymType (IntN n) Source #

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

Associated Types

type SymType (WordN n) Source #

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

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

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

Associated Types

type SymType (ca --> cb) Source #

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

Associated Types

type SymType (a =-> b) Source #

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

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

Methods

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

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