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

Grisette.Internal.SymPrim.AllSyms

Description

 
Synopsis

Get all symbolic primitive values in a value

data SomeSym where Source #

Some symbolic value with LinkedRep constraint.

Constructors

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

Instances

Instances details
Show SomeSym Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

class AllSyms a where Source #

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

>>> allSyms (["a" + 1 :: SymInteger, -"b"], "c" :: SymBool)
[(+ 1 a),(- b),c]

This is usually used for getting a statistical summary of the size of a symbolic value with allSymsSize.

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.Internal.SymPrim.AllSyms

AllSyms Int32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Int64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Int8 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Word16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Word32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Word64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Word8 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms ByteString Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms AssertionError Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms AlgReal Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymAlgReal

AllSyms SymBool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBool

AllSyms SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

AllSyms SymInteger Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymInteger

AllSyms Text Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Integer Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms () Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

AllSyms Bool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Char Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Double Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Float Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Int Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

AllSyms Word Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

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

Defined in Grisette.Internal.SymPrim.AllSyms

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

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

Defined in Grisette.Internal.SymPrim.AllSyms

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

Defined in Grisette.Internal.Core.Control.Monad.Union

Methods

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

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

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

Defined in Grisette.Internal.Core.Data.UnionBase

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: IntN n -> [SomeSym] -> [SomeSym] Source #

allSyms :: IntN n -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: WordN n -> [SomeSym] -> [SomeSym] Source #

allSyms :: WordN n -> [SomeSym] Source #

(forall (n :: Nat). (KnownNat n, 1 <= n) => AllSyms (bv n)) => AllSyms (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

allSymsS :: SomeBV bv -> [SomeSym] -> [SomeSym] Source #

allSyms :: SomeBV bv -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.SymBV

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

Defined in Grisette.Internal.SymPrim.SymBV

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

(Generic1 f, GAllSyms Arity1 (Rep1 f), AllSyms a) => AllSyms (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

ValidFP eb sb => AllSyms (FP eb sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: FP eb sb -> [SomeSym] -> [SomeSym] Source #

allSyms :: FP eb sb -> [SomeSym] Source #

ValidFP eb sb => AllSyms (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Methods

allSymsS :: SymFP eb sb -> [SomeSym] -> [SomeSym] Source #

allSyms :: SymFP eb sb -> [SomeSym] Source #

AllSyms (sa -~> sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymGeneralFun

Methods

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

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

AllSyms (sa =~> sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymTabularFun

Methods

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

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

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

Defined in Grisette.Internal.SymPrim.AllSyms

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.Internal.SymPrim.AllSyms

Methods

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

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

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

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

Defined in Grisette.Internal.SymPrim.AllSyms

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

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

Defined in Grisette.Internal.SymPrim.AllSyms

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.Internal.SymPrim.AllSyms

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.Internal.SymPrim.AllSyms

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.Internal.SymPrim.AllSyms

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.Internal.SymPrim.AllSyms

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.Internal.SymPrim.AllSyms

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.Internal.SymPrim.AllSyms

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.Internal.SymPrim.AllSyms

Methods

allSymsS :: (a, b, c, d, e, f, g, h) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e, f, g, h) -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: (a, b, c, d, e, f, g, h, i) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e, f, g, h, i) -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j) => AllSyms (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: (a, b, c, d, e, f, g, h, i, j) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e, f, g, h, i, j) -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j, AllSyms k) => AllSyms (a, b, c, d, e, f, g, h, i, j, k) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: (a, b, c, d, e, f, g, h, i, j, k) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e, f, g, h, i, j, k) -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j, AllSyms k, AllSyms l) => AllSyms (a, b, c, d, e, f, g, h, i, j, k, l) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: (a, b, c, d, e, f, g, h, i, j, k, l) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e, f, g, h, i, j, k, l) -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j, AllSyms k, AllSyms l, AllSyms m) => AllSyms (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j, AllSyms k, AllSyms l, AllSyms m, AllSyms n) => AllSyms (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j, AllSyms k, AllSyms l, AllSyms m, AllSyms n, AllSyms o) => AllSyms (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

allSymsS :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> [SomeSym] -> [SomeSym] Source #

allSyms :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> [SomeSym] Source #

class (forall a. AllSyms a => AllSyms (f a)) => AllSyms1 f where Source #

Lifting of the AllSyms class to unary type constructors.

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> f a -> [SomeSym] -> [SomeSym] Source #

Lift the allSymsS function to unary type constructors.

Instances

Instances details
AllSyms1 Identity Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> Identity a -> [SomeSym] -> [SomeSym] Source #

AllSyms1 Union Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.Union

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> Union a -> [SomeSym] -> [SomeSym] Source #

AllSyms1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Core.Data.UnionBase

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> UnionBase a -> [SomeSym] -> [SomeSym] Source #

AllSyms1 Maybe Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> Maybe a -> [SomeSym] -> [SomeSym] Source #

AllSyms1 List Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> [a] -> [SomeSym] -> [SomeSym] Source #

AllSyms a => AllSyms1 (Either a) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> Either a a0 -> [SomeSym] -> [SomeSym] Source #

(Generic1 f, GAllSyms Arity1 (Rep1 f)) => AllSyms1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> Default1 f a -> [SomeSym] -> [SomeSym] Source #

AllSyms1 m => AllSyms1 (MaybeT m) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> MaybeT m a -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, a0) -> [SomeSym] -> [SomeSym] Source #

(AllSyms1 m, AllSyms e) => AllSyms1 (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> ExceptT e m a -> [SomeSym] -> [SomeSym] Source #

AllSyms1 m => AllSyms1 (IdentityT m) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> IdentityT m a -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> WriterT s m a -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> WriterT s m a -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

(AllSyms1 f, AllSyms1 g) => AllSyms1 (Sum f g) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a -> [SomeSym] -> [SomeSym]) -> Sum f g a -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, a0) -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, a0) -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, a0) -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, f, a0) -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, f, g, a0) -> [SomeSym] -> [SomeSym] Source #

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, f, g, h, a0) -> [SomeSym] -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i) => AllSyms1 ((,,,,,,,,,) a b c d e f g h i) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, f, g, h, i, a0) -> [SomeSym] -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j) => AllSyms1 ((,,,,,,,,,,) a b c d e f g h i j) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, f, g, h, i, j, a0) -> [SomeSym] -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j, AllSyms k) => AllSyms1 ((,,,,,,,,,,,) a b c d e f g h i j k) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, f, g, h, i, j, k, a0) -> [SomeSym] -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j, AllSyms k, AllSyms l) => AllSyms1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> [SomeSym] -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j, AllSyms k, AllSyms l, AllSyms m) => AllSyms1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> [SomeSym] -> [SomeSym] Source #

(AllSyms a, AllSyms b, AllSyms c, AllSyms d, AllSyms e, AllSyms f, AllSyms g, AllSyms h, AllSyms i, AllSyms j, AllSyms k, AllSyms l, AllSyms m, AllSyms n) => AllSyms1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS :: (a0 -> [SomeSym] -> [SomeSym]) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> [SomeSym] -> [SomeSym] Source #

allSymsS1 :: (AllSyms1 f, AllSyms a) => f a -> [SomeSym] -> [SomeSym] Source #

Lift the standard allSymsS function to unary type constructors.

class (forall a. AllSyms a => AllSyms1 (f a)) => AllSyms2 f where Source #

Lifting of the AllSyms class to binary type constructors.

Methods

liftAllSymsS2 :: (a -> [SomeSym] -> [SomeSym]) -> (b -> [SomeSym] -> [SomeSym]) -> f a b -> [SomeSym] -> [SomeSym] Source #

Lift the allSymsS function to binary type constructors.

Instances

Instances details
AllSyms2 Either Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS2 :: (a -> [SomeSym] -> [SomeSym]) -> (b -> [SomeSym] -> [SomeSym]) -> Either a b -> [SomeSym] -> [SomeSym] Source #

AllSyms2 (,) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

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

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

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

liftAllSymsS2 :: (a0 -> [SomeSym] -> [SomeSym]) -> (b0 -> [SomeSym] -> [SomeSym]) -> (a, b, a0, b0) -> [SomeSym] -> [SomeSym] Source #

allSymsS2 :: (AllSyms2 f, AllSyms a, AllSyms b) => f a b -> [SomeSym] -> [SomeSym] Source #

Lift the standard allSymsS function to binary type constructors.

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

The 5 terms are a, b, (+ a b), c, and (* (+ a b) c).

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

Generic AllSyms

data family AllSymsArgs arity a :: Type Source #

The arguments to the generic AllSyms function.

Instances

Instances details
data AllSymsArgs Arity0 _ Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

newtype AllSymsArgs Arity1 a Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

newtype AllSymsArgs Arity1 a = AllSymsArgs1 (a -> [SomeSym] -> [SomeSym])

class GAllSyms arity f where Source #

The class of types that can generically extract all symbolic primitives.

Methods

gallSymsS :: AllSymsArgs arity a -> f a -> [SomeSym] -> [SomeSym] Source #

Instances

Instances details
GAllSyms Arity1 Par1 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

gallSymsS :: AllSymsArgs Arity1 a -> Par1 a -> [SomeSym] -> [SomeSym] Source #

GAllSyms arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

gallSymsS :: AllSymsArgs arity a -> U1 a -> [SomeSym] -> [SomeSym] Source #

GAllSyms arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

gallSymsS :: AllSymsArgs arity a -> V1 a -> [SomeSym] -> [SomeSym] Source #

AllSyms1 f => GAllSyms Arity1 (Rec1 f) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

gallSymsS :: AllSymsArgs Arity1 a -> Rec1 f a -> [SomeSym] -> [SomeSym] Source #

(GAllSyms arity a, GAllSyms arity b) => GAllSyms arity (a :*: b) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

gallSymsS :: AllSymsArgs arity a0 -> (a :*: b) a0 -> [SomeSym] -> [SomeSym] Source #

(GAllSyms arity a, GAllSyms arity b) => GAllSyms arity (a :+: b) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

gallSymsS :: AllSymsArgs arity a0 -> (a :+: b) a0 -> [SomeSym] -> [SomeSym] Source #

AllSyms c => GAllSyms arity (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

gallSymsS :: AllSymsArgs arity a -> K1 i c a -> [SomeSym] -> [SomeSym] Source #

(AllSyms1 f, GAllSyms Arity1 g) => GAllSyms Arity1 (f :.: g) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

gallSymsS :: AllSymsArgs Arity1 a -> (f :.: g) a -> [SomeSym] -> [SomeSym] Source #

GAllSyms arity a => GAllSyms arity (M1 i c a) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

Methods

gallSymsS :: AllSymsArgs arity a0 -> M1 i c a a0 -> [SomeSym] -> [SomeSym] Source #

genericAllSymsS :: (Generic a, GAllSyms Arity0 (Rep a)) => a -> [SomeSym] -> [SomeSym] Source #

Generic allSymsS function.

genericLiftAllSymsS :: (Generic1 f, GAllSyms Arity1 (Rep1 f)) => (a -> [SomeSym] -> [SomeSym]) -> f a -> [SomeSym] -> [SomeSym] Source #

Generic liftAllSymsS function.