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

Grisette.Core

Contents

Description

 
Synopsis

Organization of the module

The module is organized by first introducing symbolic values, which includes solvable (primitive) types and unsolvable (non-primitive) types. Solvable types are those directly supported by the underlying solver. Examples include symbolic Booleans (SymBool), integers (SymInteger), and bit vectors (SymWordN n). Other types are unsolvable. They need Union monadic container and Mergeable instances to be merged.

We will elaborate the internal details of the symbolic values in the documentation, but it is likely that you can skip them and directly go through the APIs and the operations to start using Grisette.

Various operations are provided for manipulating symbolic values, including solvable and unsolvable types. Apart from the basic operations for each type of symbolic values, we also provide generic operations for:

Additional tools for building symbolic evaluation based applications are also provided:

Finally some utilities, including helpers for deriving instances for the type classes are provided in this module.

Note for the examples in the documentation

The examples may assume a z3 solver available in PATH.

Introduction to symbolic values in Grisette

Symbolic evaluation primer

Grisette is a tool for performing symbolic evaluation on programs. With Grisette, you can construct your own symbolic DSL, and get the symbolic evaluator for it without the need of manually implementing the symbolic evaluation algorithms.

Symbolic evaluation is a technique that allows us to analyze all possible runs of a program by representing inputs (or the program itself) as symbolic values and evaluating the program to produce symbolic constraints over these values. These constraints can then be used to find concrete assignments to the symbolic values that meet certain criteria, such as triggering a bug in a verification task or satisfying a specification in a synthesis task.

For example, in the following pseudo code, suppose that we want to know whether the assertion at the end of the code will hold for all possible inputs:

a = input()
b = 4
if (a < 5) {
  b -= a
}
assert (b > 0)

We can represent the input a as a symbolic integer, and do symbolic evaluation for it. By exploring all possible program paths, we will know that the result for the condition in the assertion would then be a symbolic formula:

(ite (< a 5) (> (- 4 a) 0) (> 4 0)).

The original program violates the assertion when this formula is false. We can use a solver to ask whether this could happen, and solver will tell us that when a is 4, the assertion will not hold.

Our resulting formula captures the information about all possible program runs. One of the challenges of symbolic evaluation is the well-known path explosion problem, which occurs when traditional symbolic evaluation techniques evaluate and reason about the possible paths one-by-one. This can lead to exponential growth in the number of paths that need to be analyzed, making the process impractical for many tasks.

To address this issue, Grisette uses a technique called "path merging". In path merging, symbolic values are merged together in order to reduce the number of paths that need to be explored simultaneously. This can significantly improve the performance of symbolic evaluation, especially for tasks such as program synthesis that are prone to the path explosion problem. This path merging is done automatically by Grisette, with a set of symbolic values.

In Grisette, we make a distinction between two kinds of symbolic values: solvable types and unsolvable types. These two types of values are merged differently.

Solvable types (solver-primitive types)

Solvable types are types that are directly supported by the underlying solver and are represented as symbolic formulas. Examples include symbolic Booleans, integers and bit vectors. The values of solvable types can be fully merged into a single value, which can significantly reduce the number of paths that need to be explored.

For example, there are three symbolic Booleans a, b and c, in the following code, and a symbolic Boolean x is defined to be the result of a conditional expression:

x = if a then b else c -- pseudo code, not real Grisette code

The result would be a single symbolic integer formula:

>>> x = symIte "a" "b" "c" :: SymInteger -- real Grisette code
>>> x
(ite a b c)

If we further add 1 to x, we will not have to split to two paths, but we can directly construct a formula with the merged value:

>>> x + 1
(+ 1 (ite a b c))

Unsolvable types (non-solver-primitive types)

Unsolvable types, on the other hand, are types that are not directly supported by the solver and cannot be fully merged into a single formula. Examples include lists, algebraic data types, and concrete Haskell integer types. To symbolically evaluate values with unsolvable types, Grisette provides a symbolic union container (Union), which is a set of values guarded by their path conditions. The values of unsolvable types are partially merged in a symbolic union, which is essentially an if-then-else tree.

For example, assume that the lists have the type [SymBool]. In the following example, the result shows that [b] and [c] can be merged together in the same symbolic union because they have the same length:

x = if a then [b] else [c] -- pseudo code, not real Grisette code

Or, in real Grisette code:

>>> mrgIf "a" (return ["b"]) (return ["c"]) :: Union [SymBool]
{[(ite a b c)]}

Note that we are using mrgIf instead of symIte for Unions.

The second example shows that [b] and [c,d] cannot be merged together because they have different lengths:

if a then [b] else [c, d] -- pseudo code, not real Grisette code

In real Grisette code:

>>> mrgIf "a" (return ["b"]) (return ["c", "d"]) :: Union [SymBool]
{If a [b] [c,d]}

The following example is more complicated. To make the merging efficient, Grisette would maintain a representation invariant of the symbolic unions. In this case, the lists with length 1 should be placed at the then branch, and the lists with length 2 should be placed at the else branch.

x = if a1 then [b] else if a2 then [c, d] else [f] -- pseudo code, not real Grisette code

In real Grisette code:

>>> x = mrgIf "a1" (return ["b"]) (mrgIf "a2" (return ["c", "d"]) (return ["f"])) :: Union [SymBool]
>>> x
{If (|| a1 (! a2)) [(ite a1 b f)] [c,d]}

When we further operate on this partially merged values, we will need to split into multiple paths. For example, when we apply head onto the last result, and we will distribute head among the branches:

head x -- pseudo code, not real Grisette code
-- intermediate result: If (|| a1 (! a2)) (Single (head [(ite a1 b f)])) (Single (head [c,d]))
-- intermediate result: If (|| a1 (! a2)) (Single (ite a1 b f)) (Single c)

This "path splitting" is done with the monad instance of Union. The result is then merged into a single formula, and further operation on it won't have to split into multiple paths:

>>> x = mrgIf "a1" (return ["b"]) (mrgIf "a2" (return ["c", "d"]) (return ["f"])) :: Union [SymBool]
>>> :{
do
  v <- x             -- Path splitted with the (>>=)
  mrgReturn $ head v -- mrgReturn helps with the merging
:}
{(ite (|| a1 (! a2)) (ite a1 b f) c)}

Generally, merging the possible branches in a symbolic union can reduce the number of paths to be explored in the future, but can make the path conditions larger and harder to solve. To have a good balance between this, Grisette has built a hierarchical merging algorithm, which is configurable via MergingStrategy. For algebraic data types, we have prebuilt merging strategies via the derivation of the Mergeable type class (Also see GMergeable for detail of derivation). You only need to know the details of the merging algorithm if you are going to work with complex non-algebraic data types, or you'd like to configure the merging based on your domain knowledge to tweak the performance.

Solvable types

Grisette currently provides an implementation for the following solvable types:

The bit-width of bit vector types and floating point types have their are checked at compile time.

Grisette also provides runtime-checked versions of bit-vectors, which might be more convenient in many scenarios: SomeSymIntN and SomeSymWordN.

Values of a solvable type can consist of concrete values, symbolic constants (placeholders for concrete values that can be assigned by a solver to satisfy a formula), and complex symbolic formulas with symbolic operations. The Solvable type class provides a way to construct concrete values and symbolic constants.

Examples:

>>> con True :: SymBool -- a concrete value
true
>>> true :: SymBool -- via the LogicalOp instance
true
>>> 1 :: SymInteger -- via the Num instance
1
>>> ssym "a" :: SymBool -- a symbolic constant
a

With the OverloadedStrings GHC extension enabled, symbolic constants can also be constructed from strings.

>>> "a" :: SymBool
a

Symbolic operations are provided through a set of type classes, such as SymEq, SymOrd, and Num. Please check out the documentation for more details.

Examples:

>>> let a = "a" :: SymInteger
>>> let b = "b" :: SymInteger
>>> a .== b
(= a b)

Identifiers and symbols

data Identifier where Source #

Identifier type used for GenSym

The constructor is hidden intentionally. You can construct an identifier by:

  • a raw identifier

The following two expressions will refer to the same identifier (the solver won't distinguish them and would assign the same value to them). The user may need to use unique names to avoid unintentional identifier collision.

>>> identifier "a"
a
>>> "a" :: Identifier -- available when OverloadedStrings is enabled
a
  • bundle the identifier with some user provided information

Identifiers created with different name or different additional information will not be the same.

>>> withInfo "a" (1 :: Int)
a:1
  • bundle the calling file location with the identifier to ensure global uniqueness

Identifiers created at different locations will not be the same. The identifiers created at the same location will be the same.

>>> $$(withLoc "a") -- a sample result could be "a:<interactive>:18:4-18"
a:<interactive>:...

Constructors

Identifier :: Text -> Identifier 
IdentifierWithInfo :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => Identifier -> a -> Identifier 

Instances

Instances details
IsString Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Show Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

NFData Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

rnf :: Identifier -> () #

Eq Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Ord Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

PPrint Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Hashable Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Lift Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

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

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

data Symbol where Source #

Symbol types for a symbolic variable.

The symbols can be indexed with an integer.

Instances

Instances details
IsString Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

fromString :: String -> Symbol #

Generic Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Associated Types

type Rep Symbol :: Type -> Type #

Methods

from :: Symbol -> Rep Symbol x #

to :: Rep Symbol x -> Symbol #

Show Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

NFData Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

rnf :: Symbol -> () #

Eq Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

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

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

Ord Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

PPrint Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Symbol -> Doc ann Source #

pformatPrec :: Int -> Symbol -> Doc ann Source #

pformatList :: [Symbol] -> Doc ann Source #

Hashable Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

hashWithSalt :: Int -> Symbol -> Int #

hash :: Symbol -> Int #

Lift Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

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

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

type Rep Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

type Rep Symbol = D1 ('MetaData "Symbol" "Grisette.Internal.Core.Data.Symbol" "grisette-0.8.0.0-9ziui23pS5H4p62qxsVv1c" 'False) (C1 ('MetaCons "SimpleSymbol" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier)) :+: C1 ('MetaCons "IndexedSymbol" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

identifier :: Text -> Identifier Source #

Simple identifier. The same identifier refers to the same symbolic variable in the whole program.

The user may need to use unique identifiers to avoid unintentional identifier collision.

withInfo :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => Identifier -> a -> Identifier Source #

Identifier with extra information.

The same identifier with the same information refers to the same symbolic variable in the whole program.

The user may need to use unique identifiers or additional information to avoid unintentional identifier collision.

withLoc :: Identifier -> SpliceQ Identifier Source #

Identifier with the current location as extra information.

>>> $$(withLoc "a") -- a sample result could be "a:<interactive>:18:4-18"
a:<interactive>:...

The uniqueness is ensured for the call to identifier at different location.

uniqueIdentifier :: Text -> IO Identifier Source #

Get a globally unique identifier within the IO monad.

simple :: Identifier -> Symbol Source #

Create a simple symbol.

indexed :: Identifier -> Int -> Symbol Source #

Create an indexed symbol.

symbolIdentifier :: Symbol -> Identifier Source #

Get the identifier of a symbol.

modifyIdentifier :: (Identifier -> Identifier) -> Symbol -> Symbol Source #

Modify the identifier of a symbol.

Creation and extraction of solvable values

class IsString t => Solvable c t | t -> c where Source #

The class defines the creation and pattern matching of solvable type values.

Minimal complete definition

con, conView, sym

Methods

con :: c -> t Source #

Wrap a concrete value in a symbolic value.

>>> con True :: SymBool
true

conView :: t -> Maybe c Source #

Extract the concrete value from a symbolic value.

>>> conView (con True :: SymBool)
Just True
>>> conView (ssym "a" :: SymBool)
Nothing

sym :: Symbol -> t Source #

Generate symbolic constants.

Two symbolic constants with the same symbol are the same symbolic constant, and will always be assigned with the same value by the solver.

>>> sym "a" :: SymBool
a
>>> (sym "a" :: SymBool) == sym "a"
True
>>> (sym "a" :: SymBool) == sym "b"
False
>>> (sym "a" :: SymBool) .&& sym "a"
a
>>> (sym "a" :: SymBool) == isym "a" 1
False

ssym :: Identifier -> t Source #

Generate simply-named symbolic constants.

Two symbolic constants with the same identifier are the same symbolic constant, and will always be assigned with the same value by the solver.

>>> ssym "a" :: SymBool
a
>>> (ssym "a" :: SymBool) == ssym "a"
True
>>> (ssym "a" :: SymBool) == ssym "b"
False
>>> (ssym "a" :: SymBool) .&& ssym "a"
a

isym :: Identifier -> Int -> t Source #

Generate indexed symbolic constants.

Two symbolic constants with the same identifier but different indices are not the same symbolic constants.

>>> isym "a" 1 :: SymBool
a@1

Instances

Instances details
Solvable AlgReal SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymAlgReal

Solvable FPRoundingMode SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Solvable Integer SymInteger Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymInteger

Solvable Bool SymBool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBool

(Solvable c t, Mergeable t) => Solvable c (Union t) Source # 
Instance details

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

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

Defined in Grisette.Internal.SymPrim.SymBV

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

Defined in Grisette.Internal.SymPrim.SymBV

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

Defined in Grisette.Internal.SymPrim.SymFP

Methods

con :: FP eb sb -> SymFP eb sb Source #

conView :: SymFP eb sb -> Maybe (FP eb sb) Source #

sym :: Symbol -> SymFP eb sb Source #

ssym :: Identifier -> SymFP eb sb Source #

isym :: Identifier -> Int -> SymFP eb sb Source #

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

Defined in Grisette.Internal.SymPrim.SymGeneralFun

Methods

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

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

sym :: Symbol -> sa -~> sb Source #

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

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

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

Defined in Grisette.Internal.SymPrim.SymTabularFun

Methods

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

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

sym :: Symbol -> sa =~> sb Source #

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

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

pattern Con :: Solvable c t => c -> t Source #

Extract the concrete value from a solvable value with conView.

>>> case con True :: SymBool of Con v -> v
True

slocsym :: Solvable c s => Identifier -> SpliceQ s Source #

Generate simply-named symbolic variables. The file location will be attached to the identifier.

>>> $$(slocsym "a") :: SymBool
a:<interactive>:...

Calling slocsym with the same name at different location will always generate different symbolic constants. Calling slocsym at the same location for multiple times will generate the same symbolic constants.

>>> ($$(slocsym "a") :: SymBool) == $$(slocsym "a")
False
>>> let f _ = $$(slocsym "a") :: SymBool
>>> f () == f ()
True

ilocsym :: Solvable c s => Identifier -> Int -> SpliceQ s Source #

Generate indexed symbolic variables. The file location will be attached to the identifier.

>>> $$(ilocsym "a" 1) :: SymBool
a:<interactive>:...@1

Calling ilocsym with the same name and index at different location will always generate different symbolic constants. Calling slocsym at the same location for multiple times will generate the same symbolic constants.

Basic symbolic operations

Basic logical operators

class LogicalOp b where Source #

Symbolic logical operators for symbolic booleans.

>>> let t = true :: SymBool
>>> let f = false :: SymBool
>>> let a = "a" :: SymBool
>>> let b = "b" :: SymBool
>>> t .|| f
true
>>> a .|| t
true
>>> a .|| f
a
>>> a .|| b
(|| a b)
>>> t .&& f
false
>>> a .&& t
a
>>> a .&& f
false
>>> a .&& b
(&& a b)
>>> symNot t
false
>>> symNot f
true
>>> symNot a
(! a)
>>> t `symXor` f
true
>>> t `symXor` t
false
>>> a `symXor` t
(! a)
>>> a `symXor` f
a
>>> a `symXor` b
(|| (&& (! a) b) (&& a (! b)))

Minimal complete definition

(true | false), ((.||), symNot | (.&&), symNot)

Methods

true :: b Source #

Constant true

false :: b Source #

Constant false

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

Symbolic disjunction

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

Symbolic conjunction

symNot :: b -> b Source #

Symbolic negation

symXor :: b -> b -> b Source #

Symbolic exclusive disjunction

symImplies :: b -> b -> b Source #

Symbolic implication

Instances

Instances details
LogicalOp SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.LogicalOp

LogicalOp Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.LogicalOp

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

Defined in Grisette.Internal.Core.Data.Class.LogicalOp

(LogicalOp a, Mergeable a) => LogicalOp (Union a) Source # 
Instance details

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

Methods

true :: Union a Source #

false :: Union a Source #

(.||) :: Union a -> Union a -> Union a Source #

(.&&) :: Union a -> Union a -> Union a Source #

symNot :: Union a -> Union a Source #

symXor :: Union a -> Union a -> Union a Source #

symImplies :: Union a -> Union a -> Union a Source #

class ITEOp v where Source #

ITE operator for solvable (see Grisette.Core)s, including symbolic boolean, integer, etc.

>>> let a = "a" :: SymBool
>>> let b = "b" :: SymBool
>>> let c = "c" :: SymBool
>>> symIte a b c
(ite a b c)

Methods

symIte :: SymBool -> v -> v -> v Source #

Symbolic if-then-else.

Instances

Instances details
ITEOp SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ITEOp

ITEOp SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ITEOp

ITEOp SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ITEOp

ITEOp SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ITEOp

ITEOp v => ITEOp (Identity v) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ITEOp

Methods

symIte :: SymBool -> Identity v -> Identity v -> Identity v Source #

(ITEOp a, Mergeable a) => ITEOp (Union a) Source # 
Instance details

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

Methods

symIte :: SymBool -> Union a -> Union a -> Union a Source #

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

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

symIte :: SymBool -> SomeBV bv -> SomeBV bv -> SomeBV bv Source #

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

Defined in Grisette.Internal.Core.Data.Class.ITEOp

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ITEOp

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ITEOp

Methods

symIte :: SymBool -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

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

Defined in Grisette.Internal.Core.Data.Class.ITEOp

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ITEOp

Methods

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

Symbolic equality

class SymEq a where Source #

Symbolic equality. Note that we can't use Haskell's Eq class since symbolic comparison won't necessarily return a concrete Bool value.

>>> let a = 1 :: SymInteger
>>> let b = 2 :: SymInteger
>>> a .== b
false
>>> a ./= b
true
>>> let a = "a" :: SymInteger
>>> let b = "b" :: SymInteger
>>> a .== b
(= a b)
>>> a ./= b
(distinct a b)

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

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

Minimal complete definition

(.==) | (./=)

Methods

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

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

symDistinct :: [a] -> SymBool Source #

Check if all elements in a list are distinct, under the symbolic equality semantics.

Instances

Instances details
SymEq All Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Any Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Ordering Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq AlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq NotRepresentableFPError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq SomeBVException Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

SymEq SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: () -> () -> SymBool Source #

(./=) :: () -> () -> SymBool Source #

symDistinct :: [()] -> SymBool Source #

SymEq Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq a => SymEq (First a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq a => SymEq (Last a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Last a -> Last a -> SymBool Source #

(./=) :: Last a -> Last a -> SymBool Source #

symDistinct :: [Last a] -> SymBool Source #

SymEq a => SymEq (Down a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Down a -> Down a -> SymBool Source #

(./=) :: Down a -> Down a -> SymBool Source #

symDistinct :: [Down a] -> SymBool Source #

SymEq a => SymEq (Dual a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Dual a -> Dual a -> SymBool Source #

(./=) :: Dual a -> Dual a -> SymBool Source #

symDistinct :: [Dual a] -> SymBool Source #

SymEq a => SymEq (Product a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymEq a => SymEq (Sum a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Sum a -> Sum a -> SymBool Source #

(./=) :: Sum a -> Sum a -> SymBool Source #

symDistinct :: [Sum a] -> SymBool Source #

SymEq p => SymEq (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Par1 p -> Par1 p -> SymBool Source #

(./=) :: Par1 p -> Par1 p -> SymBool Source #

symDistinct :: [Par1 p] -> SymBool Source #

(Generic a, GSymEq Arity0 (Rep a)) => SymEq (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

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

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

symDistinct :: [IntN n] -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

(forall (n :: Nat). (KnownNat n, 1 <= n) => SymEq (bv n), forall (n :: Nat). (KnownNat n, 1 <= n) => Num (bv n)) => SymEq (SomeBV bv) Source #

The symDistinct instance for SomeBV will have the following behavior:

  • If the list is empty or has only one element, it will return True.
  • If none of the elements have a bit-width, it will throw UndeterminedBitwidth exception.
  • If the elements have different bit-widths, it will throw a BitwidthMismatch exception.
  • If there are at least one element have a bit-width, and all elements with known bit-width have the same bit-width, it will generate a single symbolic formula using distinct.
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

(.==) :: SomeBV bv -> SomeBV bv -> SymBool Source #

(./=) :: SomeBV bv -> SomeBV bv -> SymBool Source #

symDistinct :: [SomeBV bv] -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

symDistinct :: [[a]] -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

symDistinct :: [Either a b] -> SymBool Source #

SymEq (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: U1 p -> U1 p -> SymBool Source #

(./=) :: U1 p -> U1 p -> SymBool Source #

symDistinct :: [U1 p] -> SymBool Source #

SymEq (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: V1 p -> V1 p -> SymBool Source #

(./=) :: V1 p -> V1 p -> SymBool Source #

symDistinct :: [V1 p] -> SymBool Source #

(Generic1 f, GSymEq Arity1 (Rep1 f), SymEq a) => SymEq (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

(SymEq e, SymEq a) => SymEq (CBMCEither e a) Source # 
Instance details

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: FP eb sb -> FP eb sb -> SymBool Source #

(./=) :: FP eb sb -> FP eb sb -> SymBool Source #

symDistinct :: [FP eb sb] -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: SymFP eb sb -> SymFP eb sb -> SymBool Source #

(./=) :: SymFP eb sb -> SymFP eb sb -> SymBool Source #

symDistinct :: [SymFP eb sb] -> SymBool Source #

(SymEq1 m, SymEq a) => SymEq (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: MaybeT m a -> MaybeT m a -> SymBool Source #

(./=) :: MaybeT m a -> MaybeT m a -> SymBool Source #

symDistinct :: [MaybeT m a] -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

symDistinct :: [(a, b)] -> SymBool Source #

SymEq a => SymEq (Const a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Const a b -> Const a b -> SymBool Source #

(./=) :: Const a b -> Const a b -> SymBool Source #

symDistinct :: [Const a b] -> SymBool Source #

SymEq (f a) => SymEq (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Ap f a -> Ap f a -> SymBool Source #

(./=) :: Ap f a -> Ap f a -> SymBool Source #

symDistinct :: [Ap f a] -> SymBool Source #

SymEq (f a) => SymEq (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Alt f a -> Alt f a -> SymBool Source #

(./=) :: Alt f a -> Alt f a -> SymBool Source #

symDistinct :: [Alt f a] -> SymBool Source #

SymEq (f p) => SymEq (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Rec1 f p -> Rec1 f p -> SymBool Source #

(./=) :: Rec1 f p -> Rec1 f p -> SymBool Source #

symDistinct :: [Rec1 f p] -> SymBool Source #

SymEq (m (CBMCEither e a)) => SymEq (CBMCExceptT e m a) Source # 
Instance details

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

(SymEq1 m, SymEq e, SymEq a) => SymEq (ExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: ExceptT e m a -> ExceptT e m a -> SymBool Source #

(./=) :: ExceptT e m a -> ExceptT e m a -> SymBool Source #

symDistinct :: [ExceptT e m a] -> SymBool Source #

(SymEq1 m, SymEq a) => SymEq (IdentityT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

(SymEq1 m, SymEq w, SymEq a) => SymEq (WriterT w m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: WriterT w m a -> WriterT w m a -> SymBool Source #

(./=) :: WriterT w m a -> WriterT w m a -> SymBool Source #

symDistinct :: [WriterT w m a] -> SymBool Source #

(SymEq1 m, SymEq w, SymEq a) => SymEq (WriterT w m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: WriterT w m a -> WriterT w m a -> SymBool Source #

(./=) :: WriterT w m a -> WriterT w m a -> SymBool Source #

symDistinct :: [WriterT w m a] -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

symDistinct :: [(a, b, c)] -> SymBool Source #

(SymEq (l a), SymEq (r a)) => SymEq (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Product l r a -> Product l r a -> SymBool Source #

(./=) :: Product l r a -> Product l r a -> SymBool Source #

symDistinct :: [Product l r a] -> SymBool Source #

(SymEq (l a), SymEq (r a)) => SymEq (Sum l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Sum l r a -> Sum l r a -> SymBool Source #

(./=) :: Sum l r a -> Sum l r a -> SymBool Source #

symDistinct :: [Sum l r a] -> SymBool Source #

(SymEq (f p), SymEq (g p)) => SymEq ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: (f :*: g) p -> (f :*: g) p -> SymBool Source #

(./=) :: (f :*: g) p -> (f :*: g) p -> SymBool Source #

symDistinct :: [(f :*: g) p] -> SymBool Source #

(SymEq (f p), SymEq (g p)) => SymEq ((f :+: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: (f :+: g) p -> (f :+: g) p -> SymBool Source #

(./=) :: (f :+: g) p -> (f :+: g) p -> SymBool Source #

symDistinct :: [(f :+: g) p] -> SymBool Source #

SymEq c => SymEq (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: K1 i c p -> K1 i c p -> SymBool Source #

(./=) :: K1 i c p -> K1 i c p -> SymBool Source #

symDistinct :: [K1 i c p] -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

symDistinct :: [(a, b, c, d)] -> SymBool Source #

SymEq (f (g a)) => SymEq (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: Compose f g a -> Compose f g a -> SymBool Source #

(./=) :: Compose f g a -> Compose f g a -> SymBool Source #

symDistinct :: [Compose f g a] -> SymBool Source #

SymEq (f (g p)) => SymEq ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: (f :.: g) p -> (f :.: g) p -> SymBool Source #

(./=) :: (f :.: g) p -> (f :.: g) p -> SymBool Source #

symDistinct :: [(f :.: g) p] -> SymBool Source #

SymEq (f p) => SymEq (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: M1 i c f p -> M1 i c f p -> SymBool Source #

(./=) :: M1 i c f p -> M1 i c f p -> SymBool Source #

symDistinct :: [M1 i c f p] -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

symDistinct :: [(a, b, c, d, e)] -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

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

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> SymBool Source #

(./=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> SymBool Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> SymBool Source #

(./=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> SymBool Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> SymBool Source #

(./=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> SymBool Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> SymBool Source #

(./=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> SymBool Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> SymBool Source #

(./=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> SymBool Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

(.==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> SymBool Source #

(./=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> SymBool Source #

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

class (forall a. SymEq a => SymEq (f a)) => SymEq1 f where Source #

Lifting of the SymEq class to unary type constructors.

Any instance should be subject to the following law that canonicity is preserved:

liftSymEq (.==) should be equivalent to (.==), under the symbolic semantics.

This class therefore represents the generalization of SymEq by decomposing its main method into a canonical lifting on a canonical inner method, so that the lifting can be reused for other arguments than the canonical one.

Methods

liftSymEq :: (a -> b -> SymBool) -> f a -> f b -> SymBool Source #

Lift a symbolic equality test through the type constructor.

The function will usually be applied to an symbolic equality function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.

Instances

Instances details
SymEq1 Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Identity a -> Identity b -> SymBool Source #

SymEq1 First Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> First a -> First b -> SymBool Source #

SymEq1 Last Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Last a -> Last b -> SymBool Source #

SymEq1 Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Down a -> Down b -> SymBool Source #

SymEq1 Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Dual a -> Dual b -> SymBool Source #

SymEq1 Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Product a -> Product b -> SymBool Source #

SymEq1 Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Sum a -> Sum b -> SymBool Source #

SymEq1 Union Source # 
Instance details

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

Methods

liftSymEq :: (a -> b -> SymBool) -> Union a -> Union b -> SymBool Source #

SymEq1 Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Maybe a -> Maybe b -> SymBool Source #

SymEq1 List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> [a] -> [b] -> SymBool Source #

SymEq a => SymEq1 (Either a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b -> SymBool) -> Either a a0 -> Either a b -> SymBool Source #

(Generic1 f, GSymEq Arity1 (Rep1 f)) => SymEq1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Default1 f a -> Default1 f b -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> MaybeT m a -> MaybeT m b -> SymBool Source #

SymEq a => SymEq1 ((,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b -> SymBool) -> (a, a0) -> (a, b) -> SymBool Source #

SymEq a => SymEq1 (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b -> SymBool) -> Const a a0 -> Const a b -> SymBool Source #

SymEq1 f => SymEq1 (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Ap f a -> Ap f b -> SymBool Source #

SymEq1 f => SymEq1 (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Alt f a -> Alt f b -> SymBool Source #

(SymEq1 m, SymEq e) => SymEq1 (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> ExceptT e m a -> ExceptT e m b -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> IdentityT m a -> IdentityT m b -> SymBool Source #

(SymEq1 m, SymEq w) => SymEq1 (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> WriterT w m a -> WriterT w m b -> SymBool Source #

(SymEq1 m, SymEq w) => SymEq1 (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> WriterT w m a -> WriterT w m b -> SymBool Source #

(SymEq a, SymEq b) => SymEq1 ((,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, a0) -> (a, b, b0) -> SymBool Source #

(SymEq1 l, SymEq1 r) => SymEq1 (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Product l r a -> Product l r b -> SymBool Source #

(SymEq1 l, SymEq1 r) => SymEq1 (Sum l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Sum l r a -> Sum l r b -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, a0) -> (a, b, c, b0) -> SymBool Source #

(SymEq1 f, SymEq1 g) => SymEq1 (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Compose f g a -> Compose f g b -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, a0) -> (a, b, c, d, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, a0) -> (a, b, c, d, e, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, f, g, a0) -> (a, b, c, d, e, f, g, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, f, g, h, a0) -> (a, b, c, d, e, f, g, h, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, f, g, h, i, a0) -> (a, b, c, d, e, f, g, h, i, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, f, g, h, i, j, a0) -> (a, b, c, d, e, f, g, h, i, j, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, f, g, h, i, j, k, a0) -> (a, b, c, d, e, f, g, h, i, j, k, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, b0) -> SymBool Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a0 -> b0 -> SymBool) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, b0) -> SymBool Source #

symEq1 :: (SymEq a, SymEq1 f) => f a -> f a -> SymBool Source #

Lift the standard (.==) function through the type constructor.

class (forall a. SymEq a => SymEq1 (f a)) => SymEq2 f where Source #

Lifting of the SymEq class to binary type constructors.

Methods

liftSymEq2 :: (a -> b -> SymBool) -> (c -> d -> SymBool) -> f a c -> f b d -> SymBool Source #

Lift symbolic equality tests through the type constructor.

The function will usually be applied to an symbolic equality function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.

Instances

Instances details
SymEq2 Either Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq2 :: (a -> b -> SymBool) -> (c -> d -> SymBool) -> Either a c -> Either b d -> SymBool Source #

SymEq2 (,) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

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

SymEq a => SymEq2 ((,,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq2 :: (a0 -> b -> SymBool) -> (c -> d -> SymBool) -> (a, a0, c) -> (a, b, d) -> SymBool Source #

(SymEq a, SymEq b) => SymEq2 ((,,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq2 :: (a0 -> b0 -> SymBool) -> (c -> d -> SymBool) -> (a, b, a0, c) -> (a, b, b0, d) -> SymBool Source #

symEq2 :: (SymEq a, SymEq b, SymEq2 f) => f a b -> f a b -> SymBool Source #

Lift the standard (.==) function through the type constructor.

Supplemental operation for Eq

distinct :: Eq a => [a] -> Bool Source #

Check if all elements in a list are distinct.

Note that empty or singleton lists are always distinct.

>>> distinct []
True
>>> distinct [1]
True
>>> distinct [1, 2, 3]
True
>>> distinct [1, 2, 2]
False

Symbolic comparison

class SymEq a => SymOrd a where Source #

Symbolic total order. Note that we can't use Haskell's Ord class since symbolic comparison won't necessarily return a concrete Bool or Ordering value.

>>> let a = 1 :: SymInteger
>>> let b = 2 :: SymInteger
>>> a .< b
true
>>> a .> b
false
>>> let a = "a" :: SymInteger
>>> let b = "b" :: SymInteger
>>> a .< b
(< a b)
>>> a .<= b
(<= a b)
>>> a .> b
(< b a)
>>> a .>= b
(<= b a)

For symCompare, Ordering is not a solvable type, and the result would be wrapped in a union-like monad. See Union and PlainUnion for more information.

>>> a `symCompare` b :: Union Ordering
{If (< a b) LT (If (= a b) EQ GT)}

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

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

Minimal complete definition

(.<) | symCompare

Methods

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

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

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

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

symCompare :: a -> a -> Union Ordering Source #

Instances

Instances details
SymOrd All Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Any Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Ordering Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd AlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd NotRepresentableFPError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd SomeBVException Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

SymOrd SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: () -> () -> SymBool Source #

(.<=) :: () -> () -> SymBool Source #

(.>) :: () -> () -> SymBool Source #

(.>=) :: () -> () -> SymBool Source #

symCompare :: () -> () -> Union Ordering Source #

SymOrd Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd a => SymOrd (First a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd a => SymOrd (Last a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Last a -> Last a -> SymBool Source #

(.<=) :: Last a -> Last a -> SymBool Source #

(.>) :: Last a -> Last a -> SymBool Source #

(.>=) :: Last a -> Last a -> SymBool Source #

symCompare :: Last a -> Last a -> Union Ordering Source #

SymOrd a => SymOrd (Down a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Down a -> Down a -> SymBool Source #

(.<=) :: Down a -> Down a -> SymBool Source #

(.>) :: Down a -> Down a -> SymBool Source #

(.>=) :: Down a -> Down a -> SymBool Source #

symCompare :: Down a -> Down a -> Union Ordering Source #

SymOrd a => SymOrd (Dual a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Dual a -> Dual a -> SymBool Source #

(.<=) :: Dual a -> Dual a -> SymBool Source #

(.>) :: Dual a -> Dual a -> SymBool Source #

(.>=) :: Dual a -> Dual a -> SymBool Source #

symCompare :: Dual a -> Dual a -> Union Ordering Source #

SymOrd a => SymOrd (Product a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

SymOrd a => SymOrd (Sum a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Sum a -> Sum a -> SymBool Source #

(.<=) :: Sum a -> Sum a -> SymBool Source #

(.>) :: Sum a -> Sum a -> SymBool Source #

(.>=) :: Sum a -> Sum a -> SymBool Source #

symCompare :: Sum a -> Sum a -> Union Ordering Source #

SymOrd p => SymOrd (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Par1 p -> Par1 p -> SymBool Source #

(.<=) :: Par1 p -> Par1 p -> SymBool Source #

(.>) :: Par1 p -> Par1 p -> SymBool Source #

(.>=) :: Par1 p -> Par1 p -> SymBool Source #

symCompare :: Par1 p -> Par1 p -> Union Ordering Source #

(Generic a, GSymOrd Arity0 (Rep a), GSymEq Arity0 (Rep a)) => SymOrd (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

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

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

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

Defined in Grisette.Internal.SymPrim.SomeBV

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: [a] -> [a] -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: Either a b -> Either a b -> Union Ordering Source #

SymOrd (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: U1 p -> U1 p -> SymBool Source #

(.<=) :: U1 p -> U1 p -> SymBool Source #

(.>) :: U1 p -> U1 p -> SymBool Source #

(.>=) :: U1 p -> U1 p -> SymBool Source #

symCompare :: U1 p -> U1 p -> Union Ordering Source #

SymOrd (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: V1 p -> V1 p -> SymBool Source #

(.<=) :: V1 p -> V1 p -> SymBool Source #

(.>) :: V1 p -> V1 p -> SymBool Source #

(.>=) :: V1 p -> V1 p -> SymBool Source #

symCompare :: V1 p -> V1 p -> Union Ordering Source #

(Generic1 f, GSymOrd Arity1 (Rep1 f), GSymEq Arity1 (Rep1 f), SymOrd a) => SymOrd (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

(SymOrd a, SymOrd b) => SymOrd (CBMCEither a b) Source # 
Instance details

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

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: FP eb sb -> FP eb sb -> SymBool Source #

(.<=) :: FP eb sb -> FP eb sb -> SymBool Source #

(.>) :: FP eb sb -> FP eb sb -> SymBool Source #

(.>=) :: FP eb sb -> FP eb sb -> SymBool Source #

symCompare :: FP eb sb -> FP eb sb -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: SymFP eb sb -> SymFP eb sb -> SymBool Source #

(.<=) :: SymFP eb sb -> SymFP eb sb -> SymBool Source #

(.>) :: SymFP eb sb -> SymFP eb sb -> SymBool Source #

(.>=) :: SymFP eb sb -> SymFP eb sb -> SymBool Source #

symCompare :: SymFP eb sb -> SymFP eb sb -> Union Ordering Source #

(SymOrd1 m, SymOrd a) => SymOrd (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: MaybeT m a -> MaybeT m a -> SymBool Source #

(.<=) :: MaybeT m a -> MaybeT m a -> SymBool Source #

(.>) :: MaybeT m a -> MaybeT m a -> SymBool Source #

(.>=) :: MaybeT m a -> MaybeT m a -> SymBool Source #

symCompare :: MaybeT m a -> MaybeT m a -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: (a, b) -> (a, b) -> Union Ordering Source #

SymOrd a => SymOrd (Const a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Const a b -> Const a b -> SymBool Source #

(.<=) :: Const a b -> Const a b -> SymBool Source #

(.>) :: Const a b -> Const a b -> SymBool Source #

(.>=) :: Const a b -> Const a b -> SymBool Source #

symCompare :: Const a b -> Const a b -> Union Ordering Source #

SymOrd (f a) => SymOrd (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Ap f a -> Ap f a -> SymBool Source #

(.<=) :: Ap f a -> Ap f a -> SymBool Source #

(.>) :: Ap f a -> Ap f a -> SymBool Source #

(.>=) :: Ap f a -> Ap f a -> SymBool Source #

symCompare :: Ap f a -> Ap f a -> Union Ordering Source #

SymOrd (f a) => SymOrd (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Alt f a -> Alt f a -> SymBool Source #

(.<=) :: Alt f a -> Alt f a -> SymBool Source #

(.>) :: Alt f a -> Alt f a -> SymBool Source #

(.>=) :: Alt f a -> Alt f a -> SymBool Source #

symCompare :: Alt f a -> Alt f a -> Union Ordering Source #

SymOrd (f p) => SymOrd (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Rec1 f p -> Rec1 f p -> SymBool Source #

(.<=) :: Rec1 f p -> Rec1 f p -> SymBool Source #

(.>) :: Rec1 f p -> Rec1 f p -> SymBool Source #

(.>=) :: Rec1 f p -> Rec1 f p -> SymBool Source #

symCompare :: Rec1 f p -> Rec1 f p -> Union Ordering Source #

SymOrd (m (CBMCEither e a)) => SymOrd (CBMCExceptT e m a) Source # 
Instance details

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

(SymOrd1 m, SymOrd e, SymOrd a) => SymOrd (ExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: ExceptT e m a -> ExceptT e m a -> SymBool Source #

(.<=) :: ExceptT e m a -> ExceptT e m a -> SymBool Source #

(.>) :: ExceptT e m a -> ExceptT e m a -> SymBool Source #

(.>=) :: ExceptT e m a -> ExceptT e m a -> SymBool Source #

symCompare :: ExceptT e m a -> ExceptT e m a -> Union Ordering Source #

(SymOrd1 m, SymOrd a) => SymOrd (IdentityT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

(SymOrd1 m, SymOrd w, SymOrd a) => SymOrd (WriterT w m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: WriterT w m a -> WriterT w m a -> SymBool Source #

(.<=) :: WriterT w m a -> WriterT w m a -> SymBool Source #

(.>) :: WriterT w m a -> WriterT w m a -> SymBool Source #

(.>=) :: WriterT w m a -> WriterT w m a -> SymBool Source #

symCompare :: WriterT w m a -> WriterT w m a -> Union Ordering Source #

(SymOrd1 m, SymOrd w, SymOrd a) => SymOrd (WriterT w m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: WriterT w m a -> WriterT w m a -> SymBool Source #

(.<=) :: WriterT w m a -> WriterT w m a -> SymBool Source #

(.>) :: WriterT w m a -> WriterT w m a -> SymBool Source #

(.>=) :: WriterT w m a -> WriterT w m a -> SymBool Source #

symCompare :: WriterT w m a -> WriterT w m a -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: (a, b, c) -> (a, b, c) -> Union Ordering Source #

(SymOrd (l a), SymOrd (r a)) => SymOrd (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Product l r a -> Product l r a -> SymBool Source #

(.<=) :: Product l r a -> Product l r a -> SymBool Source #

(.>) :: Product l r a -> Product l r a -> SymBool Source #

(.>=) :: Product l r a -> Product l r a -> SymBool Source #

symCompare :: Product l r a -> Product l r a -> Union Ordering Source #

(SymOrd (l a), SymOrd (r a)) => SymOrd (Sum l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Sum l r a -> Sum l r a -> SymBool Source #

(.<=) :: Sum l r a -> Sum l r a -> SymBool Source #

(.>) :: Sum l r a -> Sum l r a -> SymBool Source #

(.>=) :: Sum l r a -> Sum l r a -> SymBool Source #

symCompare :: Sum l r a -> Sum l r a -> Union Ordering Source #

(SymOrd (f p), SymOrd (g p)) => SymOrd ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: (f :*: g) p -> (f :*: g) p -> SymBool Source #

(.<=) :: (f :*: g) p -> (f :*: g) p -> SymBool Source #

(.>) :: (f :*: g) p -> (f :*: g) p -> SymBool Source #

(.>=) :: (f :*: g) p -> (f :*: g) p -> SymBool Source #

symCompare :: (f :*: g) p -> (f :*: g) p -> Union Ordering Source #

(SymOrd (f p), SymOrd (g p)) => SymOrd ((f :+: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: (f :+: g) p -> (f :+: g) p -> SymBool Source #

(.<=) :: (f :+: g) p -> (f :+: g) p -> SymBool Source #

(.>) :: (f :+: g) p -> (f :+: g) p -> SymBool Source #

(.>=) :: (f :+: g) p -> (f :+: g) p -> SymBool Source #

symCompare :: (f :+: g) p -> (f :+: g) p -> Union Ordering Source #

SymOrd c => SymOrd (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: K1 i c p -> K1 i c p -> SymBool Source #

(.<=) :: K1 i c p -> K1 i c p -> SymBool Source #

(.>) :: K1 i c p -> K1 i c p -> SymBool Source #

(.>=) :: K1 i c p -> K1 i c p -> SymBool Source #

symCompare :: K1 i c p -> K1 i c p -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: (a, b, c, d) -> (a, b, c, d) -> Union Ordering Source #

SymOrd (f (g a)) => SymOrd (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: Compose f g a -> Compose f g a -> SymBool Source #

(.<=) :: Compose f g a -> Compose f g a -> SymBool Source #

(.>) :: Compose f g a -> Compose f g a -> SymBool Source #

(.>=) :: Compose f g a -> Compose f g a -> SymBool Source #

symCompare :: Compose f g a -> Compose f g a -> Union Ordering Source #

SymOrd (f (g p)) => SymOrd ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: (f :.: g) p -> (f :.: g) p -> SymBool Source #

(.<=) :: (f :.: g) p -> (f :.: g) p -> SymBool Source #

(.>) :: (f :.: g) p -> (f :.: g) p -> SymBool Source #

(.>=) :: (f :.: g) p -> (f :.: g) p -> SymBool Source #

symCompare :: (f :.: g) p -> (f :.: g) p -> Union Ordering Source #

SymOrd (f p) => SymOrd (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: M1 i c f p -> M1 i c f p -> SymBool Source #

(.<=) :: M1 i c f p -> M1 i c f p -> SymBool Source #

(.>) :: M1 i c f p -> M1 i c f p -> SymBool Source #

(.>=) :: M1 i c f p -> M1 i c f p -> SymBool Source #

symCompare :: M1 i c f p -> M1 i c f p -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: (a, b, c, d, e) -> (a, b, c, d, e) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

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

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

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

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

symCompare :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> SymBool Source #

(.<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> SymBool Source #

(.>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> SymBool Source #

(.>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> SymBool Source #

symCompare :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> SymBool Source #

(.<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> SymBool Source #

(.>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> SymBool Source #

(.>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> SymBool Source #

symCompare :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> SymBool Source #

(.<=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> SymBool Source #

(.>) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> SymBool Source #

(.>=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> SymBool Source #

symCompare :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> SymBool Source #

(.<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> SymBool Source #

(.>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> SymBool Source #

(.>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> SymBool Source #

symCompare :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> SymBool Source #

(.<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> SymBool Source #

(.>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> SymBool Source #

(.>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> SymBool Source #

symCompare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

(.<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> SymBool Source #

(.<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> SymBool Source #

(.>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> SymBool Source #

(.>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> SymBool Source #

symCompare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Union Ordering Source #

class (SymEq1 f, forall a. SymOrd a => SymOrd (f a)) => SymOrd1 f where Source #

Lifting of the SymOrd class to unary type constructors.

Any instance should be subject to the following law that canonicity is preserved:

liftSymCompare symCompare should be equivalent to symCompare, under the symbolic semantics.

This class therefore represents the generalization of SymOrd by decomposing its main method into a canonical lifting on a canonical inner method, so that the lifting can be reused for other arguments than the canonical one.

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> f a -> f b -> Union Ordering Source #

Lift a symCompare function through the type constructor.

The function will usually be applied to an symbolic comparison function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.

Instances

Instances details
SymOrd1 Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Identity a -> Identity b -> Union Ordering Source #

SymOrd1 First Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> First a -> First b -> Union Ordering Source #

SymOrd1 Last Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Last a -> Last b -> Union Ordering Source #

SymOrd1 Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Down a -> Down b -> Union Ordering Source #

SymOrd1 Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Dual a -> Dual b -> Union Ordering Source #

SymOrd1 Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Product a -> Product b -> Union Ordering Source #

SymOrd1 Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Sum a -> Sum b -> Union Ordering Source #

SymOrd1 Union Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Union a -> Union b -> Union Ordering Source #

SymOrd1 Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Maybe a -> Maybe b -> Union Ordering Source #

SymOrd1 List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> [a] -> [b] -> Union Ordering Source #

SymOrd a => SymOrd1 (Either a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b -> Union Ordering) -> Either a a0 -> Either a b -> Union Ordering Source #

(Generic1 f, GSymOrd Arity1 (Rep1 f), GSymEq Arity1 (Rep1 f)) => SymOrd1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Default1 f a -> Default1 f b -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> MaybeT m a -> MaybeT m b -> Union Ordering Source #

SymOrd a => SymOrd1 ((,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b -> Union Ordering) -> (a, a0) -> (a, b) -> Union Ordering Source #

SymOrd a => SymOrd1 (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b -> Union Ordering) -> Const a a0 -> Const a b -> Union Ordering Source #

SymOrd1 f => SymOrd1 (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Ap f a -> Ap f b -> Union Ordering Source #

SymOrd1 f => SymOrd1 (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Alt f a -> Alt f b -> Union Ordering Source #

(SymOrd1 m, SymOrd e) => SymOrd1 (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> ExceptT e m a -> ExceptT e m b -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> IdentityT m a -> IdentityT m b -> Union Ordering Source #

(SymOrd1 m, SymOrd w) => SymOrd1 (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> WriterT w m a -> WriterT w m b -> Union Ordering Source #

(SymOrd1 m, SymOrd w) => SymOrd1 (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> WriterT w m a -> WriterT w m b -> Union Ordering Source #

(SymOrd a, SymOrd b) => SymOrd1 ((,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, a0) -> (a, b, b0) -> Union Ordering Source #

(SymOrd1 l, SymOrd1 r) => SymOrd1 (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Product l r a -> Product l r b -> Union Ordering Source #

(SymOrd1 l, SymOrd1 r) => SymOrd1 (Sum l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Sum l r a -> Sum l r b -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, a0) -> (a, b, c, b0) -> Union Ordering Source #

(SymOrd1 f, SymOrd1 g) => SymOrd1 (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Compose f g a -> Compose f g b -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, a0) -> (a, b, c, d, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, a0) -> (a, b, c, d, e, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, f, g, a0) -> (a, b, c, d, e, f, g, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, f, g, h, a0) -> (a, b, c, d, e, f, g, h, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, f, g, h, i, a0) -> (a, b, c, d, e, f, g, h, i, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, f, g, h, i, j, a0) -> (a, b, c, d, e, f, g, h, i, j, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, f, g, h, i, j, k, a0) -> (a, b, c, d, e, f, g, h, i, j, k, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, b0) -> Union Ordering Source #

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a0 -> b0 -> Union Ordering) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, b0) -> Union Ordering Source #

symCompare1 :: (SymOrd1 f, SymOrd a) => f a -> f a -> Union Ordering Source #

Lift the standard symCompare function to binary type constructors.

class (SymEq2 f, forall a. SymOrd a => SymOrd1 (f a)) => SymOrd2 f where Source #

Lifting of the SymOrd class to binary type constructors.

Methods

liftSymCompare2 :: (a -> b -> Union Ordering) -> (c -> d -> Union Ordering) -> f a c -> f b d -> Union Ordering Source #

Lift a symCompare function through the type constructor.

The function will usually be applied to an symbolic comparison function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.

Instances

Instances details
SymOrd2 Either Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare2 :: (a -> b -> Union Ordering) -> (c -> d -> Union Ordering) -> Either a c -> Either b d -> Union Ordering Source #

SymOrd2 (,) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare2 :: (a -> b -> Union Ordering) -> (c -> d -> Union Ordering) -> (a, c) -> (b, d) -> Union Ordering Source #

SymOrd a => SymOrd2 ((,,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare2 :: (a0 -> b -> Union Ordering) -> (c -> d -> Union Ordering) -> (a, a0, c) -> (a, b, d) -> Union Ordering Source #

(SymOrd a, SymOrd b) => SymOrd2 ((,,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare2 :: (a0 -> b0 -> Union Ordering) -> (c -> d -> Union Ordering) -> (a, b, a0, c) -> (a, b, b0, d) -> Union Ordering Source #

symCompare2 :: (SymOrd2 f, SymOrd a, SymOrd b) => f a b -> f a b -> Union Ordering Source #

Lift the standard symCompare function through the type constructors.

symMax :: (SymOrd a, ITEOp a) => a -> a -> a Source #

Symbolic maximum.

symMin :: (SymOrd a, ITEOp a) => a -> a -> a Source #

Symbolic minimum.

mrgMax :: (SymOrd a, Mergeable a, SymBranching m, Applicative m) => a -> a -> m a Source #

Symbolic maximum, with a union-like monad.

mrgMin :: (SymOrd a, Mergeable a, SymBranching m, Applicative m) => a -> a -> m a Source #

Symbolic minimum, with a union-like monad.

Bit-vectors

class BV bv where Source #

Bit vector operations. Including concatenation (bvConcat), extension (bvZext, bvSext, bvExt), and selection (bvSelect).

Methods

bvConcat :: bv -> bv -> bv Source #

Concatenation of two bit vectors.

>>> bvConcat (SomeSymWordN (0b101 :: SymWordN 3)) (SomeSymWordN (0b010 :: SymWordN 3))
0b101010

bvZext Source #

Arguments

:: Int

Desired output length

-> bv

Bit vector to extend

-> bv 

Zero extension of a bit vector.

>>> bvZext 6 (SomeSymWordN (0b101 :: SymWordN 3))
0b000101

bvSext Source #

Arguments

:: Int

Desired output length

-> bv

Bit vector to extend

-> bv 

Sign extension of a bit vector.

>>> bvSext 6 (SomeSymWordN (0b101 :: SymWordN 3))
0b111101

bvExt Source #

Arguments

:: Int

Desired output length

-> bv

Bit vector to extend

-> bv 

Extension of a bit vector. Signedness is determined by the input bit vector type.

>>> bvExt 6 (SomeSymIntN (0b101 :: SymIntN 3))
0b111101
>>> bvExt 6 (SomeSymIntN (0b001 :: SymIntN 3))
0b000001
>>> bvExt 6 (SomeSymWordN (0b101 :: SymWordN 3))
0b000101
>>> bvExt 6 (SomeSymWordN (0b001 :: SymWordN 3))
0b000001

bvSelect Source #

Arguments

:: Int

Index of the least significant bit of the slice

-> Int

Desired output width, ix + w <= n must hold where n is the size of the input bit vector

-> bv

Bit vector to select from

-> bv 

Slicing out a smaller bit vector from a larger one, selecting a slice with width w starting from index ix.

The least significant bit is indexed as 0.

>>> bvSelect 1 3 (SomeSymIntN (0b001010 :: SymIntN 6))
0b101

bv Source #

Arguments

:: Integral a 
=> Int

Bit width

-> a

Integral value

-> bv 

Create a bit vector from an integer. The bit-width is the first argument, which should not be zero.

>>> bv 12 21 :: SomeSymIntN
0x015

Instances

Instances details
SizedBV bv => BV (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

bvConcat :: SomeBV bv -> SomeBV bv -> SomeBV bv Source #

bvZext :: Int -> SomeBV bv -> SomeBV bv Source #

bvSext :: Int -> SomeBV bv -> SomeBV bv Source #

bvExt :: Int -> SomeBV bv -> SomeBV bv Source #

bvSelect :: Int -> Int -> SomeBV bv -> SomeBV bv Source #

bv :: Integral a => Int -> a -> SomeBV bv Source #

bvExtract Source #

Arguments

:: BV bv 
=> Int

The start position to extract from, i < n must hold where n is the size of the output bit vector

-> Int

The end position to extract from, j <= i must hold

-> bv

Bit vector to extract from

-> bv 

Slicing out a smaller bit vector from a larger one, extract a slice from bit i down to j.

The least significant bit is indexed as 0.

>>> bvExtract 4 2 (SomeSymIntN (0b010100 :: SymIntN 6))
0b101

class SizedBV bv where Source #

Sized bit vector operations. Including concatenation (sizedBVConcat), extension (sizedBVZext, sizedBVSext, sizedBVExt), and selection (sizedBVSelect).

Methods

sizedBVConcat :: (KnownNat l, KnownNat r, 1 <= l, 1 <= r) => bv l -> bv r -> bv (l + r) Source #

Concatenation of two bit vectors.

>>> sizedBVConcat (0b101 :: SymIntN 3) (0b010 :: SymIntN 3)
0b101010

sizedBVZext Source #

Arguments

:: (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) 
=> proxy r

Desired output width

-> bv l

Bit vector to extend

-> bv r 

Zero extension of a bit vector.

>>> sizedBVZext (Proxy @6) (0b101 :: SymIntN 3)
0b000101

sizedBVSext Source #

Arguments

:: (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) 
=> proxy r

Desired output width

-> bv l

Bit vector to extend

-> bv r 

Signed extension of a bit vector.

>>> sizedBVSext (Proxy @6) (0b101 :: SymIntN 3)
0b111101

sizedBVExt Source #

Arguments

:: (KnownNat l, KnownNat r, 1 <= l, KnownNat r, l <= r) 
=> proxy r

Desired output width

-> bv l

Bit vector to extend

-> bv r 

Extension of a bit vector. Signedness is determined by the input bit vector type.

>>> sizedBVExt (Proxy @6) (0b101 :: SymIntN 3)
0b111101
>>> sizedBVExt (Proxy @6) (0b001 :: SymIntN 3)
0b000001
>>> sizedBVExt (Proxy @6) (0b101 :: SymWordN 3)
0b000101
>>> sizedBVExt (Proxy @6) (0b001 :: SymWordN 3)
0b000001

sizedBVSelect Source #

Arguments

:: (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) 
=> p ix

Index of the least significant bit of the slice

-> q w

Desired output width, ix + w <= n must hold where n is the size of the input bit vector

-> bv n

Bit vector to select from

-> bv w 

Slicing out a smaller bit vector from a larger one, selecting a slice with width w starting from index ix.

The least significant bit is indexed as 0.

>>> sizedBVSelect (Proxy @2) (Proxy @3) (con 0b010100 :: SymIntN 6)
0b101

sizedBVFromIntegral :: (Integral a, KnownNat n, 1 <= n) => a -> bv n Source #

default sizedBVFromIntegral :: (Num (bv n), Integral a, KnownNat n, 1 <= n) => a -> bv n Source #

Instances

Instances details
SizedBV IntN Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

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

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

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

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

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

sizedBVFromIntegral :: forall a (n :: Nat). (Integral a, KnownNat n, 1 <= n) => a -> IntN n Source #

SizedBV WordN Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

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

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

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

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

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

sizedBVFromIntegral :: forall a (n :: Nat). (Integral a, KnownNat n, 1 <= n) => a -> WordN n Source #

SizedBV SymIntN Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

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) p q. (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => p ix -> q w -> SymIntN n -> SymIntN w Source #

sizedBVFromIntegral :: forall a (n :: Nat). (Integral a, KnownNat n, 1 <= n) => a -> SymIntN n Source #

SizedBV SymWordN Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

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) p q. (KnownNat n, KnownNat ix, KnownNat w, 1 <= n, 1 <= w, (ix + w) <= n) => p ix -> q w -> SymWordN n -> SymWordN w Source #

sizedBVFromIntegral :: forall a (n :: Nat). (Integral a, KnownNat n, 1 <= n) => a -> SymWordN n Source #

sizedBVExtract Source #

Arguments

:: forall p i q j n bv. (SizedBV bv, KnownNat n, KnownNat i, KnownNat j, 1 <= n, (i + 1) <= n, j <= i) 
=> p i

The start position to extract from, i < n must hold where n is the size of the output bit vector

-> q j

The end position to extract from, j <= i must hold

-> bv n

Bit vector to extract from

-> bv ((i - j) + 1) 

Slicing out a smaller bit vector from a larger one, extract a slice from bit i down to j.

The least significant bit is indexed as 0.

>>> sizedBVExtract (Proxy @4) (Proxy @2) (con 0b010100 :: SymIntN 6)
0b101

class Bits a => SymShift a where Source #

A class for shifting operations.

The symShift function shifts the value to the left if the shift amount is positive, and to the right if the shift amount is negative. If shifting beyond the bit width of the value, the result is the same as shifting with the bit width.

The symShiftNegated function shifts the value to the right if the shift amount is positive, and to the left if the shift amount is negative. This function is introduced to handle the asymmetry of the range of values.

Methods

symShift :: a -> a -> a Source #

symShiftNegated :: a -> a -> a Source #

Instances

Instances details
SymShift Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

SymShift Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

SymShift Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

SymShift Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

SymShift Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

SymShift Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

SymShift Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

SymShift Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

SymShift Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

SymShift Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

(Integral a, FiniteBits a) => SymShift (DefaultFiniteBitsSymShift a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymShift

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

Defined in Grisette.Internal.SymPrim.BV

Methods

symShift :: IntN n -> IntN n -> IntN n Source #

symShiftNegated :: IntN n -> IntN n -> IntN n Source #

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

Defined in Grisette.Internal.SymPrim.BV

Methods

symShift :: WordN n -> WordN n -> WordN n Source #

symShiftNegated :: WordN n -> WordN n -> WordN n Source #

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

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

symShift :: SomeBV bv -> SomeBV bv -> SomeBV bv Source #

symShiftNegated :: SomeBV bv -> SomeBV bv -> SomeBV bv Source #

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

Defined in Grisette.Internal.SymPrim.SymBV

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

Defined in Grisette.Internal.SymPrim.SymBV

class (MonadError e m, TryMerge m, Mergeable a) => SafeSymShift e a m where Source #

Safe version for shiftL or shiftR.

The safeSymShiftL and safeSymShiftR are defined for all non-negative shift amounts.

  • Shifting by negative shift amounts is an error.
  • The result is defined to be 0 when shifting left by more than or equal to the bit size of the number.
  • The result is defined to be 0 when shifting right by more than or equal to the bit size of the number and the number is unsigned or signed non-negative.
  • The result is defined to be -1 when shifting right by more than or equal to the bit size of the number and the number is signed negative.

The safeSymStrictShiftL and safeSymStrictShiftR are defined for all non-negative shift amounts that is less than the bit size. Shifting by more than or equal to the bit size is an error, otherwise they are the same as the non-strict versions.

Methods

safeSymShiftL :: a -> a -> m a Source #

safeSymShiftR :: a -> a -> m a Source #

safeSymStrictShiftL :: a -> a -> m a Source #

safeSymStrictShiftR :: a -> a -> m a Source #

Instances

Instances details
(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Int16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Int32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Int64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Int8 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Word16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Word32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Word64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Word8 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Int m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m) => SafeSymShift ArithException Word m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, TryMerge m, KnownNat n, 1 <= n) => SafeSymShift ArithException (IntN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

Methods

safeSymShiftL :: IntN n -> IntN n -> m (IntN n) Source #

safeSymShiftR :: IntN n -> IntN n -> m (IntN n) Source #

safeSymStrictShiftL :: IntN n -> IntN n -> m (IntN n) Source #

safeSymStrictShiftR :: IntN n -> IntN n -> m (IntN n) Source #

(MonadError ArithException m, TryMerge m, KnownNat n, 1 <= n) => SafeSymShift ArithException (WordN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

Methods

safeSymShiftL :: WordN n -> WordN n -> m (WordN n) Source #

safeSymShiftR :: WordN n -> WordN n -> m (WordN n) Source #

safeSymStrictShiftL :: WordN n -> WordN n -> m (WordN n) Source #

safeSymStrictShiftR :: WordN n -> WordN n -> m (WordN n) Source #

(MonadError ArithException m, MonadUnion m, KnownNat n, 1 <= n) => SafeSymShift ArithException (SymIntN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(MonadError ArithException m, MonadUnion m, KnownNat n, 1 <= n) => SafeSymShift ArithException (SymWordN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymShift

(forall (n :: Nat). (KnownNat n, 1 <= n) => SafeSymShift e (bv n) (ExceptT e m), MonadError (Either SomeBVException e) m, TryMerge m, Mergeable e, forall (n :: Nat). (KnownNat n, 1 <= n) => Num (bv n)) => SafeSymShift (Either SomeBVException e) (SomeBV bv) m Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

safeSymShiftL :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

safeSymShiftR :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

safeSymStrictShiftL :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

safeSymStrictShiftR :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

class Bits a => SymRotate a where Source #

The symRotate is similar to rotate, but accepts the type itself instead of Int for the rotate amount. The function works on all inputs, including the rotate amounts that are beyond the bit width of the value.

The symRotateNegated function rotates to the opposite direction of symRotate. This function is introduced to handle the asymmetry of the range of values.

Methods

symRotate :: a -> a -> a Source #

symRotateNegated :: a -> a -> a Source #

Instances

Instances details
SymRotate Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

SymRotate Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

(Integral a, FiniteBits a) => SymRotate (DefaultFiniteBitsSymRotate a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymRotate

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

Defined in Grisette.Internal.SymPrim.BV

Methods

symRotate :: IntN n -> IntN n -> IntN n Source #

symRotateNegated :: IntN n -> IntN n -> IntN n Source #

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

Defined in Grisette.Internal.SymPrim.BV

Methods

symRotate :: WordN n -> WordN n -> WordN n Source #

symRotateNegated :: WordN n -> WordN n -> WordN n Source #

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

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

symRotate :: SomeBV bv -> SomeBV bv -> SomeBV bv Source #

symRotateNegated :: SomeBV bv -> SomeBV bv -> SomeBV bv Source #

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

Defined in Grisette.Internal.SymPrim.SymBV

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

Defined in Grisette.Internal.SymPrim.SymBV

class (MonadError e m, TryMerge m, Mergeable a) => SafeSymRotate e a m where Source #

Safe rotation operations. The operators will reject negative shift amounts.

Methods

safeSymRotateL :: a -> a -> m a Source #

safeSymRotateR :: a -> a -> m a Source #

Instances

Instances details
(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Int16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Int32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Int64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Int8 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Word16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Word32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Word64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Word8 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Int m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m) => SafeSymRotate ArithException Word m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m, KnownNat n, 1 <= n) => SafeSymRotate ArithException (IntN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

Methods

safeSymRotateL :: IntN n -> IntN n -> m (IntN n) Source #

safeSymRotateR :: IntN n -> IntN n -> m (IntN n) Source #

(MonadError ArithException m, TryMerge m, KnownNat n, 1 <= n) => SafeSymRotate ArithException (WordN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

Methods

safeSymRotateL :: WordN n -> WordN n -> m (WordN n) Source #

safeSymRotateR :: WordN n -> WordN n -> m (WordN n) Source #

(MonadError ArithException m, MonadUnion m, KnownNat n, 1 <= n) => SafeSymRotate ArithException (SymIntN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(MonadError ArithException m, TryMerge m, KnownNat n, 1 <= n) => SafeSymRotate ArithException (SymWordN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeSymRotate

(forall (n :: Nat). (KnownNat n, 1 <= n) => SafeSymRotate e (bv n) (ExceptT e m), MonadError (Either SomeBVException e) m, TryMerge m, Mergeable e, forall (n :: Nat). (KnownNat n, 1 <= n) => Num (bv n)) => SafeSymRotate (Either SomeBVException e) (SomeBV bv) m Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

safeSymRotateL :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

safeSymRotateR :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

class SignConversion ubv sbv | ubv -> sbv, sbv -> ubv where Source #

Convert values between signed and unsigned.

Methods

toSigned :: ubv -> sbv Source #

Convert unsigned value to the corresponding signed value.

toUnsigned :: sbv -> ubv Source #

Convert signed value to the corresponding unsigned value.

Instances

Instances details
SignConversion Word16 Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SignConversion

SignConversion Word32 Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SignConversion

SignConversion Word64 Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SignConversion

SignConversion Word8 Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SignConversion

SignConversion Word Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SignConversion

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

Defined in Grisette.Internal.SymPrim.BV

Methods

toSigned :: WordN n -> IntN n Source #

toUnsigned :: IntN n -> WordN n Source #

(forall (n :: Nat). (KnownNat n, 1 <= n) => SignConversion (ubv n) (sbv n), SignConversion (ubv 1) (sbv 1)) => SignConversion (SomeBV ubv) (SomeBV sbv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

toSigned :: SomeBV ubv -> SomeBV sbv Source #

toUnsigned :: SomeBV sbv -> SomeBV ubv Source #

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

Defined in Grisette.Internal.SymPrim.SymBV

Safe operation for Numbers

class DivOr a where Source #

Safe division handling with default values returned on exception.

Methods

divOr :: a -> a -> a -> a Source #

Safe div with default value returned on exception.

>>> divOr "d" "a" "b" :: SymInteger
(ite (= b 0) d (div a b))

modOr :: a -> a -> a -> a Source #

Safe mod with default value returned on exception.

>>> modOr "d" "a" "b" :: SymInteger
(ite (= b 0) d (mod a b))

divModOr :: (a, a) -> a -> a -> (a, a) Source #

Safe divMod with default value returned on exception.

>>> divModOr ("d", "m") "a" "b" :: (SymInteger, SymInteger)
((ite (= b 0) d (div a b)),(ite (= b 0) m (mod a b)))

quotOr :: a -> a -> a -> a Source #

Safe quot with default value returned on exception.

remOr :: a -> a -> a -> a Source #

Safe rem with default value returned on exception.

quotRemOr :: (a, a) -> a -> a -> (a, a) Source #

Safe quotRem with default value returned on exception.

Instances

Instances details
DivOr Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

DivOr Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

DivOr Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

DivOr Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

divOr :: Int8 -> Int8 -> Int8 -> Int8 Source #

modOr :: Int8 -> Int8 -> Int8 -> Int8 Source #

divModOr :: (Int8, Int8) -> Int8 -> Int8 -> (Int8, Int8) Source #

quotOr :: Int8 -> Int8 -> Int8 -> Int8 Source #

remOr :: Int8 -> Int8 -> Int8 -> Int8 Source #

quotRemOr :: (Int8, Int8) -> Int8 -> Int8 -> (Int8, Int8) Source #

DivOr Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

DivOr Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

DivOr Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

DivOr Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

DivOr SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

DivOr Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

DivOr Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

divOr :: Int -> Int -> Int -> Int Source #

modOr :: Int -> Int -> Int -> Int Source #

divModOr :: (Int, Int) -> Int -> Int -> (Int, Int) Source #

quotOr :: Int -> Int -> Int -> Int Source #

remOr :: Int -> Int -> Int -> Int Source #

quotRemOr :: (Int, Int) -> Int -> Int -> (Int, Int) Source #

DivOr Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

divOr :: Word -> Word -> Word -> Word Source #

modOr :: Word -> Word -> Word -> Word Source #

divModOr :: (Word, Word) -> Word -> Word -> (Word, Word) Source #

quotOr :: Word -> Word -> Word -> Word Source #

remOr :: Word -> Word -> Word -> Word Source #

quotRemOr :: (Word, Word) -> Word -> Word -> (Word, Word) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

divOr :: IntN n -> IntN n -> IntN n -> IntN n Source #

modOr :: IntN n -> IntN n -> IntN n -> IntN n Source #

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

quotOr :: IntN n -> IntN n -> IntN n -> IntN n Source #

remOr :: IntN n -> IntN n -> IntN n -> IntN n Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

divOr :: WordN n -> WordN n -> WordN n -> WordN n Source #

modOr :: WordN n -> WordN n -> WordN n -> WordN n Source #

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

quotOr :: WordN n -> WordN n -> WordN n -> WordN n Source #

remOr :: WordN n -> WordN n -> WordN n -> WordN n Source #

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

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

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

divOr :: SomeBV bv -> SomeBV bv -> SomeBV bv -> SomeBV bv Source #

modOr :: SomeBV bv -> SomeBV bv -> SomeBV bv -> SomeBV bv Source #

divModOr :: (SomeBV bv, SomeBV bv) -> SomeBV bv -> SomeBV bv -> (SomeBV bv, SomeBV bv) Source #

quotOr :: SomeBV bv -> SomeBV bv -> SomeBV bv -> SomeBV bv Source #

remOr :: SomeBV bv -> SomeBV bv -> SomeBV bv -> SomeBV bv Source #

quotRemOr :: (SomeBV bv, SomeBV bv) -> SomeBV bv -> SomeBV bv -> (SomeBV bv, SomeBV bv) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

divOr :: SymIntN n -> SymIntN n -> SymIntN n -> SymIntN n Source #

modOr :: SymIntN n -> SymIntN n -> SymIntN n -> SymIntN n Source #

divModOr :: (SymIntN n, SymIntN n) -> SymIntN n -> SymIntN n -> (SymIntN n, SymIntN n) Source #

quotOr :: SymIntN n -> SymIntN n -> SymIntN n -> SymIntN n Source #

remOr :: SymIntN n -> SymIntN n -> SymIntN n -> SymIntN n Source #

quotRemOr :: (SymIntN n, SymIntN n) -> SymIntN n -> SymIntN n -> (SymIntN n, SymIntN n) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

divOrZero :: (DivOr a, Num a) => a -> a -> a Source #

Safe div with 0 returned on exception.

modOrDividend :: (DivOr a, Num a) => a -> a -> a Source #

Safe mod with dividend returned on exception.

quotOrZero :: (DivOr a, Num a) => a -> a -> a Source #

Safe quot with 0 returned on exception.

remOrDividend :: (DivOr a, Num a) => a -> a -> a Source #

Safe rem with dividend returned on exception.

divModOrZeroDividend :: (DivOr a, Num a) => a -> a -> (a, a) Source #

Safe divMod with 0 returned on exception.

quotRemOrZeroDividend :: (DivOr a, Num a) => a -> a -> (a, a) Source #

Safe quotRem with 0 returned on exception.

class (MonadError e m, TryMerge m, Mergeable a, DivOr a) => SafeDiv e a m where Source #

Safe division with monadic error handling in multi-path execution. These procedures throw an exception when the divisor is zero. The result should be able to handle errors with MonadError.

Minimal complete definition

(safeDiv, safeMod | safeDivMod), (safeQuot, safeRem | safeQuotRem)

Methods

safeDiv :: a -> a -> m a Source #

Safe div with monadic error handling in multi-path execution.

>>> safeDiv "a" "b" :: ExceptT ArithException Union SymInteger
ExceptT {If (= b 0) (Left divide by zero) (Right (div a b))}

safeMod :: a -> a -> m a Source #

Safe mod with monadic error handling in multi-path execution.

>>> safeMod "a" "b" :: ExceptT ArithException Union SymInteger
ExceptT {If (= b 0) (Left divide by zero) (Right (mod a b))}

safeDivMod :: a -> a -> m (a, a) Source #

Safe divMod with monadic error handling in multi-path execution.

>>> safeDivMod "a" "b" :: ExceptT ArithException Union (SymInteger, SymInteger)
ExceptT {If (= b 0) (Left divide by zero) (Right ((div a b),(mod a b)))}

safeQuot :: a -> a -> m a Source #

Safe quot with monadic error handling in multi-path execution.

safeRem :: a -> a -> m a Source #

Safe rem with monadic error handling in multi-path execution.

safeQuotRem :: a -> a -> m (a, a) Source #

Safe quotRem with monadic error handling in multi-path execution.

Instances

Instances details
(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Int16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Int32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Int64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Int8 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Word16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Word32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Word64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Word8 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadUnion m, MonadError ArithException m) => SafeDiv ArithException SymInteger m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Integer m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Int m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

safeDiv :: Int -> Int -> m Int Source #

safeMod :: Int -> Int -> m Int Source #

safeDivMod :: Int -> Int -> m (Int, Int) Source #

safeQuot :: Int -> Int -> m Int Source #

safeRem :: Int -> Int -> m Int Source #

safeQuotRem :: Int -> Int -> m (Int, Int) Source #

(MonadError ArithException m, TryMerge m) => SafeDiv ArithException Word m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(MonadError ArithException m, TryMerge m, KnownNat n, 1 <= n) => SafeDiv ArithException (IntN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

safeDiv :: IntN n -> IntN n -> m (IntN n) Source #

safeMod :: IntN n -> IntN n -> m (IntN n) Source #

safeDivMod :: IntN n -> IntN n -> m (IntN n, IntN n) Source #

safeQuot :: IntN n -> IntN n -> m (IntN n) Source #

safeRem :: IntN n -> IntN n -> m (IntN n) Source #

safeQuotRem :: IntN n -> IntN n -> m (IntN n, IntN n) Source #

(MonadError ArithException m, TryMerge m, KnownNat n, 1 <= n) => SafeDiv ArithException (WordN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

safeDiv :: WordN n -> WordN n -> m (WordN n) Source #

safeMod :: WordN n -> WordN n -> m (WordN n) Source #

safeDivMod :: WordN n -> WordN n -> m (WordN n, WordN n) Source #

safeQuot :: WordN n -> WordN n -> m (WordN n) Source #

safeRem :: WordN n -> WordN n -> m (WordN n) Source #

safeQuotRem :: WordN n -> WordN n -> m (WordN n, WordN n) Source #

(MonadError ArithException m, MonadUnion m, KnownNat n, 1 <= n) => SafeDiv ArithException (SymIntN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

Methods

safeDiv :: SymIntN n -> SymIntN n -> m (SymIntN n) Source #

safeMod :: SymIntN n -> SymIntN n -> m (SymIntN n) Source #

safeDivMod :: SymIntN n -> SymIntN n -> m (SymIntN n, SymIntN n) Source #

safeQuot :: SymIntN n -> SymIntN n -> m (SymIntN n) Source #

safeRem :: SymIntN n -> SymIntN n -> m (SymIntN n) Source #

safeQuotRem :: SymIntN n -> SymIntN n -> m (SymIntN n, SymIntN n) Source #

(MonadError ArithException m, MonadUnion m, KnownNat n, 1 <= n) => SafeDiv ArithException (SymWordN n) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeDiv

(forall (n :: Nat). (KnownNat n, 1 <= n) => SafeDiv e (bv n) (ExceptT e m), MonadError (Either SomeBVException e) m, TryMerge m, Mergeable e, forall (n :: Nat). (KnownNat n, 1 <= n) => Num (bv n)) => SafeDiv (Either SomeBVException e) (SomeBV bv) m Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

safeDiv :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

safeMod :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

safeDivMod :: SomeBV bv -> SomeBV bv -> m (SomeBV bv, SomeBV bv) Source #

safeQuot :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

safeRem :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

safeQuotRem :: SomeBV bv -> SomeBV bv -> m (SomeBV bv, SomeBV bv) Source #

class (MonadError e m, TryMerge m, Mergeable a) => SafeLinearArith e a m where Source #

Safe division with monadic error handling in multi-path execution. These procedures throw an exception when overflow or underflow happens. The result should be able to handle errors with MonadError.

Methods

safeAdd :: a -> a -> m a Source #

Safe + with monadic error handling in multi-path execution. Overflows or underflows are treated as errors.

>>> safeAdd (ssym "a") (ssym "b") :: ExceptT ArithException Union SymInteger
ExceptT {Right (+ a b)}
>>> safeAdd (ssym "a") (ssym "b") :: ExceptT ArithException Union (SymIntN 4)
ExceptT {If (ite (< 0x0 a) (&& (< 0x0 b) (< (+ a b) 0x0)) (&& (< a 0x0) (&& (< b 0x0) (<= 0x0 (+ a b))))) (If (< 0x0 a) (Left arithmetic overflow) (Left arithmetic underflow)) (Right (+ a b))}

safeNeg :: a -> m a Source #

Safe negate with monadic error handling in multi-path execution. Overflows or underflows are treated as errors.

>>> safeNeg (ssym "a") :: ExceptT ArithException Union SymInteger
ExceptT {Right (- a)}
>>> safeNeg (ssym "a") :: ExceptT ArithException Union (SymIntN 4)
ExceptT {If (= a 0x8) (Left arithmetic overflow) (Right (- a))}

safeSub :: a -> a -> m a Source #

Safe - with monadic error handling in multi-path execution. Overflows or underflows are treated as errors.

>>> safeSub (ssym "a") (ssym "b") :: ExceptT ArithException Union SymInteger
ExceptT {Right (+ a (- b))}
>>> safeSub (ssym "a") (ssym "b") :: ExceptT ArithException Union (SymIntN 4)
ExceptT {If (ite (<= 0x0 a) (&& (< b 0x0) (< (+ a (- b)) 0x0)) (&& (< a 0x0) (&& (< 0x0 b) (< 0x0 (+ a (- b)))))) (If (<= 0x0 a) (Left arithmetic overflow) (Left arithmetic underflow)) (Right (+ a (- b)))}

Instances

Instances details
(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Int16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Int32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Int64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Int8 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

Methods

safeAdd :: Int8 -> Int8 -> m Int8 Source #

safeNeg :: Int8 -> m Int8 Source #

safeSub :: Int8 -> Int8 -> m Int8 Source #

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Word16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Word32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Word64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Word8 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException SymInteger m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Integer m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Int m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

Methods

safeAdd :: Int -> Int -> m Int Source #

safeNeg :: Int -> m Int Source #

safeSub :: Int -> Int -> m Int Source #

(MonadError ArithException m, TryMerge m) => SafeLinearArith ArithException Word m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

Methods

safeAdd :: Word -> Word -> m Word Source #

safeNeg :: Word -> m Word Source #

safeSub :: Word -> Word -> m Word Source #

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

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

Methods

safeAdd :: IntN n -> IntN n -> m (IntN n) Source #

safeNeg :: IntN n -> m (IntN n) Source #

safeSub :: IntN n -> IntN n -> m (IntN n) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

Methods

safeAdd :: WordN n -> WordN n -> m (WordN n) Source #

safeNeg :: WordN n -> m (WordN n) Source #

safeSub :: WordN n -> WordN n -> m (WordN n) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

Methods

safeAdd :: SymIntN n -> SymIntN n -> m (SymIntN n) Source #

safeNeg :: SymIntN n -> m (SymIntN n) Source #

safeSub :: SymIntN n -> SymIntN n -> m (SymIntN n) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SafeLinearArith

Methods

safeAdd :: SymWordN n -> SymWordN n -> m (SymWordN n) Source #

safeNeg :: SymWordN n -> m (SymWordN n) Source #

safeSub :: SymWordN n -> SymWordN n -> m (SymWordN n) Source #

(forall (n :: Nat). (KnownNat n, 1 <= n) => SafeLinearArith e (bv n) (ExceptT e m), MonadError (Either SomeBVException e) m, TryMerge m, Mergeable e, forall (n :: Nat). (KnownNat n, 1 <= n) => Num (bv n)) => SafeLinearArith (Either SomeBVException e) (SomeBV bv) m Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

safeAdd :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

safeNeg :: SomeBV bv -> m (SomeBV bv) Source #

safeSub :: SomeBV bv -> SomeBV bv -> m (SomeBV bv) Source #

class FdivOr a where Source #

Safe fractional with default values returned on exception.

Methods

fdivOr :: a -> a -> a -> a Source #

Safe / with default values returned on exception.

>>> fdivOr "d" "a" "b" :: SymAlgReal
(ite (= b 0.0) d (fdiv a b))

recipOr :: a -> a -> a Source #

Safe recip with default values returned on exception.

>>> recipOr "d" "a" :: SymAlgReal
(ite (= a 0.0) d (recip a))

fdivOrZero :: (FdivOr a, Num a) => a -> a -> a Source #

Safe / with 0 returned on exception.

recipOrZero :: (FdivOr a, Num a) => a -> a Source #

Safe recip with 0 returned on exception.

class (MonadError e m, TryMerge m, Mergeable a) => SafeFdiv e a m where Source #

Safe fractional division with monadic error handling in multi-path execution. These procedures throw an exception when the denominator is zero. The result should be able to handle errors with MonadError.

Minimal complete definition

safeFdiv

Methods

safeFdiv :: a -> a -> m a Source #

Safe fractional division with monadic error handling in multi-path execution.

>>> safeFdiv "a" "b" :: ExceptT ArithException Union SymAlgReal
ExceptT {If (= b 0.0) (Left Ratio has zero denominator) (Right (fdiv a b))}

safeRecip :: a -> m a Source #

Safe fractional reciprocal with monadic error handling in multi-path execution.

>>> safeRecip "a" :: ExceptT ArithException Union SymAlgReal
ExceptT {If (= a 0.0) (Left Ratio has zero denominator) (Right (recip a))}

default safeRecip :: Fractional a => a -> m a Source #

class LogBaseOr a where Source #

Safe logBase with default values returned on exception.

Methods

logBaseOr :: a -> a -> a -> a Source #

Safe logBase with default values returned on exception.

>>> logBaseOr "d" "base" "val" :: SymAlgReal
(ite (= base 1.0) d (fdiv (log val) (log base)))

Instances

Instances details
LogBaseOr SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeLogBase

logBaseOrZero :: (LogBaseOr a, Num a) => a -> a -> a Source #

Safe logBase with 0 returned on exception.

class (MonadError e m, TryMerge m, Mergeable a) => SafeLogBase e a m where Source #

Safe logBase with monadic error handling in multi-path execution. These procedures throw an exception when the base is 1. The result should be able to handle errors with MonadError.

Minimal complete definition

Nothing

Methods

safeLogBase :: a -> a -> m a Source #

Safe logBase with monadic error handling in multi-path execution.

>>> safeLogBase (ssym "base") (ssym "val") :: ExceptT ArithException Union SymAlgReal
ExceptT {If (= base 1.0) (Left Ratio has zero denominator) (Right (fdiv (log val) (log base)))}

Functions

class Function f arg ret | f -> arg ret where Source #

Abstraction for function-like types.

Methods

(#) :: f -> arg -> ret infixl 9 Source #

Function application operator.

The operator is not right associated (like ($)). It is left associated, and you can provide many arguments with this operator once at a time.

>>> (+1) # 2
3
>>> (+) # 2 # 3
5

Instances

Instances details
(Function f arg ret, Mergeable f, Mergeable ret) => Function (Union f) arg (Union ret) Source # 
Instance details

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

Methods

(#) :: Union f -> arg -> Union ret Source #

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

Defined in Grisette.Internal.SymPrim.GeneralFun

Methods

(#) :: (a --> b) -> sa -> sb Source #

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

Defined in Grisette.Internal.SymPrim.SymGeneralFun

Methods

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

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

Defined in Grisette.Internal.SymPrim.SymTabularFun

Methods

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

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

Defined in Grisette.Internal.SymPrim.TabularFun

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.Function

Methods

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

class Apply uf where Source #

Applying an uninterpreted function.

>>> let f = "f" :: SymInteger =~> SymInteger =~> SymInteger
>>> apply f "a" "b"
(apply (apply f a) b)

Note that for implementation reasons, you can also use apply function on a non-function symbolic value. In this case, the function is treated as an id function.

Associated Types

type FunType uf Source #

Methods

apply :: uf -> FunType uf Source #

Instances

Instances details
Apply SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymAlgReal

Associated Types

type FunType SymAlgReal Source #

Apply SymBool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBool

Associated Types

type FunType SymBool Source #

Apply SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Associated Types

type FunType SymFPRoundingMode Source #

Apply SymInteger Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymInteger

Associated Types

type FunType SymInteger Source #

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

Defined in Grisette.Internal.SymPrim.SymBV

Associated Types

type FunType (SymIntN n) Source #

Methods

apply :: SymIntN n -> FunType (SymIntN n) Source #

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

Defined in Grisette.Internal.SymPrim.SymBV

Associated Types

type FunType (SymWordN n) Source #

Methods

apply :: SymWordN n -> FunType (SymWordN n) Source #

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

Defined in Grisette.Internal.SymPrim.SymFP

Associated Types

type FunType (SymFP eb sb) Source #

Methods

apply :: SymFP eb sb -> FunType (SymFP eb sb) Source #

(LinkedRep ca sa, LinkedRep ct st, Apply st, SupportedNonFuncPrim ca, SupportedPrim ct, SupportedPrim (ca --> ct)) => Apply (sa -~> st) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymGeneralFun

Associated Types

type FunType (sa -~> st) Source #

Methods

apply :: (sa -~> st) -> FunType (sa -~> st) Source #

(LinkedRep ca sa, LinkedRep ct st, Apply st, SupportedPrim ca, SupportedPrim ct, SupportedPrim (ca =-> ct)) => Apply (sa =~> st) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymTabularFun

Associated Types

type FunType (sa =~> st) Source #

Methods

apply :: (sa =~> st) -> FunType (sa =~> st) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Function

Associated Types

type FunType (a -> b) Source #

Methods

apply :: (a -> b) -> FunType (a -> b) Source #

IEEE Floating points

fpIsNaN :: RealFloat a => a -> Bool Source #

Check if a floating-point number is not-a-number.

fpIsPositiveZero :: RealFloat a => a -> Bool Source #

Check if a floating-point number is positive zero.

fpIsNegativeZero :: RealFloat a => a -> Bool Source #

Check if a floating-point number is negative zero.

fpIsPositiveInfinite :: RealFloat a => a -> Bool Source #

Check if a floating-point number is positive infinite.

fpIsNegativeInfinite :: RealFloat a => a -> Bool Source #

Check if a floating-point number is negative infinite.

fpIsPositive :: RealFloat a => a -> Bool Source #

Check if a floating-point number is positive. +0, +inf are considered positive. nan, -0, -inf are not positive.

fpIsNegative :: RealFloat a => a -> Bool Source #

Check if a floating-point number is negative. -0, -inf are considered negative. nan, +0, +inf are not negative.

fpIsInfinite :: RealFloat a => a -> Bool Source #

Check if a floating-point number is infinite.

fpIsZero :: RealFloat a => a -> Bool Source #

Check if a floating-point number is zero.

fpIsNormal :: RealFloat a => a -> Bool Source #

Check if a floating-point number is normal, i.e., not 0, not inf, not nan, and not denormalized.

fpIsSubnormal :: RealFloat a => a -> Bool Source #

Check if a floating-point number is subnormal, i.e., denormalized. 0, inf, or nan are not subnormal.

fpIsPoint :: RealFloat a => a -> Bool Source #

Check if a floating-point number is a point, i.e., not inf, not nan.

class SymIEEEFPTraits a where Source #

A class for symbolic traits of IEEE floating-point numbers.

Methods

symFpIsNaN :: a -> SymBool Source #

Check if a symbolic floating-point number is not-a-number.

symFpIsPositive :: a -> SymBool Source #

Check if a symbolic floating-point number is positive. +0, +inf are considered positive. nan, -0, -inf are not positive.

symFpIsNegative :: a -> SymBool Source #

Check if a symbolic floating-point number is negative. -0, -inf are considered negative. nan, +0, +inf are not negative.

symFpIsPositiveInfinite :: a -> SymBool Source #

Check if a symbolic floating-point number is positive infinite.

symFpIsNegativeInfinite :: a -> SymBool Source #

Check if a symbolic floating-point number is negative infinite.

symFpIsInfinite :: a -> SymBool Source #

Check if a symbolic floating-point number is infinite.

symFpIsPositiveZero :: a -> SymBool Source #

Check if a symbolic floating-point number is positive zero.

symFpIsNegativeZero :: a -> SymBool Source #

Check if a symbolic floating-point number is negative zero.

symFpIsZero :: a -> SymBool Source #

Check if a symbolic floating-point number is zero.

symFpIsNormal :: a -> SymBool Source #

Check if a symbolic floating-point number is normal, i.e., not 0, not inf, not nan, and not denormalized.

symFpIsSubnormal :: a -> SymBool Source #

Check if a symbolic floating-point number is subnormal, i.e., denormalized. 0, inf, or nan are not subnormal.

symFpIsPoint :: a -> SymBool Source #

Check if a symbolic floating-point number is a point, i.e., not inf, not nan.

Instances

Instances details
SymIEEEFPTraits Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymIEEEFP

SymIEEEFPTraits Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymIEEEFP

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

Defined in Grisette.Internal.Core.Data.Class.SymIEEEFP

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

Defined in Grisette.Internal.SymPrim.SymFP

class IEEEFPConstants a where Source #

Constants for IEEE floating-point numbers.

Methods

fpPositiveInfinite :: a Source #

Positive infinity.

fpNegativeInfinite :: a Source #

Negative infinity.

fpNaN :: a Source #

Not-a-number.

fpNegativeZero :: a Source #

Negative zero.

fpPositiveZero :: a Source #

Positive zero.

fpMinNormalized :: a Source #

Smallest positive normalized number.

fpMinSubnormal :: a Source #

Smallest positive subnormal number.

fpMaxNormalized :: a Source #

Largest positive normalized number.

fpMaxSubnormal :: a Source #

Largest positive subnormal number.

class IEEEFPRoundingMode mode where Source #

Rounding modes for floating-point operations.

Methods

rne :: mode Source #

Round to nearest, ties to even.

rna :: mode Source #

Round to nearest, ties to away from zero.

rtp :: mode Source #

Round towards positive infinity.

rtn :: mode Source #

Round towards negative infinity.

rtz :: mode Source #

Round towards zero.

class IEEEFPOp a where Source #

Operations on IEEE floating-point numbers, without rounding mode.

Methods

fpAbs :: a -> a Source #

IEEE754-2019 abs operation.

fpNeg :: a -> a Source #

IEEE754-2019 negate operation.

fpRem :: a -> a -> a Source #

IEEE754-2019 remainder operation.

fpMinimum :: a -> a -> a Source #

IEEE754-2019 minimum operation.

  • The comparison for zeros follows -0 < 0
  • Returns NaN if one operand is NaN.

fpMinimumNumber :: a -> a -> a Source #

IEEE754-2019 minimumNumber operation.

  • The comparison for zeros follows -0 < 0
  • Returns the other operand if one operand is NaN.

fpMaximum :: a -> a -> a Source #

IEEE754-2019 maximum operation.

  • The comparison for zeros follows -0 < 0
  • Returns NaN if one operand is NaN.

fpMaximumNumber :: a -> a -> a Source #

IEEE754-2019 maximumNumber operation.

  • The comparison for zeros follows -0 < 0
  • Returns the other operand if one operand is NaN.

Instances

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

Defined in Grisette.Internal.SymPrim.FP

Methods

fpAbs :: FP eb sb -> FP eb sb Source #

fpNeg :: FP eb sb -> FP eb sb Source #

fpRem :: FP eb sb -> FP eb sb -> FP eb sb Source #

fpMinimum :: FP eb sb -> FP eb sb -> FP eb sb Source #

fpMinimumNumber :: FP eb sb -> FP eb sb -> FP eb sb Source #

fpMaximum :: FP eb sb -> FP eb sb -> FP eb sb Source #

fpMaximumNumber :: FP eb sb -> FP eb sb -> FP eb sb Source #

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

Defined in Grisette.Internal.SymPrim.SymFP

Methods

fpAbs :: SymFP eb sb -> SymFP eb sb Source #

fpNeg :: SymFP eb sb -> SymFP eb sb Source #

fpRem :: SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

fpMinimum :: SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

fpMinimumNumber :: SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

fpMaximum :: SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

fpMaximumNumber :: SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

class IEEEFPRoundingMode mode => IEEEFPRoundingOp a mode | a -> mode where Source #

Operations on IEEE floating-point numbers, with rounding mode.

Methods

fpAdd :: mode -> a -> a -> a Source #

fpSub :: mode -> a -> a -> a Source #

fpMul :: mode -> a -> a -> a Source #

fpDiv :: mode -> a -> a -> a Source #

fpFMA :: mode -> a -> a -> a -> a Source #

fpSqrt :: mode -> a -> a Source #

fpRoundToIntegral :: mode -> a -> a Source #

Instances

Instances details
ValidFP eb sb => IEEEFPRoundingOp (FP eb sb) FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

fpAdd :: FPRoundingMode -> FP eb sb -> FP eb sb -> FP eb sb Source #

fpSub :: FPRoundingMode -> FP eb sb -> FP eb sb -> FP eb sb Source #

fpMul :: FPRoundingMode -> FP eb sb -> FP eb sb -> FP eb sb Source #

fpDiv :: FPRoundingMode -> FP eb sb -> FP eb sb -> FP eb sb Source #

fpFMA :: FPRoundingMode -> FP eb sb -> FP eb sb -> FP eb sb -> FP eb sb Source #

fpSqrt :: FPRoundingMode -> FP eb sb -> FP eb sb Source #

fpRoundToIntegral :: FPRoundingMode -> FP eb sb -> FP eb sb Source #

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

Defined in Grisette.Internal.SymPrim.SymFP

Methods

fpAdd :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

fpSub :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

fpMul :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

fpDiv :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

fpFMA :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

fpSqrt :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb Source #

fpRoundToIntegral :: SymFPRoundingMode -> SymFP eb sb -> SymFP eb sb Source #

class IEEEFPConvertible a fp mode | fp -> mode where Source #

Conversion from and to FPs.

Methods

fromFPOr Source #

Arguments

:: a

Default value when converting non-representable FPs. For example, when converting to non-FP types, the NaN and infinities are not representable. Additionally, when converting to bit-vectors, out-of-bound FPs are not representable.

Note that out-of-bound means that the value after conversion is out of bound, not the value before conversion, meaning that converting from 3.5 to 2-bit unsigned bit-vector is out-of-bound when rounding to positive, but not when rounding to negative.

-> mode

Rounding mode. Ignored when converting to AlgReal because every representable FP value is converted to an exact AlgReal.

-> fp

FP value.

-> a 

toFP :: mode -> a -> fp Source #

Instances

Instances details
ValidFP eb sb => IEEEFPConvertible AlgReal (FP eb sb) FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

ValidFP eb sb => IEEEFPConvertible SymAlgReal (SymFP eb sb) SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

ValidFP eb sb => IEEEFPConvertible SymInteger (SymFP eb sb) SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

ValidFP eb sb => IEEEFPConvertible Integer (FP eb sb) FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

(ValidFP eb sb, KnownNat n, 1 <= n) => IEEEFPConvertible (IntN n) (FP eb sb) FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

fromFPOr :: IntN n -> FPRoundingMode -> FP eb sb -> IntN n Source #

toFP :: FPRoundingMode -> IntN n -> FP eb sb Source #

(ValidFP eb sb, KnownNat n, 1 <= n) => IEEEFPConvertible (WordN n) (FP eb sb) FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

fromFPOr :: WordN n -> FPRoundingMode -> FP eb sb -> WordN n Source #

toFP :: FPRoundingMode -> WordN n -> FP eb sb Source #

(ValidFP eb sb, KnownNat n, 1 <= n) => IEEEFPConvertible (SymIntN n) (SymFP eb sb) SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

(ValidFP eb sb, KnownNat n, 1 <= n) => IEEEFPConvertible (SymWordN n) (SymFP eb sb) SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

(ValidFP eb sb, ValidFP eb' sb') => IEEEFPConvertible (FP eb' sb') (FP eb sb) FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

fromFPOr :: FP eb' sb' -> FPRoundingMode -> FP eb sb -> FP eb' sb' Source #

toFP :: FPRoundingMode -> FP eb' sb' -> FP eb sb Source #

(ValidFP eb sb, ValidFP eb' sb') => IEEEFPConvertible (SymFP eb' sb') (SymFP eb sb) SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Methods

fromFPOr :: SymFP eb' sb' -> SymFPRoundingMode -> SymFP eb sb -> SymFP eb' sb' Source #

toFP :: SymFPRoundingMode -> SymFP eb' sb' -> SymFP eb sb Source #

class (IEEEFPConvertible a fp mode, IEEEFPRoundingMode mode) => IEEEFPToAlgReal a fp mode | fp -> mode where Source #

Converting FP to real numbers.

Minimal complete definition

Nothing

Methods

fpToAlgReal :: a -> fp -> a Source #

Similar to fromFPOr for AlgReal, but dropped the ignored rounding mode.

Instances

Instances details
ValidFP eb sb => IEEEFPToAlgReal AlgReal (FP eb sb) FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

fpToAlgReal :: AlgReal -> FP eb sb -> AlgReal Source #

ValidFP eb sb => IEEEFPToAlgReal SymAlgReal (SymFP eb sb) SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Conversion between Concrete and Symbolic values

class ToCon a b where Source #

Convert a symbolic value to concrete value if possible.

Methods

toCon :: a -> Maybe b Source #

Convert a symbolic value to concrete value if possible. If the symbolic value cannot be converted to concrete, the result will be Nothing.

>>> toCon (ssym "a" :: SymInteger) :: Maybe Integer
Nothing
>>> toCon (con 1 :: SymInteger) :: Maybe Integer
Just 1

toCon works on complex types too.

>>> toCon ([con 1, con 2] :: [SymInteger]) :: Maybe [Integer]
Just [1,2]
>>> toCon ([con 1, ssym "a"] :: [SymInteger]) :: Maybe [Integer]
Nothing

Instances

Instances details
ToCon All All Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: All -> Maybe All Source #

ToCon Any Any Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Any -> Maybe Any Source #

ToCon Int16 Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Int16 -> Maybe Int16 Source #

ToCon Int32 Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Int32 -> Maybe Int32 Source #

ToCon Int64 Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Int64 -> Maybe Int64 Source #

ToCon Int8 Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Int8 -> Maybe Int8 Source #

ToCon Word16 Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon Word32 Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon Word64 Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon Word8 Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Word8 -> Maybe Word8 Source #

ToCon ByteString ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon Ordering Ordering Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon AssertionError AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon VerificationConditions VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon FPRoundingMode FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon NotRepresentableFPError NotRepresentableFPError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SomeBVException SomeBVException Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

ToCon SymAlgReal AlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SymAlgReal SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SymBool SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SymBool Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SymFP32 Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SymFP64 Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SymFPRoundingMode FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SymFPRoundingMode SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SymInteger SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon SymInteger Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon Text Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Text -> Maybe Text Source #

ToCon Integer Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon () () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

ToCon Bool Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Bool -> Maybe Bool Source #

ToCon Char Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Char -> Maybe Char Source #

ToCon Double Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToCon Float Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Float -> Maybe Float Source #

ToCon Int Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Int -> Maybe Int Source #

ToCon Word Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Word -> Maybe Word Source #

ToCon v v Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: v -> Maybe v Source #

ToCon a b => ToCon a (Identity b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

(Generic a, Generic b, GToCon Arity0 (Rep a) (Rep b)) => ToCon a (Default b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

ToCon a b => ToCon (Identity a) b Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Identity a -> Maybe b Source #

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

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

Methods

toCon :: Union a -> Maybe b Source #

ToCon (SymIntN 8) Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymIntN 8 -> Maybe Int8 Source #

ToCon (SymIntN 16) Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymIntN 16 -> Maybe Int16 Source #

ToCon (SymIntN 32) Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymIntN 32 -> Maybe Int32 Source #

ToCon (SymIntN 64) Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymIntN 64 -> Maybe Int64 Source #

ToCon (SymIntN 64) Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymIntN 64 -> Maybe Int Source #

ToCon (SymWordN 8) Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymWordN 8 -> Maybe Word8 Source #

ToCon (SymWordN 16) Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymWordN 16 -> Maybe Word16 Source #

ToCon (SymWordN 32) Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymWordN 32 -> Maybe Word32 Source #

ToCon (SymWordN 64) Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymWordN 64 -> Maybe Word64 Source #

ToCon (SymWordN 64) Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymWordN 64 -> Maybe Word Source #

ToCon a b => ToCon (Identity a) (Identity b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

ToCon a_1 a_2 => ToCon (First a_1) (First a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: First a_1 -> Maybe (First a_2) Source #

ToCon a_1 a_2 => ToCon (Last a_1) (Last a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Last a_1 -> Maybe (Last a_2) Source #

ToCon a_1 a_2 => ToCon (Down a_1) (Down a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Down a_1 -> Maybe (Down a_2) Source #

ToCon a_1 a_2 => ToCon (Dual a_1) (Dual a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Dual a_1 -> Maybe (Dual a_2) Source #

ToCon a_1 a_2 => ToCon (Product a_1) (Product a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Product a_1 -> Maybe (Product a_2) Source #

ToCon a_1 a_2 => ToCon (Sum a_1) (Sum a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Sum a_1 -> Maybe (Sum a_2) Source #

ToCon p0 p => ToCon (Par1 p0) (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Par1 p0 -> Maybe (Par1 p) Source #

ToCon a b => ToCon (Union a) (Union b) Source # 
Instance details

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

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

(forall (n :: Nat). (KnownNat n, 1 <= n) => ToCon (sbv n) (cbv n)) => ToCon (SomeBV sbv) (SomeBV cbv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

toCon :: SomeBV sbv -> Maybe (SomeBV cbv) Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

ToCon a_1 a_2 => ToCon (Maybe a_1) (Maybe a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Maybe a_1 -> Maybe (Maybe a_2) Source #

ToCon a_1 a_2 => ToCon [a_1] [a_2] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: [a_1] -> Maybe [a_2] Source #

(Generic1 f1, Generic1 f2, GToCon Arity1 (Rep1 f1) (Rep1 f2), ToCon a b) => ToCon (f1 a) (Default1 f2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: f1 a -> Maybe (Default1 f2 b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2) => ToCon (Either a_1 b_1) (Either a_2 b_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Either a_1 b_1 -> Maybe (Either a_2 b_2) Source #

(ToCon e1 e2, ToCon a1 a2) => ToCon (Either e1 a1) (CBMCEither e2 a2) Source # 
Instance details

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

Methods

toCon :: Either e1 a1 -> Maybe (CBMCEither e2 a2) Source #

ToCon (U1 p0) (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: U1 p0 -> Maybe (U1 p) Source #

ToCon (V1 p0) (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: V1 p0 -> Maybe (V1 p) Source #

(ToCon e1 e2, ToCon a1 a2) => ToCon (CBMCEither e1 a1) (Either e2 a2) Source # 
Instance details

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

Methods

toCon :: CBMCEither e1 a1 -> Maybe (Either e2 a2) Source #

(ToCon e1 e2, ToCon a1 a2) => ToCon (CBMCEither e1 a1) (CBMCEither e2 a2) Source # 
Instance details

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

Methods

toCon :: CBMCEither e1 a1 -> Maybe (CBMCEither e2 a2) Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: FP eb sb -> Maybe (FP eb sb) Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymFP eb sb -> Maybe (FP eb sb) Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: SymFP eb sb -> Maybe (SymFP eb sb) Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

(ToCon1 m1 m2, ToCon a b) => ToCon (MaybeT m1 a) (MaybeT m2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: MaybeT m1 a -> Maybe (MaybeT m2 b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2) => ToCon (a_1, b_1) (a_2, b_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1) -> Maybe (a_2, b_2) Source #

ToCon (m1 (CBMCEither e1 a)) (Either e2 b) => ToCon (CBMCExceptT e1 m1 a) (Either e2 b) Source # 
Instance details

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

Methods

toCon :: CBMCExceptT e1 m1 a -> Maybe (Either e2 b) Source #

ToCon (m1 (Either e1 a)) (Either e2 b) => ToCon (ExceptT e1 m1 a) (Either e2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: ExceptT e1 m1 a -> Maybe (Either e2 b) Source #

ToCon a0 a => ToCon (Const a0 b0) (Const a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Const a0 b0 -> Maybe (Const a b) Source #

ToCon (f0 a0) (f a) => ToCon (Ap f0 a0) (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Ap f0 a0 -> Maybe (Ap f a) Source #

ToCon (f0 a0) (f a) => ToCon (Alt f0 a0) (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Alt f0 a0 -> Maybe (Alt f a) Source #

ToCon (f0 p0) (f p) => ToCon (Rec1 f0 p0) (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Rec1 f0 p0 -> Maybe (Rec1 f p) Source #

(ToCon1 m1 m2, ToCon e1 e2, ToCon a b) => ToCon (CBMCExceptT e1 m1 a) (CBMCExceptT e2 m2 b) Source # 
Instance details

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

Methods

toCon :: CBMCExceptT e1 m1 a -> Maybe (CBMCExceptT e2 m2 b) Source #

(ToCon1 m1 m2, ToCon e1 e2, ToCon a b) => ToCon (ExceptT e1 m1 a) (ExceptT e2 m2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: ExceptT e1 m1 a -> Maybe (ExceptT e2 m2 b) Source #

(ToCon1 m m1, ToCon a b) => ToCon (IdentityT m a) (IdentityT m1 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: IdentityT m a -> Maybe (IdentityT m1 b) Source #

(ToCon1 m1 m2, ToCon a b, ToCon s1 s2) => ToCon (WriterT s1 m1 a) (WriterT s2 m2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: WriterT s1 m1 a -> Maybe (WriterT s2 m2 b) Source #

(ToCon1 m1 m2, ToCon a b, ToCon s1 s2) => ToCon (WriterT s1 m1 a) (WriterT s2 m2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: WriterT s1 m1 a -> Maybe (WriterT s2 m2 b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2) => ToCon (a_1, b_1, c_1) (a_2, b_2, c_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1) -> Maybe (a_2, b_2, c_2) Source #

(ToCon (l0 a0) (l a), ToCon (r0 a0) (r a)) => ToCon (Product l0 r0 a0) (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Product l0 r0 a0 -> Maybe (Product l r a) Source #

(ToCon (l0 a0) (l a), ToCon (r0 a0) (r a)) => ToCon (Sum l0 r0 a0) (Sum l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Sum l0 r0 a0 -> Maybe (Sum l r a) Source #

(ToCon (f0 p0) (f p), ToCon (g0 p0) (g p)) => ToCon ((f0 :*: g0) p0) ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (f0 :*: g0) p0 -> Maybe ((f :*: g) p) Source #

(ToCon (f0 p0) (f p), ToCon (g0 p0) (g p)) => ToCon ((f0 :+: g0) p0) ((f :+: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (f0 :+: g0) p0 -> Maybe ((f :+: g) p) Source #

ToCon c0 c => ToCon (K1 i0 c0 p0) (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: K1 i0 c0 p0 -> Maybe (K1 i c p) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2) => ToCon (a_1, b_1, c_1, d_1) (a_2, b_2, c_2, d_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1) -> Maybe (a_2, b_2, c_2, d_2) Source #

ToCon (f0 (g0 a0)) (f (g a)) => ToCon (Compose f0 g0 a0) (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: Compose f0 g0 a0 -> Maybe (Compose f g a) Source #

ToCon (f0 (g0 p0)) (f (g p)) => ToCon ((f0 :.: g0) p0) ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (f0 :.: g0) p0 -> Maybe ((f :.: g) p) Source #

ToCon (f0 p0) (f p) => ToCon (M1 i0 c0 f0 p0) (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: M1 i0 c0 f0 p0 -> Maybe (M1 i c f p) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2) => ToCon (a_1, b_1, c_1, d_1, e_1) (a_2, b_2, c_2, d_2, e_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1) -> Maybe (a_2, b_2, c_2, d_2, e_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1) (a_2, b_2, c_2, d_2, e_2, f_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2, ToCon n_1 n_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2, ToCon n_1 n_2, ToCon o_1 o_2) => ToCon (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1, o_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2, o_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1, o_1) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2, o_2) Source #

class (forall a b. ToCon a b => ToCon (f1 a) (f2 b)) => ToCon1 f1 f2 where Source #

Lifting of ToCon to unary type constructors.

Methods

liftToCon :: (a -> Maybe b) -> f1 a -> Maybe (f2 b) Source #

Lift a conversion to concrete function to unary type constructors.

Instances

Instances details
ToCon1 Identity Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Identity a -> Maybe (Identity b) Source #

ToCon1 First First Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> First a -> Maybe (First b) Source #

ToCon1 Last Last Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Last a -> Maybe (Last b) Source #

ToCon1 Down Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Down a -> Maybe (Down b) Source #

ToCon1 Dual Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Dual a -> Maybe (Dual b) Source #

ToCon1 Product Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Product a -> Maybe (Product b) Source #

ToCon1 Sum Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Sum a -> Maybe (Sum b) Source #

ToCon1 Union Union Source # 
Instance details

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

Methods

liftToCon :: (a -> Maybe b) -> Union a -> Maybe (Union b) Source #

ToCon1 Maybe Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Maybe a -> Maybe (Maybe b) Source #

ToCon1 List List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> [a] -> Maybe [b] Source #

(Generic1 f1, Generic1 f2, GToCon Arity1 (Rep1 f1) (Rep1 f2)) => ToCon1 f1 (Default1 f2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> f1 a -> Maybe (Default1 f2 b) Source #

ToCon a_1 a_2 => ToCon1 (Either a_1) (Either a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Either a_1 a -> Maybe (Either a_2 b) Source #

ToCon1 m1 m2 => ToCon1 (MaybeT m1) (MaybeT m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> MaybeT m1 a -> Maybe (MaybeT m2 b) Source #

ToCon a_1 a_2 => ToCon1 ((,) a_1) ((,) a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, a) -> Maybe (a_2, b) Source #

ToCon a0 a => ToCon1 (Const a0 :: Type -> Type) (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a1 -> Maybe b) -> Const a0 a1 -> Maybe (Const a b) Source #

ToCon1 f0 f => ToCon1 (Ap f0) (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Ap f0 a -> Maybe (Ap f b) Source #

ToCon1 f0 f => ToCon1 (Alt f0) (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Alt f0 a -> Maybe (Alt f b) Source #

(ToCon1 m1 m2, ToCon e1 e2) => ToCon1 (ExceptT e1 m1) (ExceptT e2 m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> ExceptT e1 m1 a -> Maybe (ExceptT e2 m2 b) Source #

ToCon1 m m1 => ToCon1 (IdentityT m) (IdentityT m1) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> IdentityT m a -> Maybe (IdentityT m1 b) Source #

(ToCon1 m1 m2, ToCon s1 s2) => ToCon1 (WriterT s1 m1) (WriterT s2 m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> WriterT s1 m1 a -> Maybe (WriterT s2 m2 b) Source #

(ToCon1 m1 m2, ToCon s1 s2) => ToCon1 (WriterT s1 m1) (WriterT s2 m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> WriterT s1 m1 a -> Maybe (WriterT s2 m2 b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2) => ToCon1 ((,,) a_1 b_1) ((,,) a_2 b_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, a) -> Maybe (a_2, b_2, b) Source #

(ToCon1 l0 l, ToCon1 r0 r) => ToCon1 (Product l0 r0) (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Product l0 r0 a -> Maybe (Product l r b) Source #

(ToCon1 l0 l, ToCon1 r0 r) => ToCon1 (Sum l0 r0) (Sum l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Sum l0 r0 a -> Maybe (Sum l r b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2) => ToCon1 ((,,,) a_1 b_1 c_1) ((,,,) a_2 b_2 c_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, a) -> Maybe (a_2, b_2, c_2, b) Source #

(ToCon1 f0 f, ToCon1 g0 g) => ToCon1 (Compose f0 g0) (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> Compose f0 g0 a -> Maybe (Compose f g b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2) => ToCon1 ((,,,,) a_1 b_1 c_1 d_1) ((,,,,) a_2 b_2 c_2 d_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, a) -> Maybe (a_2, b_2, c_2, d_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2) => ToCon1 ((,,,,,) a_1 b_1 c_1 d_1 e_1) ((,,,,,) a_2 b_2 c_2 d_2 e_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2) => ToCon1 ((,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1) ((,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, f_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2) => ToCon1 ((,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1) ((,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2) => ToCon1 ((,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1) ((,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2) => ToCon1 ((,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1) ((,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2) => ToCon1 ((,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1) ((,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2) => ToCon1 ((,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1) ((,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2) => ToCon1 ((,,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1 l_1) ((,,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2 l_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2) => ToCon1 ((,,,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1 l_1 m_1) ((,,,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2 l_2 m_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, b) Source #

(ToCon a_1 a_2, ToCon b_1 b_2, ToCon c_1 c_2, ToCon d_1 d_2, ToCon e_1 e_2, ToCon f_1 f_2, ToCon g_1 g_2, ToCon h_1 h_2, ToCon i_1 i_2, ToCon j_1 j_2, ToCon k_1 k_2, ToCon l_1 l_2, ToCon m_1 m_2, ToCon n_1 n_2) => ToCon1 ((,,,,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1 l_1 m_1 n_1) ((,,,,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2 l_2 m_2 n_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1, a) -> Maybe (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2, b) Source #

toCon1 :: (ToCon1 f1 f2, ToCon a b) => f1 a -> Maybe (f2 b) Source #

Lift the standard toCon to unary type constructors.

class (forall a b. ToCon a b => ToCon1 (f1 a) (f2 b)) => ToCon2 f1 f2 where Source #

Lifting of ToCon to binary type constructors.

Methods

liftToCon2 :: (a -> Maybe b) -> (c -> Maybe d) -> f1 a c -> Maybe (f2 b d) Source #

Lift conversion to concrete functions to binary type constructors.

Instances

Instances details
ToCon2 Either Either Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon2 :: (a -> Maybe b) -> (c -> Maybe d) -> Either a c -> Maybe (Either b d) Source #

ToCon2 (,) (,) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon2 :: (a0 -> Maybe b0) -> (c -> Maybe d) -> (a, a0, c) -> Maybe (b, b0, d) Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon2 :: (a0 -> Maybe b0) -> (c0 -> Maybe d0) -> (a, b, a0, c0) -> Maybe (c, d, b0, d0) Source #

toCon2 :: (ToCon2 f1 f2, ToCon a b, ToCon c d) => f1 a c -> Maybe (f2 b d) Source #

Lift the standard toCon to binary type constructors.

class Mergeable b => ToSym a b where Source #

Convert a concrete value to symbolic value.

Methods

toSym :: a -> b Source #

Convert a concrete value to symbolic value.

>>> toSym False :: SymBool
false
>>> toSym [False, True] :: [SymBool]
[false,true]

Instances

Instances details
ToSym All All Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: All -> All Source #

ToSym Any Any Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Any -> Any Source #

ToSym Int16 Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int16 -> Int16 Source #

ToSym Int32 Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int32 -> Int32 Source #

ToSym Int64 Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int64 -> Int64 Source #

ToSym Int8 Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int8 -> Int8 Source #

ToSym Word16 Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word16 -> Word16 Source #

ToSym Word32 Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word32 -> Word32 Source #

ToSym Word64 Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word64 -> Word64 Source #

ToSym Word8 Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word8 -> Word8 Source #

ToSym ByteString ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym Ordering Ordering Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym AssertionError AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym VerificationConditions VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym AlgReal SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym FPRoundingMode FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym FPRoundingMode SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym NotRepresentableFPError NotRepresentableFPError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym SomeBVException SomeBVException Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

ToSym SymAlgReal SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym SymBool SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym SymFPRoundingMode SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym SymInteger SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym Text Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Text -> Text Source #

ToSym Integer SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym Integer Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

ToSym () () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: () -> () Source #

ToSym Bool SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Bool -> SymBool Source #

ToSym Bool Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Bool -> Bool Source #

ToSym Char Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Char -> Char Source #

ToSym Double SymFP64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Double -> SymFP64 Source #

ToSym Double Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Double -> Double Source #

ToSym Float SymFP32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Float -> SymFP32 Source #

ToSym Float Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Float -> Float Source #

ToSym Int Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int -> Int Source #

ToSym Word Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word -> Word Source #

Mergeable a => ToSym a a Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: a -> a Source #

ToSym Int16 (SymIntN 16) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int16 -> SymIntN 16 Source #

ToSym Int32 (SymIntN 32) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int32 -> SymIntN 32 Source #

ToSym Int64 (SymIntN 64) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int64 -> SymIntN 64 Source #

ToSym Int8 (SymIntN 8) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int8 -> SymIntN 8 Source #

ToSym Word16 (SymWordN 16) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word16 -> SymWordN 16 Source #

ToSym Word32 (SymWordN 32) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word32 -> SymWordN 32 Source #

ToSym Word64 (SymWordN 64) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word64 -> SymWordN 64 Source #

ToSym Word8 (SymWordN 8) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word8 -> SymWordN 8 Source #

ToSym Int (SymIntN 64) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Int -> SymIntN 64 Source #

ToSym Word (SymWordN 64) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Word -> SymWordN 64 Source #

ToSym a b => ToSym a (Identity b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: a -> Identity b Source #

(Generic a, Generic b, GToSym Arity0 (Rep a) (Rep b), GMergeable Arity0 (Rep b)) => ToSym a (Default b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: a -> Default b Source #

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

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

Methods

toSym :: a -> Union b Source #

ToSym a b => ToSym (Identity a) b Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Identity a -> b Source #

ToSym (Union Integer) SymInteger Source # 
Instance details

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

ToSym (Union Bool) SymBool Source # 
Instance details

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

ToSym a b => ToSym (Identity a) (Identity b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Identity a -> Identity b Source #

ToSym a_1 a_2 => ToSym (First a_1) (First a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: First a_1 -> First a_2 Source #

ToSym a_1 a_2 => ToSym (Last a_1) (Last a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Last a_1 -> Last a_2 Source #

ToSym a_1 a_2 => ToSym (Down a_1) (Down a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Down a_1 -> Down a_2 Source #

ToSym a_1 a_2 => ToSym (Dual a_1) (Dual a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Dual a_1 -> Dual a_2 Source #

ToSym a_1 a_2 => ToSym (Product a_1) (Product a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Product a_1 -> Product a_2 Source #

ToSym a_1 a_2 => ToSym (Sum a_1) (Sum a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Sum a_1 -> Sum a_2 Source #

ToSym p0 p => ToSym (Par1 p0) (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Par1 p0 -> Par1 p Source #

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

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

Methods

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

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

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

Methods

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

ToSym a b => ToSym (Union a) (Union b) Source # 
Instance details

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

Methods

toSym :: Union a -> Union b Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: IntN n -> IntN n Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: IntN n -> SymIntN n Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: WordN n -> WordN n Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: WordN n -> SymWordN n Source #

(forall (n :: Nat). (KnownNat n, 1 <= n) => ToSym (cbv n) (sbv n)) => ToSym (SomeBV cbv) (SomeBV sbv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

toSym :: SomeBV cbv -> SomeBV sbv Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: SymIntN n -> SymIntN n Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: SymWordN n -> SymWordN n Source #

ToSym a_1 a_2 => ToSym (Maybe a_1) (Maybe a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Maybe a_1 -> Maybe a_2 Source #

ToSym a_1 a_2 => ToSym [a_1] [a_2] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: [a_1] -> [a_2] Source #

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

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

Methods

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

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

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

Methods

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

(Generic1 f1, Generic1 f2, GToSym Arity1 (Rep1 f1) (Rep1 f2), ToSym a b, GMergeable Arity1 (Rep1 f2)) => ToSym (f1 a) (Default1 f2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: f1 a -> Default1 f2 b Source #

(ToSym a_1 a_2, ToSym b_1 b_2) => ToSym (Either a_1 b_1) (Either a_2 b_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Either a_1 b_1 -> Either a_2 b_2 Source #

(ToSym e1 e2, ToSym a1 a2) => ToSym (Either e1 a1) (CBMCEither e2 a2) Source # 
Instance details

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

Methods

toSym :: Either e1 a1 -> CBMCEither e2 a2 Source #

ToSym (U1 p0) (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: U1 p0 -> U1 p Source #

ToSym (V1 p0) (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: V1 p0 -> V1 p Source #

(ToSym e1 e2, ToSym a1 a2) => ToSym (CBMCEither e1 a1) (Either e2 a2) Source # 
Instance details

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

Methods

toSym :: CBMCEither e1 a1 -> Either e2 a2 Source #

(ToSym e1 e2, ToSym a1 a2) => ToSym (CBMCEither e1 a1) (CBMCEither e2 a2) Source # 
Instance details

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

Methods

toSym :: CBMCEither e1 a1 -> CBMCEither e2 a2 Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: FP eb sb -> FP eb sb Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: FP eb sb -> SymFP eb sb Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: SymFP eb sb -> SymFP eb sb Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

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

(ToSym1 m1 m2, ToSym a b) => ToSym (MaybeT m1 a) (MaybeT m2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: MaybeT m1 a -> MaybeT m2 b Source #

(ToSym a_1 a_2, ToSym b_1 b_2) => ToSym (a_1, b_1) (a_2, b_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1) -> (a_2, b_2) Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a -> b) -> c -> d Source #

ToSym a0 a => ToSym (Const a0 b0) (Const a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Const a0 b0 -> Const a b Source #

ToSym (f0 a0) (f a) => ToSym (Ap f0 a0) (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Ap f0 a0 -> Ap f a Source #

ToSym (f0 a0) (f a) => ToSym (Alt f0 a0) (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Alt f0 a0 -> Alt f a Source #

ToSym (f0 p0) (f p) => ToSym (Rec1 f0 p0) (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Rec1 f0 p0 -> Rec1 f p Source #

(ToSym e1 e2, ToSym a b, ToSym1 m1 m2) => ToSym (CBMCExceptT e1 m1 a) (CBMCExceptT e2 m2 b) Source # 
Instance details

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

Methods

toSym :: CBMCExceptT e1 m1 a -> CBMCExceptT e2 m2 b Source #

(ToSym1 m1 m2, ToSym e1 e2, ToSym a b) => ToSym (ExceptT e1 m1 a) (ExceptT e2 m2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: ExceptT e1 m1 a -> ExceptT e2 m2 b Source #

(ToSym1 m m1, ToSym a b) => ToSym (IdentityT m a) (IdentityT m1 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: IdentityT m a -> IdentityT m1 b Source #

(ToSym s2 s1, ToSym1 m1 m2, ToSym a1 a2) => ToSym (ReaderT s1 m1 a1) (ReaderT s2 m2 a2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: ReaderT s1 m1 a1 -> ReaderT s2 m2 a2 Source #

(ToSym1 m1 m2, ToSym a1 a2, Mergeable s) => ToSym (StateT s m1 a1) (StateT s m2 a2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: StateT s m1 a1 -> StateT s m2 a2 Source #

(ToSym1 m1 m2, ToSym a1 a2, Mergeable s) => ToSym (StateT s m1 a1) (StateT s m2 a2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: StateT s m1 a1 -> StateT s m2 a2 Source #

(ToSym1 m1 m2, ToSym a b, ToSym s1 s2) => ToSym (WriterT s1 m1 a) (WriterT s2 m2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: WriterT s1 m1 a -> WriterT s2 m2 b Source #

(ToSym1 m1 m2, ToSym a b, ToSym s1 s2) => ToSym (WriterT s1 m1 a) (WriterT s2 m2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: WriterT s1 m1 a -> WriterT s2 m2 b Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2) => ToSym (a_1, b_1, c_1) (a_2, b_2, c_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1) -> (a_2, b_2, c_2) Source #

(ToSym (l0 a0) (l a), ToSym (r0 a0) (r a)) => ToSym (Product l0 r0 a0) (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Product l0 r0 a0 -> Product l r a Source #

(ToSym (l0 a0) (l a), ToSym (r0 a0) (r a)) => ToSym (Sum l0 r0 a0) (Sum l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Sum l0 r0 a0 -> Sum l r a Source #

(ToSym (f0 p0) (f p), ToSym (g0 p0) (g p)) => ToSym ((f0 :*: g0) p0) ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (f0 :*: g0) p0 -> (f :*: g) p Source #

(ToSym (f0 p0) (f p), ToSym (g0 p0) (g p)) => ToSym ((f0 :+: g0) p0) ((f :+: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (f0 :+: g0) p0 -> (f :+: g) p Source #

ToSym c0 c => ToSym (K1 i0 c0 p0) (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: K1 i0 c0 p0 -> K1 i c p Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2) => ToSym (a_1, b_1, c_1, d_1) (a_2, b_2, c_2, d_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1) -> (a_2, b_2, c_2, d_2) Source #

ToSym (f0 (g0 a0)) (f (g a)) => ToSym (Compose f0 g0 a0) (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: Compose f0 g0 a0 -> Compose f g a Source #

ToSym (f0 (g0 p0)) (f (g p)) => ToSym ((f0 :.: g0) p0) ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (f0 :.: g0) p0 -> (f :.: g) p Source #

ToSym (f0 p0) (f p) => ToSym (M1 i0 c0 f0 p0) (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: M1 i0 c0 f0 p0 -> M1 i c f p Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2) => ToSym (a_1, b_1, c_1, d_1, e_1) (a_2, b_2, c_2, d_2, e_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1) -> (a_2, b_2, c_2, d_2, e_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1) (a_2, b_2, c_2, d_2, e_2, f_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1) -> (a_2, b_2, c_2, d_2, e_2, f_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1, g_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2, ToSym k_1 k_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2, ToSym k_1 k_2, ToSym l_1 l_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2, ToSym k_1 k_2, ToSym l_1 l_2, ToSym m_1 m_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2, ToSym k_1 k_2, ToSym l_1 l_2, ToSym m_1 m_2, ToSym n_1 n_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2, ToSym k_1 k_2, ToSym l_1 l_2, ToSym m_1 m_2, ToSym n_1 n_2, ToSym o_1 o_2) => ToSym (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1, o_1) (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2, o_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1, o_1) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2, o_2) Source #

class (forall a b. ToSym a b => ToSym (f1 a) (f2 b), Mergeable1 f2) => ToSym1 f1 f2 where Source #

Lifting of ToSym to unary type constructors.

Methods

liftToSym :: Mergeable b => (a -> b) -> f1 a -> f2 b Source #

Lift a conversion to symbolic function to unary type constructors.

Instances

Instances details
ToSym1 Identity Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Identity a -> Identity b Source #

ToSym1 First First Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> First a -> First b Source #

ToSym1 Last Last Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Last a -> Last b Source #

ToSym1 Down Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Down a -> Down b Source #

ToSym1 Dual Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Dual a -> Dual b Source #

ToSym1 Product Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Product a -> Product b Source #

ToSym1 Sum Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Sum a -> Sum b Source #

ToSym1 Union Union Source # 
Instance details

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

Methods

liftToSym :: Mergeable b => (a -> b) -> Union a -> Union b Source #

ToSym1 Maybe Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Maybe a -> Maybe b Source #

ToSym1 List List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> [a] -> [b] Source #

(Generic1 f1, Generic1 f2, GToSym Arity1 (Rep1 f1) (Rep1 f2), GMergeable Arity1 (Rep1 f2)) => ToSym1 f1 (Default1 f2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> f1 a -> Default1 f2 b Source #

ToSym a_1 a_2 => ToSym1 (Either a_1) (Either a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Either a_1 a -> Either a_2 b Source #

ToSym1 m1 m2 => ToSym1 (MaybeT m1) (MaybeT m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> MaybeT m1 a -> MaybeT m2 b Source #

ToSym a_1 a_2 => ToSym1 ((,) a_1) ((,) a_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, a) -> (a_2, b) Source #

ToSym a0 a => ToSym1 (Const a0 :: Type -> Type) (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a1 -> b) -> Const a0 a1 -> Const a b Source #

ToSym1 f0 f => ToSym1 (Ap f0) (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Ap f0 a -> Ap f b Source #

ToSym1 f0 f => ToSym1 (Alt f0) (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Alt f0 a -> Alt f b Source #

(ToSym1 m1 m2, ToSym e1 e2) => ToSym1 (ExceptT e1 m1) (ExceptT e2 m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> ExceptT e1 m1 a -> ExceptT e2 m2 b Source #

ToSym1 m m1 => ToSym1 (IdentityT m) (IdentityT m1) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> IdentityT m a -> IdentityT m1 b Source #

(ToSym s2 s1, ToSym1 m1 m2, Mergeable1 m2) => ToSym1 (ReaderT s1 m1) (ReaderT s2 m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> ReaderT s1 m1 a -> ReaderT s2 m2 b Source #

(ToSym1 m1 m2, Mergeable s) => ToSym1 (StateT s m1) (StateT s m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> StateT s m1 a -> StateT s m2 b Source #

(ToSym1 m1 m2, Mergeable s) => ToSym1 (StateT s m1) (StateT s m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> StateT s m1 a -> StateT s m2 b Source #

(ToSym1 m1 m2, ToSym s1 s2) => ToSym1 (WriterT s1 m1) (WriterT s2 m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> WriterT s1 m1 a -> WriterT s2 m2 b Source #

(ToSym1 m1 m2, ToSym s1 s2) => ToSym1 (WriterT s1 m1) (WriterT s2 m2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> WriterT s1 m1 a -> WriterT s2 m2 b Source #

(ToSym a_1 a_2, ToSym b_1 b_2) => ToSym1 ((,,) a_1 b_1) ((,,) a_2 b_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, a) -> (a_2, b_2, b) Source #

(ToSym1 l0 l, ToSym1 r0 r) => ToSym1 (Product l0 r0) (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Product l0 r0 a -> Product l r b Source #

(ToSym1 l0 l, ToSym1 r0 r) => ToSym1 (Sum l0 r0) (Sum l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Sum l0 r0 a -> Sum l r b Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2) => ToSym1 ((,,,) a_1 b_1 c_1) ((,,,) a_2 b_2 c_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, a) -> (a_2, b_2, c_2, b) Source #

ToSym c a => ToSym1 ((->) a) ((->) c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a0 -> b) -> (a -> a0) -> c -> b Source #

(ToSym1 f0 f, ToSym1 g0 g) => ToSym1 (Compose f0 g0) (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> Compose f0 g0 a -> Compose f g b Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2) => ToSym1 ((,,,,) a_1 b_1 c_1 d_1) ((,,,,) a_2 b_2 c_2 d_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, a) -> (a_2, b_2, c_2, d_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2) => ToSym1 ((,,,,,) a_1 b_1 c_1 d_1 e_1) ((,,,,,) a_2 b_2 c_2 d_2 e_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, a) -> (a_2, b_2, c_2, d_2, e_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2) => ToSym1 ((,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1) ((,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, f_1, a) -> (a_2, b_2, c_2, d_2, e_2, f_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2) => ToSym1 ((,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1) ((,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, a) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2) => ToSym1 ((,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1) ((,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, a) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2) => ToSym1 ((,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1) ((,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, a) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2) => ToSym1 ((,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1) ((,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, a) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2, ToSym k_1 k_2) => ToSym1 ((,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1) ((,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, a) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2, ToSym k_1 k_2, ToSym l_1 l_2) => ToSym1 ((,,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1 l_1) ((,,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2 l_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, a) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2, ToSym k_1 k_2, ToSym l_1 l_2, ToSym m_1 m_2) => ToSym1 ((,,,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1 l_1 m_1) ((,,,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2 l_2 m_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, a) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, b) Source #

(ToSym a_1 a_2, ToSym b_1 b_2, ToSym c_1 c_2, ToSym d_1 d_2, ToSym e_1 e_2, ToSym f_1 f_2, ToSym g_1 g_2, ToSym h_1 h_2, ToSym i_1 i_2, ToSym j_1 j_2, ToSym k_1 k_2, ToSym l_1 l_2, ToSym m_1 m_2, ToSym n_1 n_2) => ToSym1 ((,,,,,,,,,,,,,,) a_1 b_1 c_1 d_1 e_1 f_1 g_1 h_1 i_1 j_1 k_1 l_1 m_1 n_1) ((,,,,,,,,,,,,,,) a_2 b_2 c_2 d_2 e_2 f_2 g_2 h_2 i_2 j_2 k_2 l_2 m_2 n_2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> (a_1, b_1, c_1, d_1, e_1, f_1, g_1, h_1, i_1, j_1, k_1, l_1, m_1, n_1, a) -> (a_2, b_2, c_2, d_2, e_2, f_2, g_2, h_2, i_2, j_2, k_2, l_2, m_2, n_2, b) Source #

toSym1 :: (ToSym1 f1 f2, ToSym a b) => f1 a -> f2 b Source #

Lift the standard toSym to unary type constructors.

class (forall a b. ToSym a b => ToSym1 (f1 a) (f2 b), Mergeable2 f2) => ToSym2 f1 f2 where Source #

Lifting of ToSym to binary type constructors.

Methods

liftToSym2 :: (a -> b) -> (c -> d) -> f1 a c -> f2 b d Source #

Lift conversion to symbolic functions to binary type constructors.

Instances

Instances details
ToSym2 Either Either Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym2 :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

ToSym2 (,) (,) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym2 :: (a0 -> b0) -> (c -> d) -> (a, a0, c) -> (b, b0, d) Source #

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

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym2 :: (a0 -> b0) -> (c0 -> d0) -> (a, b, a0, c0) -> (c, d, b0, d0) Source #

toSym2 :: (ToSym2 f1 f2, ToSym a b, ToSym c d) => f1 a c -> f2 b d Source #

Lift the standard toSym to binary type constructors.

Conversion between different symbolic types

class BitCast from to where Source #

Type class for bit-casting between types.

Special Considerations for Floating-Point Types:

Typically, bit-casting a value from type a to type b and then back to type a should result in the original value. However, this is not always true for floating-point values. In SMT-LIB2, there is only one NaN value with multiple bit representations.

Given this, we do not provide BitCast for the FP type, instead, we use the bitCastOrCanonical function to use a canonical representation for the NaN values.

If your application requires distinguishing between different NaN values, it is recommended to define your own floating-point type using bit-vectors. This allows you to check for NaN values and perform operations by bitcasting back to the provided floating-point types when they are not NaN values.

Methods

bitCast :: from -> to Source #

Instances

Instances details
BitCast Int16 FP16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: Int16 -> FP16 Source #

BitCast Int32 Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Int32 -> Word32 Source #

BitCast Int32 FP32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: Int32 -> FP32 Source #

BitCast Int32 Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Int32 -> Float Source #

BitCast Int64 Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Int64 -> Word64 Source #

BitCast Int64 FP64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: Int64 -> FP64 Source #

BitCast Int64 Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Int64 -> Double Source #

BitCast Word16 FP16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: Word16 -> FP16 Source #

BitCast Word32 Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Word32 -> Int32 Source #

BitCast Word32 FP32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: Word32 -> FP32 Source #

BitCast Word32 Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Word32 -> Float Source #

BitCast Word64 Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Word64 -> Int64 Source #

BitCast Word64 FP64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: Word64 -> FP64 Source #

BitCast Word64 Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

BitCast IntN32 Float Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN32 -> Float Source #

BitCast IntN64 Double Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

BitCast WordN32 Float Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

BitCast WordN64 Double Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

BitCast Double Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Double -> Int64 Source #

BitCast Double Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

BitCast Double IntN64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

BitCast Double WordN64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

BitCast Double FP64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: Double -> FP64 Source #

BitCast Float Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Float -> Int32 Source #

BitCast Float Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.BitCast

Methods

bitCast :: Float -> Word32 Source #

BitCast Float IntN32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Float -> IntN32 Source #

BitCast Float WordN32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

BitCast Float FP32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: Float -> FP32 Source #

BitCast Int16 (IntN 16) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Int16 -> IntN 16 Source #

BitCast Int16 (WordN 16) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Int16 -> WordN 16 Source #

BitCast Int32 (IntN 32) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Int32 -> IntN 32 Source #

BitCast Int32 (WordN 32) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Int32 -> WordN 32 Source #

BitCast Int64 (IntN 64) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Int64 -> IntN 64 Source #

BitCast Int64 (WordN 64) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Int64 -> WordN 64 Source #

BitCast Int8 (IntN 8) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Int8 -> IntN 8 Source #

BitCast Int8 (WordN 8) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Int8 -> WordN 8 Source #

BitCast Word16 (IntN 16) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Word16 -> IntN 16 Source #

BitCast Word16 (WordN 16) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Word16 -> WordN 16 Source #

BitCast Word32 (IntN 32) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Word32 -> IntN 32 Source #

BitCast Word32 (WordN 32) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Word32 -> WordN 32 Source #

BitCast Word64 (IntN 64) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Word64 -> IntN 64 Source #

BitCast Word64 (WordN 64) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Word64 -> WordN 64 Source #

BitCast Word8 (IntN 8) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Word8 -> IntN 8 Source #

BitCast Word8 (WordN 8) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Word8 -> WordN 8 Source #

BitCast SymBool (SymIntN 1) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

Methods

bitCast :: SymBool -> SymIntN 1 Source #

BitCast SymBool (SymWordN 1) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

BitCast Bool (IntN 1) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Bool -> IntN 1 Source #

BitCast Bool (WordN 1) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: Bool -> WordN 1 Source #

BitCast (IntN 1) Bool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN 1 -> Bool Source #

BitCast (IntN 8) Int8 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN 8 -> Int8 Source #

BitCast (IntN 8) Word8 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN 8 -> Word8 Source #

BitCast (IntN 16) Int16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN 16 -> Int16 Source #

BitCast (IntN 16) Word16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN 16 -> Word16 Source #

BitCast (IntN 32) Int32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN 32 -> Int32 Source #

BitCast (IntN 32) Word32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN 32 -> Word32 Source #

BitCast (IntN 64) Int64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN 64 -> Int64 Source #

BitCast (IntN 64) Word64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN 64 -> Word64 Source #

BitCast (WordN 1) Bool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN 1 -> Bool Source #

BitCast (WordN 8) Int8 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN 8 -> Int8 Source #

BitCast (WordN 8) Word8 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN 8 -> Word8 Source #

BitCast (WordN 16) Int16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN 16 -> Int16 Source #

BitCast (WordN 16) Word16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN 16 -> Word16 Source #

BitCast (WordN 32) Int32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN 32 -> Int32 Source #

BitCast (WordN 32) Word32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN 32 -> Word32 Source #

BitCast (WordN 64) Int64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN 64 -> Int64 Source #

BitCast (WordN 64) Word64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN 64 -> Word64 Source #

BitCast (SymIntN 1) SymBool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

Methods

bitCast :: SymIntN 1 -> SymBool Source #

BitCast (SymWordN 1) SymBool Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymBV

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

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: IntN n -> WordN n Source #

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

Defined in Grisette.Internal.SymPrim.BV

Methods

bitCast :: WordN n -> IntN n Source #

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

Defined in Grisette.Internal.SymPrim.SymBV

Methods

bitCast :: SymIntN n -> SymWordN n Source #

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

Defined in Grisette.Internal.SymPrim.SymBV

Methods

bitCast :: SymWordN n -> SymIntN n Source #

(ValidFP eb sb, r ~ (eb + sb)) => BitCast (IntN r) (FP eb sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: IntN r -> FP eb sb Source #

(ValidFP eb sb, r ~ (eb + sb)) => BitCast (WordN r) (FP eb sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCast :: WordN r -> FP eb sb Source #

(ValidFP eb sb, r ~ (eb + sb)) => BitCast (SymIntN r) (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Methods

bitCast :: SymIntN r -> SymFP eb sb Source #

(ValidFP eb sb, r ~ (eb + sb)) => BitCast (SymWordN r) (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Methods

bitCast :: SymWordN r -> SymFP eb sb Source #

class BitCastCanonical from to where Source #

The canonical value when the bitcast cannot be precisely performed.

For example, with SMT-LIB2, there is only one NaN for floating point numbers, with multiple bit representations. Our underlying FP type also follows this convention. This means that we cannot precisely bitcast a FP to other types. So instead, we bitcast the NaN value to a canonical representation, defined with this type class.

Methods

bitCastCanonicalValue :: proxy from -> to Source #

Instances

Instances details
BitCastCanonical FP16 Int16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastCanonical FP16 Word16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastCanonical FP32 Int32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastCanonical FP32 Word32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastCanonical FP32 Float Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastCanonical FP64 Int64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastCanonical FP64 Word64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastCanonical FP64 Double Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

(ValidFP eb sb, n ~ (eb + sb)) => BitCastCanonical (FP eb sb) (IntN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCastCanonicalValue :: proxy (FP eb sb) -> IntN n Source #

(ValidFP eb sb, n ~ (eb + sb)) => BitCastCanonical (FP eb sb) (WordN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCastCanonicalValue :: proxy (FP eb sb) -> WordN n Source #

(ValidFP eb sb, r ~ (eb + sb)) => BitCastCanonical (SymFP eb sb) (SymIntN r) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Methods

bitCastCanonicalValue :: proxy (SymFP eb sb) -> SymIntN r Source #

(ValidFP eb sb, r ~ (eb + sb)) => BitCastCanonical (SymFP eb sb) (SymWordN r) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Methods

bitCastCanonicalValue :: proxy (SymFP eb sb) -> SymWordN r Source #

class BitCastOr from to where Source #

Bitcasting a value. If the value cannot be precisely bitcast, use the default value.

Methods

bitCastOr :: to -> from -> to Source #

Instances

Instances details
BitCastOr FP16 Int16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCastOr :: Int16 -> FP16 -> Int16 Source #

BitCastOr FP16 Word16 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastOr FP32 Int32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCastOr :: Int32 -> FP32 -> Int32 Source #

BitCastOr FP32 Word32 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastOr FP32 Float Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCastOr :: Float -> FP32 -> Float Source #

BitCastOr FP64 Int64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCastOr :: Int64 -> FP64 -> Int64 Source #

BitCastOr FP64 Word64 Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

BitCastOr FP64 Double Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

(ValidFP eb sb, n ~ (eb + sb)) => BitCastOr (FP eb sb) (IntN n) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCastOr :: IntN n -> FP eb sb -> IntN n Source #

(ValidFP eb sb, r ~ (eb + sb)) => BitCastOr (FP eb sb) (WordN r) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.FP

Methods

bitCastOr :: WordN r -> FP eb sb -> WordN r Source #

(ValidFP eb sb, r ~ (eb + sb)) => BitCastOr (SymFP eb sb) (SymIntN r) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Methods

bitCastOr :: SymIntN r -> SymFP eb sb -> SymIntN r Source #

(ValidFP eb sb, r ~ (eb + sb)) => BitCastOr (SymFP eb sb) (SymWordN r) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SymFP

Methods

bitCastOr :: SymWordN r -> SymFP eb sb -> SymWordN r Source #

type BitCastOrCanonical a b = (BitCastCanonical a b, BitCastOr a b) Source #

Constraint for bitcasting a value and when the value cannot be precisely bitcast, use the canonical value.

bitCastOrCanonical :: BitCastOrCanonical from to => from -> to Source #

Bitcasting a value and when the value cannot be precisely bitcast, use the canonical value.

class (MonadError e m, TryMerge m, Mergeable b, BitCastOr a b) => SafeBitCast e a b m where Source #

Bitcasting a value. If the value cannot be precisely bitcast, throw an error.

Methods

safeBitCast :: a -> m b Source #

Instances

Instances details
(MonadError NotRepresentableFPError m, TryMerge m) => SafeBitCast NotRepresentableFPError FP16 Int16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP16 -> m Int16 Source #

(MonadError NotRepresentableFPError m, TryMerge m) => SafeBitCast NotRepresentableFPError FP16 Word16 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP16 -> m Word16 Source #

(MonadError NotRepresentableFPError m, TryMerge m) => SafeBitCast NotRepresentableFPError FP32 Int32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP32 -> m Int32 Source #

(MonadError NotRepresentableFPError m, TryMerge m) => SafeBitCast NotRepresentableFPError FP32 Word32 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP32 -> m Word32 Source #

(MonadError NotRepresentableFPError m, TryMerge m) => SafeBitCast NotRepresentableFPError FP32 Float m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP32 -> m Float Source #

(MonadError NotRepresentableFPError m, TryMerge m) => SafeBitCast NotRepresentableFPError FP64 Int64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP64 -> m Int64 Source #

(MonadError NotRepresentableFPError m, TryMerge m) => SafeBitCast NotRepresentableFPError FP64 Word64 m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP64 -> m Word64 Source #

(MonadError NotRepresentableFPError m, TryMerge m) => SafeBitCast NotRepresentableFPError FP64 Double m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP64 -> m Double Source #

(ValidFP eb sb, r ~ (eb + sb), KnownNat r, 1 <= r, TryMerge m, MonadError NotRepresentableFPError m) => SafeBitCast NotRepresentableFPError (FP eb sb) (IntN r) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP eb sb -> m (IntN r) Source #

(ValidFP eb sb, r ~ (eb + sb), KnownNat r, 1 <= r, TryMerge m, MonadError NotRepresentableFPError m) => SafeBitCast NotRepresentableFPError (FP eb sb) (WordN r) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: FP eb sb -> m (WordN r) Source #

(ValidFP eb sb, r ~ (eb + sb), KnownNat r, 1 <= r, MonadUnion m, MonadError NotRepresentableFPError m) => SafeBitCast NotRepresentableFPError (SymFP eb sb) (SymIntN r) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: SymFP eb sb -> m (SymIntN r) Source #

(ValidFP eb sb, r ~ (eb + sb), KnownNat r, 1 <= r, MonadUnion m, MonadError NotRepresentableFPError m) => SafeBitCast NotRepresentableFPError (SymFP eb sb) (SymWordN r) m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeBitCast

Methods

safeBitCast :: SymFP eb sb -> m (SymWordN r) Source #

class SymFromIntegral from to where Source #

Conversion from a symbolic integral type.

Methods

symFromIntegral :: from -> to Source #

Instances

Instances details
SymFromIntegral SymInteger SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

SymFromIntegral SymInteger SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

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

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

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

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

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

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

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

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

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

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

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

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

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

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

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

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

(KnownNat n, KnownNat m, 1 <= n, 1 <= m) => SymFromIntegral (SymIntN n) (SymWordN m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

(KnownNat n, KnownNat m, 1 <= n, 1 <= m) => SymFromIntegral (SymWordN n) (SymIntN m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

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

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

(KnownNat n, 1 <= n, ValidFP eb sb) => SymFromIntegral (SymIntN n) (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

Methods

symFromIntegral :: SymIntN n -> SymFP eb sb Source #

(KnownNat n, 1 <= n, ValidFP eb sb) => SymFromIntegral (SymWordN n) (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymFromIntegral

Methods

symFromIntegral :: SymWordN n -> SymFP eb sb Source #

Unsolvable types and merging

There are types that be directly represented as SMT formulas and therefore not directly supported by the SMT solvers. These types are referred to as unsolvable types. To symbolically evaluate such types, we represent them with symbolic unions. A symbolic union is a set of multiple values from different execution paths, each guarded with a corresponding path condition. The value of a union can be determined by an SMT solver based on the truth value of the path conditions.

Union basics

In Grisette, the symbolic union type is Union. Two constructs are useful in constructing symbolic union values: mrgIf and mrgSingle. mrgSingle unconditionally wraps a value in a symbolic union container, while mrgIf models branching control flow semantics with symbolic conditions. Here are some examples of using mrgSingle and mrgIf:

>>> mrgSingle ["a"] :: Union [SymInteger]
{[a]}
>>> mrgIf "a" (mrgSingle ["b"]) (mrgSingle ["c", "d"]) :: Union [SymInteger]
{If a [b] [c,d]}

Union is a monad, and its bind operation is similar to tree substitution. This means you can then use monadic constructs to model sequential programs. For example, the following pseudo code can be modeled in Grisette with the combinators provided by Grisette, and the do-notation:

x = if a then [b] else [b,c] -- pseudo code, not Grisette code
y = if d then [e] else [e,f]
return (x ++ y :: [SymInteger])
>>> :{
  ret :: Union [SymInteger]
  ret = do x <- mrgIf "a" (return ["b"]) (return ["b","c"])
           y <- mrgIf "d" (return ["e"]) (return ["e","f"])
           -- we will explain mrgReturn later, but rule of thumb is to
           -- always use mrg* functions if provided by Grisette and if
           -- you don't understand what will happen with ordinary return.
           mrgReturn $ x ++ y
:}

When this code is evaluated, the result would be as follows:

>>> ret
{If (&& a d) [b,e] (If (|| a d) [b,(ite a e c),(ite a f e)] [b,c,e,f])}

In the result, we can see that the results are reorganized and the two lists with the same length are merged together. This is important for scaling symbolic evaluation to real-world problems.

The mrgReturn function is crucial for ensuring that the results are merged. It resolves the Mergeable constraint, and retrieves a merging strategy for the contained type from the constraint. The merging strategy is then cached in the Union container to help merge the result of the entire do-block. This is necessary due to the constrained-monad problem, as the return function from the Monad type class cannot resolve extra constraints. Our solution to this problem with merging strategy caching is inspired by the knowledge propagation technique introduced in the blog post by Oleg Kiselyov.

In addition to mrgReturn, Grisette provides many combinators with the mrg prefix. You should use these combinators and always have the result cache the merging strategy. Consider the following code:

>>> return 1 :: Union Integer
<1>
>>> mrgReturn 1 :: Union Integer
{1}
>>> mrgIf "a" (return 1) (return 2) :: Union Integer
{If a 1 2}

In the first example, using return instead of mrgReturn results in a unmerged container (printed as <...>), which means that no merging strategy is cached. In the second and third example, using mrgReturn or mrgIf results in a merged container (printed as {...}) with a cached merging strategy.

When working with Union, it is important to always use the mrg prefixed combinators to ensure that the merging strategy is properly cached. This will enable Grisette to properly merge the results of the entire do-block and scale symbolic evaluation to real-world problems. Those functions that merges the results can also further propagate the cached merging strategy, see how the result is merged:

>>> f x y = mrgIf "f" (return x) (return y) :: Union Integer
>>> do; a <- mrgIf "a" (return 1) (return 2); f a (a + 1)
{If (&& a f) 1 (If (|| a f) 2 3)}

For more details on this, see the documentation for Union, MergingStrategy, and the merging section in this module.

Working with user-defined types

To make a type compatible with the symbolic evaluation and merging in Grisette, you need to implement the Mergeable type class. If you are only working with algebraic data types, you can derive the Mergeable instance automatically For example:

>>> import GHC.Generics
>>> :{
  data X = X SymInteger Integer
    deriving (Generic, Show)
    deriving (Mergeable) via (Default X)
:}

Grisette also provide deriveAll template haskell procedure to derive all the instances for the classes that are relevant. This include Generic, Show, Mergeable, etc. If you only want to derive some of them, you can also use deriveAllExcept or derive.

>>> :{
data X = X SymInteger Integer
deriveAllExcept ''X [''Ord]
-- Ord is excluded because it is a symbolic type
:}

Having the Mergeable instance allows you to use the Union type to represent values of type X, and have them merged with the mrgIf combinator:

>>> mrgIf "c1" (mrgSingle $ X "b" 1) (mrgIf "c2" (mrgSingle $ X "c" 2) (mrgSingle $ X "d" 1)) :: Union X
{If (|| c1 (! c2)) (X (ite c1 b d) 1) (X c 2)}

Note that deriving all instances may need to enable many extensions, see deriveAll for details.

Using monad transformers

It is also possible to apply monad transformers onto Union to extend it with various mechanisms. For example, by applying ExceptT, you can symbolically evaluate a program with error handling. To do this, you will need to define an error type and derive the Mergeable instance for it. Then, you can use the combinators provided by MonadError (and the mrg* variants of them in Grisette.Lib.Control.Monad.Except) for error handling, and the mrgIf combinator will also work with transformed Union containers.

Here's an example using the ExceptT transformer to model error handling in Grisette:

>>> import Control.Monad.Except
>>> :{
  data Error = Fail
  deriveAll ''Error
:}
>>> mrgIf "a" (throwError Fail) (return "x") :: ExceptT Error Union SymInteger
ExceptT {If a (Left Fail) (Right x)}

This will return a symbolic union value representing a program that throws an error in the then branch and returns a value in the else branch.

Details of the merging algorithm

The following is the details of the merging algorithm. If you are not going to manually configure the system by writing a MergingStrategy and will only use the derived strategies, you can safely ignore the following contents in this section.

In Grisette, the symbolic union has the Ordered Guards (ORG) representation, which can be viewed as a nested if-then-else with some representation invariant.

For example, the following symbolic union represents a symbolic list of symbolic integers with length 1, 2 or 3. The values are kept sorted in the container: the list with length 1 is placed at the first place, the list with length 2 is placed at the second place, and so on.

\[ \left\{\begin{aligned}% &\texttt{[a]}&&\mathrm{if}&&\texttt{c1}\\% &\texttt{[b,b]}&&\mathrm{else~if}&&\texttt{c2}\\% &\texttt{[a,b,c]}&&\mathrm{otherwise}\end{aligned}\right. \]

In Haskell syntax, the container is represented as the following nested if-then-else tree

If c1 [a] (If c2 [b,b] [a,b,c])

The representations means that when c1 is true, then the value is a list [a], or when c1 is false and c2 is true, the value is a list [b,b], or otherwise the value is [a,b,c].

This representation allows you to use the constructs that are not supported by the underlying solvers freely. For example, when applying head on this structure, we can just distribute the head function through the three branches, and get

\[ \left\{\begin{aligned}% &\texttt{head [a]}&&\mathrm{if}&&\texttt{c1}\\% &\texttt{head [b,b]}&&\mathrm{else~if}&&\texttt{c2}\\% &\texttt{head [a,b,c]}&&\mathrm{otherwise} \end{aligned}\right. \]

or, equivalently

\[ \left\{\begin{aligned}% &\texttt{a}&&\mathrm{if}&&\texttt{c1}\\% &\texttt{b}&&\mathrm{else~if}&&\texttt{c2}\\% &\texttt{a}&&\mathrm{otherwise}% \end{aligned}\right. \]

Further symbolic evaluation will also distribute computations over the branches in this result, and the identical branches will cause redundant computation. To mitigate this, Grisette would try to merge the branches, and the previous result would become

\[ \left\{\begin{aligned}% &\texttt{a}&&\mathrm{if}&&\texttt{c1}\vee\neg\texttt{c2}\\% &\texttt{b}&&\mathrm{otherwise}\\% \end{aligned}\right. \]

Note that if the contained type is symbolic Boolean, we may further merge the values into a single formula.

\[ \left\{\begin{aligned}&\texttt{(ite c1 a (ite c2 b a))}&&\mathrm{unconditional}\end{aligned}\right. \]

In Grisette, such merging happens in the mrgIf or mrgIfPropagatedStrategy functions, which model the symbolic conditional branching semantics. To keep the merging efficient and generate small constraints, we enforce that the symbolic union maintains the values in a sorted way, and merge the unions with a mergesort-style merging algorithm. In the following example, the two ORG containers passed to the mrgIf are sorted with the natural ordering on the integers. In the result, the values are also organized in a sorted way, and the path conditions are correctly maintained.

\[ \texttt{mrgIf}\left[% \texttt{c},% \left\{\begin{aligned}% &\texttt{1}&&\mathrm{if}&&\texttt{c1}\\% &\texttt{3}&&\mathrm{else~if}&&\texttt{c2}\\% &\texttt{4}&&\mathrm{otherwise}% \end{aligned}\right.,% \left\{\begin{aligned}% &\texttt{1}&&\mathrm{if}&&\texttt{c3}\\% &\texttt{2}&&\mathrm{else~if}&&\texttt{c4}\\% &\texttt{4}&&\mathrm{otherwise}% \end{aligned}\right.% \right]% =\left\{\begin{aligned}% &\texttt{1}&&\mathrm{if}&&\texttt{(ite c c1 c3)}\\% &\texttt{2}&&\mathrm{else~if}&&\texttt{(&& (! c) c3)}\\% &\texttt{3}&&\mathrm{else~if}&&\texttt{(&& c c2)}\\% &\texttt{4}&&\mathrm{otherwise}% \end{aligned}\right. \]

So far, we have described ORG as a flat list of values. When the list is long, it is beneficial to partition the values and merge (some or all) partitions into nested ORG values. This hierarchical ORG representation is particularly useful for complex data types, such as tuples, which tend to yield long lists.

In the following example, v* are values, while t* are ORG containers. The values in the containers are first partitioned into three groups: {v11, v12, v13}, {v2}, and {v13}. In each group, the values share some common features, (e.g., they are constructed with the same data constructor). The values in each group are organized in a subtree, e.g., the first group is organized in the subtree t1. The hierarchical representation also keeps a representation invariant: at each level in the hierarchy, the values (or the subtrees) are also sorted by some criteria. Here, in the first level, the values are sorted by the constructor declaration order, and in the second level, the values are sorted by the concrete field in the constructor A. This criteria is given by the MergingStrategy in the Mergeable class, called the root merging strategy of the type.

data X = A Integer SymInteger | B | C

\[ \left\{\begin{aligned}% &\texttt{t1}&&\mathrm{if}&&\texttt{c1}\\% &\texttt{B}&&\mathrm{else if}&&\texttt{c2}\\% &\texttt{C}&&\mathrm{otherwise}&&% \end{aligned}\right.% \hspace{2em}\mathrm{where}\hspace{2em}% \texttt{t1} = \left\{\begin{aligned}% &\texttt{A 1 a}&&\mathrm{if}&&\texttt{c11}\\% &\texttt{A 3 b}&&\mathrm{else if}&&\texttt{c12}\\% &\texttt{A 4 (&& x y)}&&\mathrm{otherwise}&&% \end{aligned}\right. \]

In Haskell syntax, it can be represented as follows:

If      c1    (If c11 (A 1 a) (If c12 (A 3 b) (A 4 (&& x y))))
  (If   c2    B
              C)

All the symbolic unions in Grisette should maintain the hierarchical sorted invariant, and are sorted in the same way, with respect to the same merging strategy (the root merging strategy for the type). We can then merge the containers with a hierarchical merging algorithm: at each level, we align the values and subtrees, and merge the aligned ones. In the following example, mrgIf resolves the root merging strategy s, and calls the function mrgIf', which accepts the merging strategy as an argument. The symbolic union operands to the mrgIf' function must be sorted with the merging strategy passed to the function.

Here we use the name of the subtrees and values to indicate the order of them:

  • t1 should be placed before v3 in the then branch,
  • t1 and v4 can be aligned with t1' and v4', respectively.

The aligned subtrees will be merged recursively with mrgIf', with a sub-strategy given by the merging strategy s for the subtrees. For example, t1 and t1' will be merged with the sub-strategy s'. The aligned values will be merged with a merging function, also given by the merging strategy s. For example, v4 and v4' will be merged with the merging function f'.

The ordering and the sub-strategies are abstracted with SortedStrategy, and the merging functions will be wrapped in SimpleStrategy. The merging algorithm can then be configured by implementing the merging strategies for the types contained in a symbolic union. See the documentation for MergingStrategy for details.

\[ \begin{aligned}% & \texttt{mrgIf}\left[% \texttt{c},% \left\{\begin{aligned}% &\texttt{t1}&&\mathrm{if}&&\texttt{c1}\\% &\texttt{v3}&&\mathrm{else~if}&&\texttt{c2}\\% &\texttt{v4}&&\mathrm{otherwise}% \end{aligned}\right.,% \left\{\begin{aligned}% &\texttt{t1'}&&\mathrm{if}&&\texttt{c3}\\% &\texttt{t2'}&&\mathrm{else~if}&&\texttt{c4}\\% &\texttt{v4'}&&\mathrm{otherwise}% \end{aligned}\right.% \right]\\% =~ & \texttt{mrgIf'}\left[% \texttt{s},% \texttt{c},% \left\{\begin{aligned}% &\texttt{t1}&&\mathrm{if}&&\texttt{c1}\\% &\texttt{v3}&&\mathrm{else~if}&&\texttt{c2}\\% &\texttt{v4}&&\mathrm{otherwise}% \end{aligned}\right.,% \left\{\begin{aligned}% &\texttt{t1'}&&\mathrm{if}&&\texttt{c3}\\% &\texttt{t2'}&&\mathrm{else~if}&&\texttt{c4}\\% &\texttt{v4'}&&\mathrm{otherwise}% \end{aligned}\right.% \right]\\% =~ & \left\{\begin{aligned}% &\texttt{mrgIf' s' c t1 t1'}&&\mathrm{if}&&\texttt{(ite c c1 c3)}\\% &\texttt{t2'}&&\mathrm{else~if}&&\texttt{(&& (! c) c4)}\\% &\texttt{v3}&&\mathrm{else~if}&&\texttt{(&& c c2)}\\% &\texttt{f' c v4 v4'}&&\mathrm{otherwise}% \end{aligned}\right. \end{aligned} \]

For more details of the algorithm, please refer to Grisette's paper.

Union Monad

data Union a Source #

Union is the UnionBase container (hidden) enhanced with MergingStrategy knowledge propagation.

The UnionBase models the underlying semantics evaluation semantics for unsolvable types with the nested if-then-else tree semantics, and can be viewed as the following structure:

data UnionBase a
  = UnionSingle a
  | UnionIf bool (Union a) (Union a)

The UnionSingle constructor is for a single value with the path condition true, and the UnionIf constructor is the if operator in an if-then-else tree. For clarity, when printing a Union value, we will omit the UnionSingle constructor. The following two representations has the same semantics.

If      c1    (If c11 v11 (If c12 v12 v13))
  (If   c2    v2
              v3)

\[ \left\{\begin{aligned}&t_1&&\mathrm{if}&&c_1\\&v_2&&\mathrm{else if}&&c_2\\&v_3&&\mathrm{otherwise}&&\end{aligned}\right.\hspace{2em}\mathrm{where}\hspace{2em}t_1 = \left\{\begin{aligned}&v_{11}&&\mathrm{if}&&c_{11}\\&v_{12}&&\mathrm{else if}&&c_{12}\\&v_{13}&&\mathrm{otherwise}&&\end{aligned}\right. \]

To reduce the size of the if-then-else tree to reduce the number of paths to execute, Grisette would merge the branches in a UnionBase container and maintain a representation invariant for them. To perform this merging procedure, Grisette relies on a type class called Mergeable and the merging strategy defined by it.

UnionBase is a monad, so we can easily write code with the do-notation and monadic combinators. However, the standard monadic operators cannot resolve any extra constraints, including the Mergeable constraint (see The constrained-monad problem by Sculthorpe et al.). This prevents the standard do-notations to merge the results automatically, and would result in bad performance or very verbose code.

To reduce this boilerplate, Grisette provide another monad, Union that would try to cache the merging strategy. The Union has two data constructors (hidden intentionally), UAny and UMrg. The UAny data constructor (printed as <...>) wraps an arbitrary (probably unmerged) UnionBase. It is constructed when no Mergeable knowledge is available (for example, when constructed with Haskell's return). The UMrg data constructor (printed as {...}) wraps a merged UnionBase along with the Mergeable constraint. This constraint can be propagated to the contexts without Mergeable knowledge, and helps the system to merge the resulting UnionBase.

Examples:

return cannot resolve the Mergeable constraint.

>>> return 1 :: Union Integer
<1>

mrgReturn can resolve the Mergeable constraint.

>>> import Grisette.Lib.Base
>>> mrgReturn 1 :: Union Integer
{1}

mrgIfPropagatedStrategy does not try to Mergeable constraint.

>>> mrgIfPropagatedStrategy "a" (return 1) (mrgIfPropagatedStrategy "b" (return 1) (return 2)) :: Union Integer
<If a 1 (If b 1 2)>

But mrgIfPropagatedStrategy is able to merge the result if some of the branches are merged and have a cached merging strategy:

>>> mrgIfPropagatedStrategy "a" (return 1) (mrgIfPropagatedStrategy "b" (mrgReturn 1) (return 2)) :: Union Integer
{If (|| a b) 1 2}

The >>= operator uses mrgIfPropagatedStrategy internally. When the final statement in a do-block merges the values, the system can then merge the final result.

>>> :{
  do
    x <- mrgIfPropagatedStrategy (ssym "a") (return 1) (mrgIfPropagatedStrategy (ssym "b") (return 1) (return 2))
    mrgSingle $ x + 1 :: Union Integer
:}
{If (|| a b) 2 3}

Calling a function that merges a result at the last line of a do-notation will also merge the whole block. If you stick to these mrg* combinators and all the functions will merge the results, the whole program can be symbolically evaluated efficiently.

>>> f x y = mrgIf "c" x y :: Union Integer
>>> :{
  do
    x <- mrgIfPropagatedStrategy (ssym "a") (return 1) (mrgIfPropagatedStrategy (ssym "b") (return 1) (return 2))
    f x (x + 1)
:}
{If (&& c (|| a b)) 1 (If (|| a (|| b c)) 2 3)}

In Grisette.Lib.Base, Grisette.Lib.Mtl, we also provided more mrg* variants of other combinators. You should stick to these combinators to ensure efficient merging by Grisette.

Instances

Instances details
Eq1 Union Source # 
Instance details

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

Methods

liftEq :: (a -> b -> Bool) -> Union a -> Union b -> Bool #

Show1 Union Source # 
Instance details

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

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Union a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Union a] -> ShowS #

Applicative Union Source # 
Instance details

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

Methods

pure :: a -> Union a #

(<*>) :: Union (a -> b) -> Union a -> Union b #

liftA2 :: (a -> b -> c) -> Union a -> Union b -> Union c #

(*>) :: Union a -> Union b -> Union b #

(<*) :: Union a -> Union b -> Union a #

Functor Union Source # 
Instance details

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

Methods

fmap :: (a -> b) -> Union a -> Union b #

(<$) :: a -> Union b -> Union a #

Monad Union Source # 
Instance details

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

Methods

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

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

return :: a -> Union a #

NFData1 Union Source # 
Instance details

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

Methods

liftRnf :: (a -> ()) -> Union a -> () #

MonadParallelUnion Union Source # 
Instance details

Defined in Grisette.Experimental.MonadParallelUnion

Methods

parBindUnion :: (Mergeable b, NFData b) => Union a -> (a -> Union b) -> Union b Source #

EvalSym1 Union Source # 
Instance details

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

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Union a -> Union a Source #

ExtractSym1 Union Source # 
Instance details

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

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Union a -> Maybe (SymbolSet knd) Source #

Mergeable1 Union Source # 
Instance details

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

PPrint1 Union Source # 
Instance details

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

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Union a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Union a] -> Doc ann Source #

PlainUnion Union Source # 
Instance details

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

SimpleMergeable1 Union Source # 
Instance details

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

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Union a -> Union a -> Union a Source #

SymBranching Union Source # 
Instance details

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

SubstSym1 Union Source # 
Instance details

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

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Union a -> Union a Source #

SymEq1 Union Source # 
Instance details

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

Methods

liftSymEq :: (a -> b -> SymBool) -> Union a -> Union b -> SymBool Source #

SymOrd1 Union Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Union a -> Union b -> Union Ordering Source #

TryMerge Union Source # 
Instance details

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

AllSyms1 Union Source # 
Instance details

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

Methods

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

ToCon1 Union Union Source # 
Instance details

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

Methods

liftToCon :: (a -> Maybe b) -> Union a -> Maybe (Union b) Source #

ToSym1 Union Union Source # 
Instance details

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

Methods

liftToSym :: Mergeable b => (a -> b) -> Union a -> Union b Source #

(GenSym spec a, Mergeable a) => GenSym spec (Union a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => spec -> m (Union (Union a)) Source #

GenSym spec a => GenSymSimple spec (Union a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => spec -> m (Union a) Source #

(Solvable c t, Mergeable t) => Solvable c (Union t) Source # 
Instance details

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

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

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

Methods

toSym :: a -> Union b Source #

(Mergeable v, UnifiedITEOp 'Sym v) => UnifiedITEOp 'Sym (Union v) Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedITEOp

Methods

withBaseITEOp :: (If (IsConMode 'Sym) () (ITEOp (Union v)) => r) -> r Source #

UnifiedSymEq 'Sym v => UnifiedSymEq 'Sym (Union v) Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSymEq

Methods

withBaseSymEq :: (If (IsConMode 'Sym) (Eq (Union v)) (SymEq (Union v)) => r) -> r Source #

UnifiedSymOrd 'Sym v => UnifiedSymOrd 'Sym (Union v) Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSymOrd

Methods

withBaseSymOrd :: (If (IsConMode 'Sym) (Ord (Union v)) (SymOrd (Union v)) => r) -> r Source #

Lift a => Lift (Union a :: Type) Source # 
Instance details

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

Methods

lift :: Quote m => Union a -> m Exp #

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

(IsString a, Mergeable a) => IsString (Union a) Source # 
Instance details

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

Methods

fromString :: String -> Union a #

(Num a, Mergeable a) => Num (Union a) Source # 
Instance details

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

Methods

(+) :: Union a -> Union a -> Union a #

(-) :: Union a -> Union a -> Union a #

(*) :: Union a -> Union a -> Union a #

negate :: Union a -> Union a #

abs :: Union a -> Union a #

signum :: Union a -> Union a #

fromInteger :: Integer -> Union a #

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

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

Methods

showsPrec :: Int -> Union a -> ShowS #

show :: Union a -> String #

showList :: [Union a] -> ShowS #

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

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

Methods

rnf :: Union a -> () #

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

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

Methods

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

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

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

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

Methods

evalSym :: Bool -> Model -> Union a -> Union a Source #

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

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

(ITEOp a, Mergeable a) => ITEOp (Union a) Source # 
Instance details

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

Methods

symIte :: SymBool -> Union a -> Union a -> Union a Source #

(LogicalOp a, Mergeable a) => LogicalOp (Union a) Source # 
Instance details

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

Methods

true :: Union a Source #

false :: Union a Source #

(.||) :: Union a -> Union a -> Union a Source #

(.&&) :: Union a -> Union a -> Union a Source #

symNot :: Union a -> Union a Source #

symXor :: Union a -> Union a -> Union a Source #

symImplies :: Union a -> Union a -> Union a Source #

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

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

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

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

Methods

pformat :: Union a -> Doc ann Source #

pformatPrec :: Int -> Union a -> Doc ann Source #

pformatList :: [Union a] -> Doc ann Source #

Mergeable a => SimpleMergeable (Union a) Source # 
Instance details

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

Methods

mrgIte :: SymBool -> Union a -> Union a -> Union a Source #

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

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

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Union a -> Union a Source #

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

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

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

Defined in Grisette.Internal.Core.Data.Class.SymOrd

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 #

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

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

Methods

hashWithSalt :: Int -> Union a -> Int #

hash :: Union a -> Int #

(GenSym a a, Mergeable a) => GenSym (Union a) a Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Union a -> m (Union a) Source #

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

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

Methods

toCon :: Union a -> Maybe b Source #

ToSym (Union Integer) SymInteger Source # 
Instance details

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

ToSym (Union Bool) SymBool Source # 
Instance details

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

UnionWithExcept (Union (Either e v)) Union e v Source # 
Instance details

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

UnionWithExcept (Union (CBMCEither e v)) Union e v Source # 
Instance details

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

(Function f arg ret, Mergeable f, Mergeable ret) => Function (Union f) arg (Union ret) Source # 
Instance details

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

Methods

(#) :: Union f -> arg -> Union ret Source #

ToCon a b => ToCon (Union a) (Union b) Source # 
Instance details

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

Methods

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

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

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

Methods

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

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

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

Methods

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

ToSym a b => ToSym (Union a) (Union b) Source # 
Instance details

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

Methods

toSym :: Union a -> Union b Source #

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

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

Methods

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

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

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

Methods

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

(IsConcrete k, Mergeable t) => Mergeable (HashMap k (Union (Maybe t))) Source # 
Instance details

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

(IsConcrete k, Mergeable t) => SimpleMergeable (HashMap k (Union (Maybe t))) Source # 
Instance details

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

Methods

mrgIte :: SymBool -> HashMap k (Union (Maybe t)) -> HashMap k (Union (Maybe t)) -> HashMap k (Union (Maybe t)) Source #

class (Eq t, Ord t, Hashable t) => IsConcrete t Source #

Tag for concrete types. Useful for specifying the merge strategy for some parametrized types where we should have different merge strategy for symbolic and concrete ones.

Instances

Instances details
IsConcrete Integer Source # 
Instance details

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

IsConcrete Bool Source # 
Instance details

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

unionUnaryOp :: (a -> a) -> Union a -> Union a Source #

Lift a unary operation to Union.

unionBinOp :: (a -> a -> a) -> Union a -> Union a -> Union a Source #

Lift a binary operation to Union.

liftUnion :: forall u a. (Mergeable a, SymBranching u, Applicative u) => Union a -> u a Source #

Lift the Union to any Applicative SymBranching.

unionMergingStrategy :: Union a -> Maybe (MergingStrategy a) Source #

Get the (possibly empty) cached merging strategy.

liftToMonadUnion :: (Mergeable a, MonadUnion u) => Union a -> u a Source #

Alias for liftUnion, but for monads.

unionSize :: Union a -> Int Source #

The size of a union is defined as the number of branches. For example,

>>> unionSize (return True)
1
>>> unionSize (mrgIf "a" (return 1) (return 2) :: Union Integer)
2
>>> unionSize (choose [1..7] "a" :: Union Integer)
7

Mergeable

class Mergeable a where Source #

Each type is associated with a root merge strategy given by rootStrategy. The root merge strategy should be able to merge every value of the type. Grisette will use the root merge strategy to merge the values of the type in a union.

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

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

Methods

rootStrategy :: MergingStrategy a Source #

The root merging strategy for the type.

Instances

Instances details
Mergeable All Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Any Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable ArithException Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Rational Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Ordering Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable CEGISCondition Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.CEGISSolver

Mergeable FreshIndex Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Mergeable AlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable AlgRealPoly Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable RealPoint Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable NotRepresentableFPError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable SomeBVException Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Mergeable SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable p => Mergeable (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Generic a, GMergeable Arity0 (Rep a)) => Mergeable (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

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

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

Defined in Grisette.Internal.Core.Data.UnionBase

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.SymPrim.SomeBV

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Generic1 f, GMergeable Arity1 (Rep1 f), Mergeable a) => Mergeable (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable e, Mergeable a) => Mergeable (CBMCEither e a) Source # 
Instance details

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

(Mergeable a, Mergeable1 m) => Mergeable (FreshT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable1 m, Mergeable a) => Mergeable (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(IsConcrete k, Mergeable t) => Mergeable (HashMap k (Union (Maybe t))) Source # 
Instance details

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

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable (f a) => Mergeable (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable (f a) => Mergeable (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable (f p) => Mergeable (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable1 m, Mergeable e, Mergeable a) => Mergeable (CBMCExceptT e m a) Source # 
Instance details

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

(Mergeable1 m, Mergeable e, Mergeable a) => Mergeable (ExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable1 m, Mergeable a) => Mergeable (IdentityT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable a, Mergeable1 m) => Mergeable (ReaderT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable s, Mergeable a, Mergeable1 m) => Mergeable (StateT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable s, Mergeable a, Mergeable1 m) => Mergeable (StateT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c) Source #

(Mergeable (l a), Mergeable (r a)) => Mergeable (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable (l a), Mergeable (r a)) => Mergeable (Sum l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable (f p), Mergeable (g p)) => Mergeable ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable (f p), Mergeable (g p)) => Mergeable ((f :+: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable c => Mergeable (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable1 m, Mergeable r) => Mergeable (ContT r m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d) Source #

Mergeable (f (g a)) => Mergeable (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable (f (g p)) => Mergeable ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable (f p) => Mergeable (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (M1 i c f p) Source #

(Mergeable s, Mergeable w, Mergeable a, Mergeable1 m) => Mergeable (RWST r w s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (RWST r w s m a) Source #

(Mergeable s, Mergeable w, Mergeable a, Mergeable1 m) => Mergeable (RWST r w s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (RWST r w s m a) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f, g) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f, g, h) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f, g, h, i) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f, g, h, i, j) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f, g, h, i, j, k) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f, g, h, i, j, k, l) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

rootStrategy :: MergingStrategy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

class (forall a. Mergeable a => Mergeable (u a)) => Mergeable1 (u :: Type -> Type) where Source #

Lifting of the Mergeable class to unary type constructors.

Methods

liftRootStrategy :: MergingStrategy a -> MergingStrategy (u a) Source #

Lift merge strategy through the type constructor.

Instances

Instances details
Mergeable1 Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 First Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 Last Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 Endo Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 Union Source # 
Instance details

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

Mergeable1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Core.Data.UnionBase

Mergeable1 Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable a => Mergeable1 (Either a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Generic1 f, GMergeable Arity1 (Rep1 f)) => Mergeable1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable e => Mergeable1 (CBMCEither e) Source # 
Instance details

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

Mergeable1 m => Mergeable1 (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable a => Mergeable1 (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 f => Mergeable1 (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 f => Mergeable1 (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable1 m, Mergeable e) => Mergeable1 (CBMCExceptT e m) Source # 
Instance details

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

(Mergeable1 m, Mergeable e) => Mergeable1 (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 m => Mergeable1 (ReaderT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable s, Mergeable1 m) => Mergeable1 (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable s, Mergeable1 m) => Mergeable1 (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable s, Mergeable1 m) => Mergeable1 (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable s, Mergeable1 m) => Mergeable1 (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable1 l, Mergeable1 r) => Mergeable1 (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable1 l, Mergeable1 r) => Mergeable1 (Sum l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable1 m, Mergeable r) => Mergeable1 (ContT r m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 ((->) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable1 f, Mergeable1 g) => Mergeable1 (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable s, Mergeable w, Mergeable1 m) => Mergeable1 (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Mergeable s, Mergeable w, Mergeable1 m) => Mergeable1 (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, f, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, f, g, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, f, g, h, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, f, g, h, i, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, f, g, h, i, j, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, f, g, h, i, j, k, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, f, g, h, i, j, k, l, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

liftRootStrategy :: MergingStrategy a0 -> MergingStrategy (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) Source #

rootStrategy1 :: (Mergeable a, Mergeable1 u) => MergingStrategy (u a) Source #

Lift the root merge strategy through the unary type constructor.

class (forall a. Mergeable a => Mergeable1 (u a)) => Mergeable2 (u :: Type -> Type -> Type) where Source #

Lifting of the Mergeable class to binary type constructors.

Methods

liftRootStrategy2 :: MergingStrategy a -> MergingStrategy b -> MergingStrategy (u a b) Source #

Lift merge strategy through the type constructor.

rootStrategy2 :: (Mergeable a, Mergeable b, Mergeable2 u) => MergingStrategy (u a b) Source #

Lift the root merge strategy through the binary type constructor.

class (forall a. Mergeable a => Mergeable2 (u a)) => Mergeable3 (u :: Type -> Type -> Type -> Type) where Source #

Lifting of the Mergeable class to ternary type constructors.

Methods

liftRootStrategy3 :: MergingStrategy a -> MergingStrategy b -> MergingStrategy c -> MergingStrategy (u a b c) Source #

Lift merge strategy through the type constructor.

rootStrategy3 :: (Mergeable a, Mergeable b, Mergeable c, Mergeable3 u) => MergingStrategy (u a b c) Source #

Lift the root merge strategy through the binary type constructor.

Merging strategy

data MergingStrategy a where Source #

Merging strategies.

You probably do not need to know the details of this type if you are only going to use algebraic data types. You can get merging strategies for them with type derivation.

In Grisette, a merged union (if-then-else tree) follows the hierarchical sorted representation invariant with regards to some merging strategy.

A merging strategy encodes how to merge a subset of the values of a given type. We have three types of merging strategies:

  • Simple strategy
  • Sorted strategy
  • No strategy

The SimpleStrategy merges values with a simple merge function. For example,

  • the symbolic boolean values can be directly merged with symIte.
  • the set {1}, which is a subset of the values of the type Integer, can be simply merged as the set contains only a single value.
  • all the Just values of the type Maybe SymBool can be simply merged by merging the wrapped symbolic boolean with symIte.

The SortedStrategy merges values by first grouping the values with an indexing function, and the values with the same index will be organized as a sub-tree in the if-then-else structure of UnionBase. Each group (sub-tree) will be further merged with a sub-strategy for the index. The index type should be a totally ordered type (with the Ord type class). Grisette will use the indexing function to partition the values into sub-trees, and organize them in a sorted way. The sub-trees will further be merged with the sub-strategies. For example,

  • all the integers can be merged with SortedStrategy by indexing with the identity function and use the SimpleStrategy shown before as the sub-strategies.
  • all the Maybe SymBool values can be merged with SortedStrategy by indexing with isJust, the Nothing and Just values can then be merged with different simple strategies as sub-strategies.

The NoStrategy does not perform any merging. For example, we cannot merge values with function types that returns concrete lists.

For ADTs, we can automatically derive the Mergeable type class, which provides a merging strategy.

If the derived version does not work for you, you should determine if your type can be directly merged with a merging function. If so, you can implement the merging strategy as a SimpleStrategy. If the type cannot be directly merged with a merging function, but could be partitioned into subsets of values that can be simply merged with a function, you should implement the merging strategy as a SortedStrategy. For easier building of the merging strategies, check out the combinators like wrapStrategy.

For more details, please see the documents of the constructors, or refer to Grisette's paper.

Constructors

SimpleStrategy

Simple mergeable strategy.

For symbolic booleans, we can implement its merge strategy as follows:

SimpleStrategy symIte :: MergingStrategy SymBool

Fields

SortedStrategy

Sorted mergeable strategy.

For Integers, we can implement its merge strategy as follows:

SortedStrategy id (\_ -> SimpleStrategy $ \_ t _ -> t)

For Maybe SymBool, we can implement its merge strategy as follows:

SortedStrategy
  (\case; Nothing -> False; Just _ -> True)
  (\idx ->
     if idx
       then SimpleStrategy $ \_ t _ -> t
       else SimpleStrategy $ \cond (Just l) (Just r) -> Just $ symIte cond l r)

Fields

NoStrategy :: MergingStrategy a

For preventing the merging intentionally. This could be useful for keeping some value concrete and may help generate more efficient formulas.

See Grisette's paper for details.

Manual merging strategy construction

wrapStrategy Source #

Arguments

:: MergingStrategy a

The merge strategy to be wrapped

-> (a -> b)

The wrap function

-> (b -> a)

The unwrap function, which does not have to be defined for every value

-> MergingStrategy b 

Useful utility function for building merge strategies manually.

For example, to build the merge strategy for the just branch of Maybe a, one could write

wrapStrategy Just fromMaybe rootStrategy :: MergingStrategy (Maybe a)

product2Strategy Source #

Arguments

:: (a -> b -> r)

The wrap function

-> (r -> (a, b))

The unwrap function, which does not have to be defined for every value

-> MergingStrategy a

The first merge strategy to be wrapped

-> MergingStrategy b

The second merge strategy to be wrapped

-> MergingStrategy r 

Useful utility function for building merge strategies for product types manually.

For example, to build the merge strategy for the following product type, one could write

data X = X { x1 :: Int, x2 :: Bool }
product2Strategy X (\(X a b) -> (a, b)) rootStrategy rootStrategy
  :: MergingStrategy X

data StrategyList container where Source #

Helper type for building efficient merge strategy for list-like containers.

Constructors

StrategyList :: forall a container. container [DynamicSortedIdx] -> container (MergingStrategy a) -> StrategyList container 

Instances

Instances details
Show1 container => Show (StrategyList container) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

showsPrec :: Int -> StrategyList container -> ShowS #

show :: StrategyList container -> String #

showList :: [StrategyList container] -> ShowS #

Eq1 container => Eq (StrategyList container) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

(==) :: StrategyList container -> StrategyList container -> Bool #

(/=) :: StrategyList container -> StrategyList container -> Bool #

Ord1 container => Ord (StrategyList container) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

compare :: StrategyList container -> StrategyList container -> Ordering #

(<) :: StrategyList container -> StrategyList container -> Bool #

(<=) :: StrategyList container -> StrategyList container -> Bool #

(>) :: StrategyList container -> StrategyList container -> Bool #

(>=) :: StrategyList container -> StrategyList container -> Bool #

max :: StrategyList container -> StrategyList container -> StrategyList container #

min :: StrategyList container -> StrategyList container -> StrategyList container #

buildStrategyList :: forall a container. Functor container => MergingStrategy a -> container a -> StrategyList container Source #

Helper function for building efficient merge strategy for list-like containers.

resolveStrategy :: forall x. MergingStrategy x -> x -> ([DynamicSortedIdx], MergingStrategy x) Source #

Resolves the indices and the terminal merge strategy for a value of some Mergeable type.

resolveStrategy' :: forall x. x -> MergingStrategy x -> ([DynamicSortedIdx], MergingStrategy x) Source #

Resolves the indices and the terminal merge strategy for a value given a merge strategy for its type.

Simple mergeable types

class Mergeable a => SimpleMergeable a where Source #

This class indicates that a type has a simple root merge strategy.

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

data X = ...
  deriving Generic
  deriving (Mergeable, SimpleMergeable) via (Default X)

Methods

mrgIte :: SymBool -> a -> a -> a Source #

Performs if-then-else with the simple root merge strategy.

>>> mrgIte "a" "b" "c" :: SymInteger
(ite a b c)

Instances

Instances details
SimpleMergeable AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

SimpleMergeable CEGISCondition Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.CEGISSolver

SimpleMergeable FreshIndex Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

SimpleMergeable SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

SimpleMergeable SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

SimpleMergeable SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

SimpleMergeable SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

SimpleMergeable () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> () -> () -> () Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Identity a -> Identity a -> Identity a Source #

SimpleMergeable a => SimpleMergeable (Down a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Down a -> Down a -> Down a Source #

SimpleMergeable a => SimpleMergeable (Dual a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Dual a -> Dual a -> Dual a Source #

SimpleMergeable a => SimpleMergeable (Endo a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Endo a -> Endo a -> Endo a Source #

SimpleMergeable a => SimpleMergeable (Product a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Product a -> Product a -> Product a Source #

SimpleMergeable a => SimpleMergeable (Sum a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Sum a -> Sum a -> Sum a Source #

SimpleMergeable p => SimpleMergeable (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Par1 p -> Par1 p -> Par1 p Source #

(Generic a, GSimpleMergeable Arity0 (Rep a), GMergeable Arity0 (Rep a)) => SimpleMergeable (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Default a -> Default a -> Default a Source #

Mergeable a => SimpleMergeable (Union a) Source # 
Instance details

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

Methods

mrgIte :: SymBool -> Union a -> Union a -> Union a Source #

Mergeable a => SimpleMergeable (UnionBase a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.UnionBase

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

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

SimpleMergeable (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> U1 p -> U1 p -> U1 p Source #

SimpleMergeable (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> V1 p -> V1 p -> V1 p Source #

(Generic1 f, GSimpleMergeable Arity1 (Rep1 f), GMergeable Arity1 (Rep1 f), SimpleMergeable a) => SimpleMergeable (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Default1 f a -> Default1 f a -> Default1 f a Source #

(SymBranching m, Mergeable a) => SimpleMergeable (FreshT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

mrgIte :: SymBool -> FreshT m a -> FreshT m a -> FreshT m a Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> SymFP eb sb -> SymFP eb sb -> SymFP eb sb Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

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

(SymBranching m, Mergeable a) => SimpleMergeable (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> MaybeT m a -> MaybeT m a -> MaybeT m a Source #

(IsConcrete k, Mergeable t) => SimpleMergeable (HashMap k (Union (Maybe t))) Source # 
Instance details

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

Methods

mrgIte :: SymBool -> HashMap k (Union (Maybe t)) -> HashMap k (Union (Maybe t)) -> HashMap k (Union (Maybe t)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a, b) -> (a, b) -> (a, b) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a -> b) -> (a -> b) -> a -> b Source #

SimpleMergeable a => SimpleMergeable (Const a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Const a b -> Const a b -> Const a b Source #

SimpleMergeable (f a) => SimpleMergeable (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Ap f a -> Ap f a -> Ap f a Source #

SimpleMergeable (f a) => SimpleMergeable (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Alt f a -> Alt f a -> Alt f a Source #

SimpleMergeable (f p) => SimpleMergeable (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Rec1 f p -> Rec1 f p -> Rec1 f p Source #

(SymBranching m, Mergeable e, Mergeable a) => SimpleMergeable (CBMCExceptT e m a) Source # 
Instance details

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

Methods

mrgIte :: SymBool -> CBMCExceptT e m a -> CBMCExceptT e m a -> CBMCExceptT e m a Source #

(SymBranching m, Mergeable e, Mergeable a) => SimpleMergeable (ExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

(SymBranching m, Mergeable a) => SimpleMergeable (IdentityT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> IdentityT m a -> IdentityT m a -> IdentityT m a Source #

(Mergeable a, SymBranching m) => SimpleMergeable (ReaderT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> ReaderT s m a -> ReaderT s m a -> ReaderT s m a Source #

(Mergeable s, Mergeable a, SymBranching m) => SimpleMergeable (StateT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> StateT s m a -> StateT s m a -> StateT s m a Source #

(Mergeable s, Mergeable a, SymBranching m) => SimpleMergeable (StateT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> StateT s m a -> StateT s m a -> StateT s m a Source #

(Mergeable s, Mergeable a, SymBranching m, Monoid s) => SimpleMergeable (WriterT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> WriterT s m a -> WriterT s m a -> WriterT s m a Source #

(Mergeable s, Mergeable a, SymBranching m, Monoid s) => SimpleMergeable (WriterT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> WriterT s m a -> WriterT s m a -> WriterT s m a Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a, b, c) -> (a, b, c) -> (a, b, c) Source #

(SimpleMergeable (l a), SimpleMergeable (r a)) => SimpleMergeable (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Product l r a -> Product l r a -> Product l r a Source #

(SimpleMergeable (f p), SimpleMergeable (g p)) => SimpleMergeable ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

SimpleMergeable c => SimpleMergeable (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> K1 i c p -> K1 i c p -> K1 i c p Source #

(SymBranching m, Mergeable r) => SimpleMergeable (ContT r m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> ContT r m a -> ContT r m a -> ContT r m a Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

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

SimpleMergeable (f (g a)) => SimpleMergeable (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Compose f g a -> Compose f g a -> Compose f g a Source #

SimpleMergeable (f (g p)) => SimpleMergeable ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

SimpleMergeable (f p) => SimpleMergeable (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> M1 i c f p -> M1 i c f p -> M1 i c f p Source #

(Mergeable s, Mergeable w, Monoid w, Mergeable a, SymBranching m) => SimpleMergeable (RWST r w s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

(Mergeable s, Mergeable w, Monoid w, Mergeable a, SymBranching m) => SimpleMergeable (RWST r w s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

class (Mergeable1 u, forall a. SimpleMergeable a => SimpleMergeable (u a)) => SimpleMergeable1 u where Source #

Lifting of the SimpleMergeable class to unary type constructors.

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> u a -> u a -> u a Source #

Lift mrgIte through the type constructor.

>>> liftMrgIte mrgIte "a" (Identity "b") (Identity "c") :: Identity SymInteger
Identity (ite a b c)

Instances

Instances details
SimpleMergeable1 Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Identity a -> Identity a -> Identity a Source #

SimpleMergeable1 Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Down a -> Down a -> Down a Source #

SimpleMergeable1 Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Dual a -> Dual a -> Dual a Source #

SimpleMergeable1 Endo Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Endo a -> Endo a -> Endo a Source #

SimpleMergeable1 Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Product a -> Product a -> Product a Source #

SimpleMergeable1 Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Sum a -> Sum a -> Sum a Source #

SimpleMergeable1 Union Source # 
Instance details

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

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Union a -> Union a -> Union a Source #

SimpleMergeable1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Core.Data.UnionBase

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> UnionBase a -> UnionBase a -> UnionBase a Source #

(Generic1 f, GSimpleMergeable Arity1 (Rep1 f), GMergeable Arity1 (Rep1 f)) => SimpleMergeable1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Default1 f a -> Default1 f a -> Default1 f a Source #

SymBranching m => SimpleMergeable1 (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> FreshT m a -> FreshT m a -> FreshT m a Source #

SymBranching m => SimpleMergeable1 (MaybeT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> MaybeT m a -> MaybeT m a -> MaybeT m a Source #

SimpleMergeable a => SimpleMergeable1 ((,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, a0) -> (a, a0) -> (a, a0) Source #

SimpleMergeable a => SimpleMergeable1 (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> Const a a0 -> Const a a0 -> Const a a0 Source #

SimpleMergeable1 f => SimpleMergeable1 (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Ap f a -> Ap f a -> Ap f a Source #

SimpleMergeable1 f => SimpleMergeable1 (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Alt f a -> Alt f a -> Alt f a Source #

(SymBranching m, Mergeable e) => SimpleMergeable1 (CBMCExceptT e m) Source # 
Instance details

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

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> CBMCExceptT e m a -> CBMCExceptT e m a -> CBMCExceptT e m a Source #

(SymBranching m, Mergeable e) => SimpleMergeable1 (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

SymBranching m => SimpleMergeable1 (IdentityT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> IdentityT m a -> IdentityT m a -> IdentityT m a Source #

SymBranching m => SimpleMergeable1 (ReaderT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> ReaderT s m a -> ReaderT s m a -> ReaderT s m a Source #

(Mergeable s, SymBranching m) => SimpleMergeable1 (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> StateT s m a -> StateT s m a -> StateT s m a Source #

(Mergeable s, SymBranching m) => SimpleMergeable1 (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> StateT s m a -> StateT s m a -> StateT s m a Source #

(Mergeable s, SymBranching m, Monoid s) => SimpleMergeable1 (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> WriterT s m a -> WriterT s m a -> WriterT s m a Source #

(Mergeable s, SymBranching m, Monoid s) => SimpleMergeable1 (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> WriterT s m a -> WriterT s m a -> WriterT s m a Source #

(SimpleMergeable a, SimpleMergeable b) => SimpleMergeable1 ((,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, a0) -> (a, b, a0) -> (a, b, a0) Source #

(SimpleMergeable1 l, SimpleMergeable1 r) => SimpleMergeable1 (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Product l r a -> Product l r a -> Product l r a Source #

(SymBranching m, Mergeable r) => SimpleMergeable1 (ContT r m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> ContT r m a -> ContT r m a -> ContT r m a Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, a0) -> (a, b, c, a0) -> (a, b, c, a0) Source #

SimpleMergeable1 ((->) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a -> a0) -> (a -> a0) -> a -> a0 Source #

(SimpleMergeable1 f, SimpleMergeable1 g) => SimpleMergeable1 (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Compose f g a -> Compose f g a -> Compose f g a Source #

(Mergeable s, Mergeable w, Monoid w, SymBranching m) => SimpleMergeable1 (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

(Mergeable s, Mergeable w, Monoid w, SymBranching m) => SimpleMergeable1 (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, a0) -> (a, b, c, d, a0) -> (a, b, c, d, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, a0) -> (a, b, c, d, e, a0) -> (a, b, c, d, e, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, f, g, a0) -> (a, b, c, d, e, f, g, a0) -> (a, b, c, d, e, f, g, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, f, g, h, a0) -> (a, b, c, d, e, f, g, h, a0) -> (a, b, c, d, e, f, g, h, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, f, g, h, i, a0) -> (a, b, c, d, e, f, g, h, i, a0) -> (a, b, c, d, e, f, g, h, i, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, f, g, h, i, j, a0) -> (a, b, c, d, e, f, g, h, i, j, a0) -> (a, b, c, d, e, f, g, h, i, j, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, f, g, h, i, j, k, a0) -> (a, b, c, d, e, f, g, h, i, j, k, a0) -> (a, b, c, d, e, f, g, h, i, j, k, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a0 -> a0 -> a0) -> SymBool -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) Source #

mrgIte1 :: (SimpleMergeable1 u, SimpleMergeable a) => SymBool -> u a -> u a -> u a Source #

Lift the standard mrgIte function through the type constructor.

>>> mrgIte1 "a" (Identity "b") (Identity "c") :: Identity SymInteger
Identity (ite a b c)

class (Mergeable2 u, forall a. SimpleMergeable a => SimpleMergeable1 (u a)) => SimpleMergeable2 u where Source #

Lifting of the SimpleMergeable class to binary type constructors.

Methods

liftMrgIte2 :: (SymBool -> a -> a -> a) -> (SymBool -> b -> b -> b) -> SymBool -> u a b -> u a b -> u a b Source #

Lift mrgIte through the type constructor.

>>> liftMrgIte2 mrgIte mrgIte "a" ("b", "c") ("d", "e") :: (SymInteger, SymBool)
((ite a b d),(ite a c e))

Instances

Instances details
SimpleMergeable2 (,) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte2 :: (SymBool -> a -> a -> a) -> (SymBool -> b -> b -> b) -> SymBool -> (a, b) -> (a, b) -> (a, b) Source #

SimpleMergeable a => SimpleMergeable2 ((,,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte2 :: (SymBool -> a0 -> a0 -> a0) -> (SymBool -> b -> b -> b) -> SymBool -> (a, a0, b) -> (a, a0, b) -> (a, a0, b) Source #

(SimpleMergeable a, SimpleMergeable b) => SimpleMergeable2 ((,,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte2 :: (SymBool -> a0 -> a0 -> a0) -> (SymBool -> b0 -> b0 -> b0) -> SymBool -> (a, b, a0, b0) -> (a, b, a0, b0) -> (a, b, a0, b0) Source #

SimpleMergeable2 (->) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte2 :: (SymBool -> a -> a -> a) -> (SymBool -> b -> b -> b) -> SymBool -> (a -> b) -> (a -> b) -> a -> b Source #

mrgIte2 :: (SimpleMergeable2 u, SimpleMergeable a, SimpleMergeable b) => SymBool -> u a b -> u a b -> u a b Source #

Lift the standard mrgIte function through the type constructor.

>>> mrgIte2 "a" ("b", "c") ("d", "e") :: (SymInteger, SymBool)
((ite a b d),(ite a c e))

Symbolic branching

class (SimpleMergeable1 u, forall a. Mergeable a => SimpleMergeable (u a), TryMerge u) => SymBranching (u :: Type -> Type) where Source #

Special case of the Mergeable1 and SimpleMergeable1 class for type constructors that are SimpleMergeable when applied to any Mergeable types.

This type class is used to generalize the mrgIf function to other containers, for example, monad transformer transformed Unions.

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> u a -> u a -> u a Source #

Symbolic if control flow with the result merged with some merge strategy.

>>> mrgIfWithStrategy rootStrategy "a" (mrgSingle "b") (return "c") :: Union SymInteger
{(ite a b c)}

Note: Be careful to call this directly in your code. The supplied merge strategy should be consistent with the type's root merge strategy, or some internal invariants would be broken and the program can crash.

This function is to be called when the Mergeable constraint can not be resolved, e.g., the merge strategy for the contained type is given with Mergeable1. In other cases, mrgIf is usually a better alternative.

mrgIfPropagatedStrategy :: SymBool -> u a -> u a -> u a Source #

Symbolic if control flow with the result.

This function does not need a merging strategy, and it will merge the result only if any of the branches is merged.

Instances

Instances details
SymBranching Union Source # 
Instance details

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

SymBranching UnionBase Source # 
Instance details

Defined in Grisette.Internal.Core.Data.UnionBase

SymBranching m => SymBranching (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

(SymBranching m, Mergeable e) => SymBranching (CBMCExceptT e m) Source # 
Instance details

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

(SymBranching m, Mergeable e) => SymBranching (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

mrgIfPropagatedStrategy :: SymBool -> ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

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

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

SymBranching m => SymBranching (ReaderT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> ReaderT s m a -> ReaderT s m a -> ReaderT s m a Source #

mrgIfPropagatedStrategy :: SymBool -> ReaderT s m a -> ReaderT s m a -> ReaderT s m a Source #

(Mergeable s, SymBranching m) => SymBranching (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> StateT s m a -> StateT s m a -> StateT s m a Source #

mrgIfPropagatedStrategy :: SymBool -> StateT s m a -> StateT s m a -> StateT s m a Source #

(Mergeable s, SymBranching m) => SymBranching (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> StateT s m a -> StateT s m a -> StateT s m a Source #

mrgIfPropagatedStrategy :: SymBool -> StateT s m a -> StateT s m a -> StateT s m a Source #

(Mergeable s, SymBranching m, Monoid s) => SymBranching (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> WriterT s m a -> WriterT s m a -> WriterT s m a Source #

mrgIfPropagatedStrategy :: SymBool -> WriterT s m a -> WriterT s m a -> WriterT s m a Source #

(Mergeable s, SymBranching m, Monoid s) => SymBranching (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> WriterT s m a -> WriterT s m a -> WriterT s m a Source #

mrgIfPropagatedStrategy :: SymBool -> WriterT s m a -> WriterT s m a -> WriterT s m a Source #

(SymBranching m, Mergeable r) => SymBranching (ContT r m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> ContT r m a -> ContT r m a -> ContT r m a Source #

mrgIfPropagatedStrategy :: SymBool -> ContT r m a -> ContT r m a -> ContT r m a Source #

(Mergeable s, Mergeable w, Monoid w, SymBranching m) => SymBranching (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

mrgIfPropagatedStrategy :: SymBool -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

(Mergeable s, Mergeable w, Monoid w, SymBranching m) => SymBranching (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIfWithStrategy :: MergingStrategy a -> SymBool -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

mrgIfPropagatedStrategy :: SymBool -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

mrgIf :: (SymBranching u, Mergeable a) => SymBool -> u a -> u a -> u a Source #

Symbolic if control flow with the result merged with the type's root merge strategy.

Equivalent to mrgIfWithStrategy rootStrategy.

>>> mrgIf "a" (return "b") (return "c") :: Union SymInteger
{(ite a b c)}

mergeWithStrategy :: SymBranching m => MergingStrategy a -> m a -> m a Source #

Try to merge the container with a given merge strategy.

merge :: (SymBranching m, Mergeable a) => m a -> m a Source #

Try to merge the container with the root strategy.

TryMerge operations

type MonadTryMerge f = (TryMerge f, Monad f) Source #

Alias for a monad type that has TryMerge.

class TryMerge m where Source #

A class for containers that may or may not be merged.

If the container is capable of multi-path execution, then the tryMergeWithStrategy function should merge the paths according to the supplied strategy.

If the container is not capable of multi-path execution, then the tryMergeWithStrategy function should be equivalent to id.

Note that this will not necessarily do a recursive merge for the elements.

Methods

tryMergeWithStrategy :: MergingStrategy a -> m a -> m a Source #

Instances

Instances details
TryMerge Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

TryMerge Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

TryMerge Union Source # 
Instance details

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

TryMerge UnionBase Source # 
Instance details

Defined in Grisette.Internal.Core.Data.UnionBase

TryMerge Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

TryMerge List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a -> [a] -> [a] Source #

TryMerge (Either a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

TryMerge m => TryMerge (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

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

Defined in Grisette.Internal.Core.Data.Class.TryMerge

TryMerge ((,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a0 -> (a, a0) -> (a, a0) Source #

(TryMerge m, Mergeable e) => TryMerge (CBMCExceptT e m) Source # 
Instance details

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

(Mergeable e, TryMerge m) => TryMerge (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

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

Defined in Grisette.Internal.Core.Data.Class.TryMerge

TryMerge m => TryMerge (ReaderT r m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

(Mergeable s, TryMerge m) => TryMerge (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

(Mergeable s, TryMerge m) => TryMerge (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

(Monoid w, Mergeable w, TryMerge m) => TryMerge (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

(Monoid w, Mergeable w, TryMerge m) => TryMerge (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

TryMerge ((,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a0 -> (a, b, a0) -> (a, b, a0) Source #

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

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a -> Sum f g a -> Sum f g a Source #

(TryMerge m, Mergeable r) => TryMerge (ContT r m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a -> ContT r m a -> ContT r m a Source #

TryMerge ((,,,) a b c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a0 -> (a, b, c, a0) -> (a, b, c, a0) Source #

(Monoid w, Mergeable w, Mergeable s, TryMerge m) => TryMerge (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a -> RWST r w s m a -> RWST r w s m a Source #

(Monoid w, Mergeable w, Mergeable s, TryMerge m) => TryMerge (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a -> RWST r w s m a -> RWST r w s m a Source #

TryMerge ((,,,,) a b c d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a0 -> (a, b, c, d, a0) -> (a, b, c, d, a0) Source #

TryMerge ((,,,,,) a b c d e) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a0 -> (a, b, c, d, e, a0) -> (a, b, c, d, e, a0) Source #

TryMerge ((,,,,,,) a b c d e f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a0 -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, a0) Source #

TryMerge ((,,,,,,,) a b c d e f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a0 -> (a, b, c, d, e, f, g, a0) -> (a, b, c, d, e, f, g, a0) Source #

TryMerge ((,,,,,,,,) a b c d e f g h) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.TryMerge

Methods

tryMergeWithStrategy :: MergingStrategy a0 -> (a, b, c, d, e, f, g, h, a0) -> (a, b, c, d, e, f, g, h, a0) Source #

mrgSingle :: (TryMerge m, Applicative m, Mergeable a) => a -> m a Source #

Wrap a value in the applicative functor and propagate the type's root merge strategy.

Equivalent to mrgSingleWithStrategy rootStrategy.

>>> mrgSingle "a" :: Union SymInteger
{a}

mrgSingleWithStrategy :: (TryMerge m, Applicative m) => MergingStrategy a -> a -> m a Source #

Wrap a value in the applicative functor and capture the Mergeable knowledge.

>>> mrgSingleWithStrategy rootStrategy "a" :: Union SymInteger
{a}

Note: Be careful to call this directly from your code. The supplied merge strategy should be consistent with the type's root merge strategy, or some internal invariants would be broken and the program can crash.

This function is to be called when the Mergeable constraint can not be resolved, e.g., the merge strategy for the contained type is given with Mergeable1. In other cases, mrgPure is usually a better alternative.

tryMerge :: (TryMerge m, Mergeable a) => m a -> m a Source #

Try to merge the container with the root strategy.

PlainUnion operations

class (Applicative u, SymBranching u) => PlainUnion (u :: Type -> Type) where Source #

Plain union containers that can be projected back into single value or if-guarded values.

Minimal complete definition

singleView, ifView

Methods

singleView :: u a -> Maybe a Source #

Pattern match to extract single values.

>>> singleView (return 1 :: Union Integer)
Just 1
>>> singleView (mrgIfPropagatedStrategy "a" (return 1) (return 2) :: Union Integer)
Nothing

ifView :: u a -> Maybe (SymBool, u a, u a) Source #

Pattern match to extract if values.

>>> ifView (return 1 :: Union Integer)
Nothing
>>> ifView (mrgIfPropagatedStrategy "a" (return 1) (return 2) :: Union Integer)
Just (a,<1>,<2>)
>>> ifView (mrgIf "a" (return 1) (return 2) :: Union Integer)
Just (a,{1},{2})

toGuardedList :: u a -> [(SymBool, a)] Source #

Convert the union to a guarded list.

>>> toGuardedList (mrgIf "a" (return 1) (mrgIf "b" (return 2) (return 3)) :: Union Integer)
[(a,1),((&& b (! a)),2),((! (|| b a)),3)]

overestimateUnionValues :: Mergeable a => u a -> [a] Source #

Return all possible values in the union. Drop the path conditions.

>>> overestimateUnionValues (return 1 :: Union Integer)
[1]
>>> overestimateUnionValues (mrgIf "a" (return 1) (return 2) :: Union Integer)
[1,2]

pattern Single :: (PlainUnion u, Mergeable a) => a -> u a Source #

Pattern match to extract single values with singleView.

>>> case (return 1 :: Union Integer) of Single v -> v
1

pattern If :: (PlainUnion u, Mergeable a) => SymBool -> u a -> u a -> u a Source #

Pattern match to extract guard values with ifView

>>> case (mrgIfPropagatedStrategy "a" (return 1) (return 2) :: Union Integer) of If c t f -> (c,t,f)
(a,<1>,<2>)

simpleMerge :: forall u a. (SimpleMergeable a, PlainUnion u) => u a -> a Source #

Merge the simply mergeable values in a union, and extract the merged value.

In the following example, mrgIfPropagatedStrategy will not merge the results, and simpleMerge will merge it and extract the single merged value.

>>> mrgIfPropagatedStrategy (ssym "a") (return $ ssym "b") (return $ ssym "c") :: Union SymBool
<If a b c>
>>> simpleMerge $ (mrgIfPropagatedStrategy (ssym "a") (return $ ssym "b") (return $ ssym "c") :: Union SymBool)
(ite a b c)

(.#) :: (Function f a r, SimpleMergeable r, PlainUnion u) => f -> u a -> r infixl 9 Source #

Helper for applying functions on PlainUnion and SimpleMergeable.

>>> let f :: Integer -> Union Integer = \x -> mrgIf (ssym "a") (mrgSingle $ x + 1) (mrgSingle $ x + 2)
>>> f .# (mrgIf (ssym "b" :: SymBool) (mrgSingle 0) (mrgSingle 2) :: Union Integer)
{If (&& b a) 1 (If b 2 (If a 3 4))}

onUnion :: forall u a r. (SimpleMergeable r, SymBranching u, PlainUnion u, Mergeable a) => (a -> r) -> u a -> r Source #

Lift a function to work on union values.

>>> sumU = onUnion sum :: Union [SymInteger] -> SymInteger
>>> sumU (mrgIfPropagatedStrategy "cond" (return ["a"]) (return ["b","c"]) :: Union [SymInteger])
(ite cond a (+ b c))

onUnion2 :: forall u a b r. (SimpleMergeable r, SymBranching u, PlainUnion u, Mergeable a, Mergeable b) => (a -> b -> r) -> u a -> u b -> r Source #

Lift a function to work on union values.

onUnion3 :: forall u a b c r. (SimpleMergeable r, SymBranching u, PlainUnion u, Mergeable a, Mergeable b, Mergeable c) => (a -> b -> c -> r) -> u a -> u b -> u c -> r Source #

Lift a function to work on union values.

onUnion4 :: forall u a b c d r. (SimpleMergeable r, SymBranching u, PlainUnion u, Mergeable a, Mergeable b, Mergeable c, Mergeable d) => (a -> b -> c -> d -> r) -> u a -> u b -> u c -> u d -> r Source #

Lift a function to work on union values.

type MonadUnion u = (SymBranching u, Monad u) Source #

Class for monads that support union-like operations and Mergeable knowledge propagation.

Pretty printing

class PPrint a where Source #

Pretty printing of values.

This class is similar to the Pretty class from the Prettyprinter package, but it also provides pretty printing with a given precedence level.

We are able to derive instances of this class for algebraic data types. You may need the DerivingVia and DerivingStrategies extensions.

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

The derived instance will pretty print the value with a format similar to the one used by ormolu.

Minimal complete definition

pformat | pformatPrec

Methods

pformat :: a -> Doc ann Source #

pformatPrec :: Int -> a -> Doc ann Source #

pformatList :: [a] -> Doc ann Source #

Instances

Instances details
PPrint All Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: All -> Doc ann Source #

pformatPrec :: Int -> All -> Doc ann Source #

pformatList :: [All] -> Doc ann Source #

PPrint Any Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Any -> Doc ann Source #

pformatPrec :: Int -> Any -> Doc ann Source #

pformatList :: [Any] -> Doc ann Source #

PPrint Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Int16 -> Doc ann Source #

pformatPrec :: Int -> Int16 -> Doc ann Source #

pformatList :: [Int16] -> Doc ann Source #

PPrint Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Int32 -> Doc ann Source #

pformatPrec :: Int -> Int32 -> Doc ann Source #

pformatList :: [Int32] -> Doc ann Source #

PPrint Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Int64 -> Doc ann Source #

pformatPrec :: Int -> Int64 -> Doc ann Source #

pformatList :: [Int64] -> Doc ann Source #

PPrint Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Int8 -> Doc ann Source #

pformatPrec :: Int -> Int8 -> Doc ann Source #

pformatList :: [Int8] -> Doc ann Source #

PPrint Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Word16 -> Doc ann Source #

pformatPrec :: Int -> Word16 -> Doc ann Source #

pformatList :: [Word16] -> Doc ann Source #

PPrint Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Word32 -> Doc ann Source #

pformatPrec :: Int -> Word32 -> Doc ann Source #

pformatList :: [Word32] -> Doc ann Source #

PPrint Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Word64 -> Doc ann Source #

pformatPrec :: Int -> Word64 -> Doc ann Source #

pformatList :: [Word64] -> Doc ann Source #

PPrint Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Word8 -> Doc ann Source #

pformatPrec :: Int -> Word8 -> Doc ann Source #

pformatList :: [Word8] -> Doc ann Source #

PPrint ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint Ordering Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Symbol -> Doc ann Source #

pformatPrec :: Int -> Symbol -> Doc ann Source #

pformatList :: [Symbol] -> Doc ann Source #

PPrint AlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint NotRepresentableFPError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint Model Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Model -> Doc ann Source #

pformatPrec :: Int -> Model -> Doc ann Source #

pformatList :: [Model] -> Doc ann Source #

PPrint ModelValue Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint SomeBVException Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

PPrint SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Text -> Doc ann Source #

pformatPrec :: Int -> Text -> Doc ann Source #

pformatList :: [Text] -> Doc ann Source #

PPrint Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: () -> Doc ann Source #

pformatPrec :: Int -> () -> Doc ann Source #

pformatList :: [()] -> Doc ann Source #

PPrint Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Bool -> Doc ann Source #

pformatPrec :: Int -> Bool -> Doc ann Source #

pformatList :: [Bool] -> Doc ann Source #

PPrint Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Char -> Doc ann Source #

pformatPrec :: Int -> Char -> Doc ann Source #

pformatList :: [Char] -> Doc ann Source #

PPrint Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Double -> Doc ann Source #

pformatPrec :: Int -> Double -> Doc ann Source #

pformatList :: [Double] -> Doc ann Source #

PPrint Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Float -> Doc ann Source #

pformatPrec :: Int -> Float -> Doc ann Source #

pformatList :: [Float] -> Doc ann Source #

PPrint Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Int -> Doc ann Source #

pformatPrec :: Int -> Int -> Doc ann Source #

pformatList :: [Int] -> Doc ann Source #

PPrint Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Word -> Doc ann Source #

pformatPrec :: Int -> Word -> Doc ann Source #

pformatList :: [Word] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Identity a -> Doc ann Source #

pformatPrec :: Int -> Identity a -> Doc ann Source #

pformatList :: [Identity a] -> Doc ann Source #

PPrint a => PPrint (First a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: First a -> Doc ann Source #

pformatPrec :: Int -> First a -> Doc ann Source #

pformatList :: [First a] -> Doc ann Source #

PPrint a => PPrint (Last a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Last a -> Doc ann Source #

pformatPrec :: Int -> Last a -> Doc ann Source #

pformatList :: [Last a] -> Doc ann Source #

PPrint a => PPrint (Down a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Down a -> Doc ann Source #

pformatPrec :: Int -> Down a -> Doc ann Source #

pformatList :: [Down a] -> Doc ann Source #

PPrint a => PPrint (Dual a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Dual a -> Doc ann Source #

pformatPrec :: Int -> Dual a -> Doc ann Source #

pformatList :: [Dual a] -> Doc ann Source #

PPrint a => PPrint (Product a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Product a -> Doc ann Source #

pformatPrec :: Int -> Product a -> Doc ann Source #

pformatList :: [Product a] -> Doc ann Source #

PPrint a => PPrint (Sum a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Sum a -> Doc ann Source #

pformatPrec :: Int -> Sum a -> Doc ann Source #

pformatList :: [Sum a] -> Doc ann Source #

PPrint p => PPrint (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Par1 p -> Doc ann Source #

pformatPrec :: Int -> Par1 p -> Doc ann Source #

pformatList :: [Par1 p] -> Doc ann Source #

(Generic a, GPPrint Arity0 (Rep a)) => PPrint (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Default a -> Doc ann Source #

pformatPrec :: Int -> Default a -> Doc ann Source #

pformatList :: [Default a] -> Doc ann Source #

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

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

Methods

pformat :: Union a -> Doc ann Source #

pformatPrec :: Int -> Union a -> Doc ann Source #

pformatList :: [Union a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.UnionBase

Methods

pformat :: UnionBase a -> Doc ann Source #

pformatPrec :: Int -> UnionBase a -> Doc ann Source #

pformatList :: [UnionBase a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: IntN n -> Doc ann Source #

pformatPrec :: Int -> IntN n -> Doc ann Source #

pformatList :: [IntN n] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: WordN n -> Doc ann Source #

pformatPrec :: Int -> WordN n -> Doc ann Source #

pformatList :: [WordN n] -> Doc ann Source #

PPrint (SomeTypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

PPrint (SymbolSet knd) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: SymbolSet knd -> Doc ann Source #

pformatPrec :: Int -> SymbolSet knd -> Doc ann Source #

pformatList :: [SymbolSet knd] -> Doc ann Source #

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

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

pformat :: SomeBV bv -> Doc ann Source #

pformatPrec :: Int -> SomeBV bv -> Doc ann Source #

pformatList :: [SomeBV bv] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: SymIntN n -> Doc ann Source #

pformatPrec :: Int -> SymIntN n -> Doc ann Source #

pformatList :: [SymIntN n] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: SymWordN n -> Doc ann Source #

pformatPrec :: Int -> SymWordN n -> Doc ann Source #

pformatList :: [SymWordN n] -> Doc ann Source #

PPrint a => PPrint (HashSet a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: HashSet a -> Doc ann Source #

pformatPrec :: Int -> HashSet a -> Doc ann Source #

pformatList :: [HashSet a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Maybe a -> Doc ann Source #

pformatPrec :: Int -> Maybe a -> Doc ann Source #

pformatList :: [Maybe a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: [a] -> Doc ann Source #

pformatPrec :: Int -> [a] -> Doc ann Source #

pformatList :: [[a]] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Either a b -> Doc ann Source #

pformatPrec :: Int -> Either a b -> Doc ann Source #

pformatList :: [Either a b] -> Doc ann Source #

PPrint (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: U1 p -> Doc ann Source #

pformatPrec :: Int -> U1 p -> Doc ann Source #

pformatList :: [U1 p] -> Doc ann Source #

PPrint (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: V1 p -> Doc ann Source #

pformatPrec :: Int -> V1 p -> Doc ann Source #

pformatList :: [V1 p] -> Doc ann Source #

(Generic1 f, GPPrint Arity1 (Rep1 f), PPrint a) => PPrint (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Default1 f a -> Doc ann Source #

pformatPrec :: Int -> Default1 f a -> Doc ann Source #

pformatList :: [Default1 f a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: FP eb sb -> Doc ann Source #

pformatPrec :: Int -> FP eb sb -> Doc ann Source #

pformatList :: [FP eb sb] -> Doc ann Source #

PPrint (TypedSymbol knd t) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: TypedSymbol knd t -> Doc ann Source #

pformatPrec :: Int -> TypedSymbol knd t -> Doc ann Source #

pformatList :: [TypedSymbol knd t] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: SymFP eb sb -> Doc ann Source #

pformatPrec :: Int -> SymFP eb sb -> Doc ann Source #

pformatList :: [SymFP eb sb] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (sa -~> sb) -> Doc ann Source #

pformatPrec :: Int -> (sa -~> sb) -> Doc ann Source #

pformatList :: [sa -~> sb] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (sa =~> sb) -> Doc ann Source #

pformatPrec :: Int -> (sa =~> sb) -> Doc ann Source #

pformatList :: [sa =~> sb] -> Doc ann Source #

(PPrint1 m, PPrint a) => PPrint (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: MaybeT m a -> Doc ann Source #

pformatPrec :: Int -> MaybeT m a -> Doc ann Source #

pformatList :: [MaybeT m a] -> Doc ann Source #

(PPrint k, PPrint v) => PPrint (HashMap k v) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: HashMap k v -> Doc ann Source #

pformatPrec :: Int -> HashMap k v -> Doc ann Source #

pformatList :: [HashMap k v] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b) -> Doc ann Source #

pformatPrec :: Int -> (a, b) -> Doc ann Source #

pformatList :: [(a, b)] -> Doc ann Source #

PPrint a => PPrint (Const a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Const a b -> Doc ann Source #

pformatPrec :: Int -> Const a b -> Doc ann Source #

pformatList :: [Const a b] -> Doc ann Source #

PPrint (f a) => PPrint (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Ap f a -> Doc ann Source #

pformatPrec :: Int -> Ap f a -> Doc ann Source #

pformatList :: [Ap f a] -> Doc ann Source #

PPrint (f a) => PPrint (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Alt f a -> Doc ann Source #

pformatPrec :: Int -> Alt f a -> Doc ann Source #

pformatList :: [Alt f a] -> Doc ann Source #

PPrint (f p) => PPrint (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Rec1 f p -> Doc ann Source #

pformatPrec :: Int -> Rec1 f p -> Doc ann Source #

pformatList :: [Rec1 f p] -> Doc ann Source #

(PPrint1 m, PPrint e, PPrint a) => PPrint (ExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: ExceptT e m a -> Doc ann Source #

pformatPrec :: Int -> ExceptT e m a -> Doc ann Source #

pformatList :: [ExceptT e m a] -> Doc ann Source #

(PPrint1 m, PPrint a) => PPrint (IdentityT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: IdentityT m a -> Doc ann Source #

pformatPrec :: Int -> IdentityT m a -> Doc ann Source #

pformatList :: [IdentityT m a] -> Doc ann Source #

(PPrint1 m, PPrint a, PPrint w) => PPrint (WriterT w m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: WriterT w m a -> Doc ann Source #

pformatPrec :: Int -> WriterT w m a -> Doc ann Source #

pformatList :: [WriterT w m a] -> Doc ann Source #

(PPrint1 m, PPrint a, PPrint w) => PPrint (WriterT w m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: WriterT w m a -> Doc ann Source #

pformatPrec :: Int -> WriterT w m a -> Doc ann Source #

pformatList :: [WriterT w m a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c) -> Doc ann Source #

pformatList :: [(a, b, c)] -> Doc ann Source #

(PPrint (l a), PPrint (r a)) => PPrint (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Product l r a -> Doc ann Source #

pformatPrec :: Int -> Product l r a -> Doc ann Source #

pformatList :: [Product l r a] -> Doc ann Source #

(PPrint (l a), PPrint (r a)) => PPrint (Sum l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Sum l r a -> Doc ann Source #

pformatPrec :: Int -> Sum l r a -> Doc ann Source #

pformatList :: [Sum l r a] -> Doc ann Source #

(PPrint (f p), PPrint (g p)) => PPrint ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (f :*: g) p -> Doc ann Source #

pformatPrec :: Int -> (f :*: g) p -> Doc ann Source #

pformatList :: [(f :*: g) p] -> Doc ann Source #

(PPrint (f p), PPrint (g p)) => PPrint ((f :+: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (f :+: g) p -> Doc ann Source #

pformatPrec :: Int -> (f :+: g) p -> Doc ann Source #

pformatList :: [(f :+: g) p] -> Doc ann Source #

PPrint c => PPrint (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: K1 i c p -> Doc ann Source #

pformatPrec :: Int -> K1 i c p -> Doc ann Source #

pformatList :: [K1 i c p] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d) -> Doc ann Source #

pformatList :: [(a, b, c, d)] -> Doc ann Source #

PPrint (f (g a)) => PPrint (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Compose f g a -> Doc ann Source #

pformatPrec :: Int -> Compose f g a -> Doc ann Source #

pformatList :: [Compose f g a] -> Doc ann Source #

PPrint (f (g p)) => PPrint ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (f :.: g) p -> Doc ann Source #

pformatPrec :: Int -> (f :.: g) p -> Doc ann Source #

pformatList :: [(f :.: g) p] -> Doc ann Source #

PPrint (f p) => PPrint (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: M1 i c f p -> Doc ann Source #

pformatPrec :: Int -> M1 i c f p -> Doc ann Source #

pformatList :: [M1 i c f p] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e) -> Doc ann Source #

pformatList :: [(a, b, c, d, e)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f) -> Doc ann Source #

pformatList :: [(a, b, c, d, e, f)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f, g) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f, g) -> Doc ann Source #

pformatList :: [(a, b, c, d, e, f, g)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f, g, h) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f, g, h) -> Doc ann Source #

pformatList :: [(a, b, c, d, e, f, g, h)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f, g, h, i) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f, g, h, i) -> Doc ann Source #

pformatList :: [(a, b, c, d, e, f, g, h, i)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f, g, h, i, j) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f, g, h, i, j) -> Doc ann Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f, g, h, i, j, k) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k) -> Doc ann Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Doc ann Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Doc ann Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Doc ann Source #

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

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Doc ann Source #

pformatPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Doc ann Source #

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

docToTextWith :: LayoutOptions -> Doc ann -> Text Source #

Convenience function to layout and render a Doc to Text.

You can control the layout with LayoutOptions.

docToTextWithWidth :: Int -> Doc ann -> Text Source #

Convenience function to layout and render a Doc to Text.

You can control the layout with a single number of the width limit.

docToText :: Doc ann -> Text Source #

Convenience function to layout and render a Doc to Text.

The default layout options defaultLayoutOptions are used.

pformatTextWith :: PPrint a => LayoutOptions -> a -> Text Source #

Convenience function to format a value to Text.

You can control the layout with LayoutOptions.

pformatTextWithWidth :: PPrint a => Int -> a -> Text Source #

Convenience function to format a value to Text.

You can control the layout with a single number of the width limit.

pformatText :: PPrint a => a -> Text Source #

Convenience function to format a value to Text.

The default layout options defaultLayoutOptions are used.

pprint :: PPrint a => a -> IO () Source #

Pretty print a value to the standard output.

class (forall a. PPrint a => PPrint (f a)) => PPrint1 f where Source #

Lifting of the PPrint class to unary type constructors.

Minimal complete definition

liftPFormatPrec

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> f a -> Doc ann Source #

Lift a pretty-printer to a unary type constructor.

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [f a] -> Doc ann Source #

Lift a pretty-printer to list of values with unary type constructors.

Instances

Instances details
PPrint1 Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Identity a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Identity a] -> Doc ann Source #

PPrint1 First Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> First a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [First a] -> Doc ann Source #

PPrint1 Last Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Last a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Last a] -> Doc ann Source #

PPrint1 Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Down a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Down a] -> Doc ann Source #

PPrint1 Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Dual a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Dual a] -> Doc ann Source #

PPrint1 Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Product a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Product a] -> Doc ann Source #

PPrint1 Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Sum a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Sum a] -> Doc ann Source #

PPrint1 Union Source # 
Instance details

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

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Union a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Union a] -> Doc ann Source #

PPrint1 UnionBase Source # 
Instance details

Defined in Grisette.Internal.Core.Data.UnionBase

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> UnionBase a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [UnionBase a] -> Doc ann Source #

PPrint1 HashSet Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> HashSet a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [HashSet a] -> Doc ann Source #

PPrint1 Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Maybe a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Maybe a] -> Doc ann Source #

PPrint1 List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> [a] -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [[a]] -> Doc ann Source #

PPrint a => PPrint1 (Either a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> Either a a0 -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [Either a a0] -> Doc ann Source #

(Generic1 f, GPPrint Arity1 (Rep1 f)) => PPrint1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Default1 f a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Default1 f a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> MaybeT m a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [MaybeT m a] -> Doc ann Source #

PPrint k => PPrint1 (HashMap k) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> HashMap k a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [HashMap k a] -> Doc ann Source #

PPrint a => PPrint1 ((,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, a0)] -> Doc ann Source #

PPrint a => PPrint1 (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> Const a a0 -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [Const a a0] -> Doc ann Source #

PPrint1 f => PPrint1 (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Ap f a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Ap f a] -> Doc ann Source #

PPrint1 f => PPrint1 (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Alt f a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Alt f a] -> Doc ann Source #

(PPrint1 m, PPrint e) => PPrint1 (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> ExceptT e m a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [ExceptT e m a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> IdentityT m a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [IdentityT m a] -> Doc ann Source #

(PPrint1 m, PPrint w) => PPrint1 (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> WriterT w m a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [WriterT w m a] -> Doc ann Source #

(PPrint1 m, PPrint w) => PPrint1 (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> WriterT w m a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [WriterT w m a] -> Doc ann Source #

(PPrint a, PPrint b) => PPrint1 ((,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, a0)] -> Doc ann Source #

(PPrint1 l, PPrint1 r) => PPrint1 (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Product l r a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Product l r a] -> Doc ann Source #

(PPrint1 l, PPrint1 r) => PPrint1 (Sum l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Sum l r a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Sum l r a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, a0)] -> Doc ann Source #

(PPrint1 f, PPrint1 g) => PPrint1 (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Compose f g a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Compose f g a] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, d, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, d, a0)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, d, e, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, d, e, a0)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, d, e, f, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, d, e, f, a0)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, d, e, f, g, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, d, e, f, g, a0)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, d, e, f, g, h, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, d, e, f, g, h, a0)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, d, e, f, g, h, i, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, d, e, f, g, h, i, a0)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, d, e, f, g, h, i, j, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, d, e, f, g, h, i, j, a0)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, d, e, f, g, h, i, j, k, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, d, e, f, g, h, i, j, k, a0)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> Int -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> Doc ann Source #

liftPFormatList :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> [(a, b, c, d, e, f, g, h, i, j, k, l, a0)] -> Doc ann Source #

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

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

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

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

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

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

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

pformatPrec1 :: (PPrint1 f, PPrint a) => Int -> f a -> Doc ann Source #

Lift the standard pretty-printer (pformatPrec, pformatList) to unary type constructors.

pformatList1 :: (PPrint1 f, PPrint a) => [f a] -> Doc ann Source #

Lift the standard pretty-printer (pformatPrec, pformatList) to list of values with unary type constructors.

class (forall a. PPrint a => PPrint1 (f a), forall a b. (PPrint a, PPrint b) => PPrint (f a b)) => PPrint2 f where Source #

Lifting of the PPrint class to binary type constructors.

Minimal complete definition

liftPFormatPrec2

Methods

liftPFormatPrec2 :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> Int -> f a b -> Doc ann Source #

Lift two pretty-printers to a binary type constructor.

liftPFormatList2 :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> [f a b] -> Doc ann Source #

Lift two pretty-printers to list of values with binary type constructors.

Instances

Instances details
PPrint2 Either Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec2 :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> Int -> Either a b -> Doc ann Source #

liftPFormatList2 :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> [Either a b] -> Doc ann Source #

PPrint2 HashMap Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec2 :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> Int -> HashMap a b -> Doc ann Source #

liftPFormatList2 :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> [HashMap a b] -> Doc ann Source #

PPrint2 (,) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec2 :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> Int -> (a, b) -> Doc ann Source #

liftPFormatList2 :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> [(a, b)] -> Doc ann Source #

PPrint a => PPrint2 ((,,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec2 :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> Int -> (a, a0, b) -> Doc ann Source #

liftPFormatList2 :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> (Int -> b -> Doc ann) -> ([b] -> Doc ann) -> [(a, a0, b)] -> Doc ann Source #

(PPrint a, PPrint b) => PPrint2 ((,,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec2 :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> (Int -> b0 -> Doc ann) -> ([b0] -> Doc ann) -> Int -> (a, b, a0, b0) -> Doc ann Source #

liftPFormatList2 :: (Int -> a0 -> Doc ann) -> ([a0] -> Doc ann) -> (Int -> b0 -> Doc ann) -> ([b0] -> Doc ann) -> [(a, b, a0, b0)] -> Doc ann Source #

pformatPrec2 :: (PPrint2 f, PPrint a, PPrint b) => Int -> f a b -> Doc ann Source #

Lift the standard pretty-printer (pformatPrec, pformatList) to binary type constructors.

pformatList2 :: (PPrint2 f, PPrint a, PPrint b) => [f a b] -> Doc ann Source #

Lift the standard pretty-printer (pformatPrec, pformatList) to list of values with binary type constructors.

Helpers for pretty printing

groupedEnclose :: Doc ann -> Doc ann -> Doc ann -> Doc ann Source #

Enclose a document with left and right documents.

The pretty printer will try to layout the document in a single line, but the right document may be split to a newline.

condEnclose :: Bool -> Doc ann -> Doc ann -> Doc ann -> Doc ann Source #

Conditionally enclose a document with left and right documents.

If the condition is True, then this function is equivalent to groupedEnclose.

pformatWithConstructor :: Int -> Doc ann -> [Doc ann] -> Doc ann Source #

Pretty print a list of fields with a constructor.

Aligns the fields and nests them by 2 spaces.

pformatWithConstructorNoAlign :: Int -> Doc ann -> [Doc ann] -> Doc ann Source #

Pretty print a list of fields with a constructor without alignment.

viaShowsPrec :: (Int -> a -> ShowS) -> Int -> a -> Doc ann Source #

Pretty print a value using showsPrec.

Re-export Prettyprinter for convenience

Symbolic Generation

It is usually useful to generate complex symbolic values. For example, in program synthesis task, we may want to generate symbolic programs to represent the search space given some specification.

To help with this, we provide a set of classes and functions. The core of the symbolic generation is the Fresh monad, the GenSymSimple class, and the GenSym class.

The Fresh monad is a combination of specialized state and reader monads. It keeps an identifier, and an index. The generated symbolic constants would be constructed with both the identifier and the index. Each time a new symbolic constant is generated, the index would be incremented. This keeps that the generated symbolic constants are unique.

The GenSymSimple class helps generate symbolic values that do not require a symbolic union, for example, symbolic Booleans. It provides the simpleFresh function, which accepts a specification for the symbolic values to generate.

We do not need any specification to generate a symbolic Boolean, so we provide a unit value as the specification:

>>> runFresh (simpleFresh ()) "x" :: SymBool
x@0

We can generate a list of symbolic Booleans by specifying the length of the list, and the specification for the elements. The two elements in the generated list are unique as they have different indices.

>>> runFresh (simpleFresh (SimpleListSpec 2 ())) "x" :: [SymBool]
[x@0,x@1]
>>> runFresh (simpleFresh (SimpleListSpec 2 (SimpleListSpec 1 ()))) "x" :: [[SymBool]]
[[x@0],[x@1]]

The GenSym class helps generate symbolic values that require a symbolic union, for example, lists with different lengths. It provides the fresh function, which accepts a specification for the symbolic values to generate.

We can generate a list of length 0, 1, or 2 by specifying the minimum and maximum lengths, and the specification for the elements:

>>> runFresh (fresh (ListSpec 0 2 ())) "x" :: Union [SymBool]
{If x@2 [] (If x@3 [x@1] [x@0,x@1])}

We can generate many symbolic values at once with the Fresh monad. The symbolic constants are ensured to be unique:

>>> :{
  flip runFresh "x" $ do
    a :: SymBool <- simpleFresh ()
    b :: Union [SymBool] <- fresh (ListSpec 0 2 ())
    return (a, b)
:}
(x@0,{If x@3 [] (If x@4 [x@2] [x@1,x@2])})

When you are just generating a symbolic value, and do not need to compose multiple simpleFresh or fresh calls, you can use the genSym and genSymSimple functions instead.

>>> genSymSimple (SimpleListSpec 2 ()) "x" :: [SymBool]
[x@0,x@1]
>>> genSym (ListSpec 0 2 ()) "x" :: Union [SymBool]
{If x@2 [] (If x@3 [x@1] [x@0,x@1])}

Symbolic choices from a list of symbolic values is very useful. With the chooseFresh function, we can generate a symbolic value by choosing from a list of alternative values. Grisette would generate symbolic Boolean guards to perform the symbolic choice.

>>> :{
  (flip runFresh "x" $ do
    a <- simpleFresh ()
    b <- simpleFresh ()
    chooseFresh [[a],[a,b],[a,a,b]]) :: Union [SymBool]
:}
{If x@2 [x@0] (If x@3 [x@0,x@1] [x@0,x@0,x@1])}

Symbolic Generation Context

newtype FreshIndex Source #

Index type used for GenSym.

To generate fresh variables, a monadic stateful context will be maintained. The index should be increased every time a new symbolic constant is generated.

Constructors

FreshIndex Int 

Instances

Instances details
Num FreshIndex Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Show FreshIndex Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Eq FreshIndex Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Ord FreshIndex Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Mergeable FreshIndex Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

SimpleMergeable FreshIndex Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Symbolic Generation Monad

class Monad m => MonadFresh m where Source #

Monad class for fresh symbolic value generation.

The monad should be a reader monad for the Identifier and a state monad for the FreshIndex.

Methods

getFreshIndex :: m FreshIndex Source #

Get the current index for fresh variable generation.

setFreshIndex :: FreshIndex -> m () Source #

Set the current index for fresh variable generation.

getIdentifier :: m Identifier Source #

Get the identifier.

localIdentifier :: (Identifier -> Identifier) -> m a -> m a Source #

Change the identifier locally and use a new index from 0 locally.

Instances

Instances details
Monad m => MonadFresh (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

MonadFresh m => MonadFresh (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

MonadFresh m => MonadFresh (ReaderT r m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

MonadFresh m => MonadFresh (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

MonadFresh m => MonadFresh (StateT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

(MonadFresh m, Monoid w) => MonadFresh (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

(MonadFresh m, Monoid w) => MonadFresh (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

(MonadFresh m, Monoid w) => MonadFresh (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

(MonadFresh m, Monoid w) => MonadFresh (RWST r w s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

nextFreshIndex :: MonadFresh m => m FreshIndex Source #

Get the next fresh index and increase the current index.

liftFresh :: MonadFresh m => Fresh a -> m a Source #

Lifts an Fresh a into any MonadFresh.

type Fresh = FreshT Identity Source #

FreshT specialized with Identity.

newtype FreshT m a Source #

A symbolic generation monad transformer.

It is a reader monad transformer for an identifier and a state monad transformer for indices.

Each time a fresh symbolic variable is generated, the index should be increased.

Constructors

FreshT 

Instances

Instances details
MonadTrans FreshT Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

lift :: Monad m => m a -> FreshT m a #

MonadRWS r w s m => MonadRWS r w s (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

(Typeable mode, UnifiedBranching mode m) => UnifiedBranching mode (FreshT m) Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSimpleMergeable

Methods

withBaseBranching :: (If (IsConMode mode) (TryMerge (FreshT m)) (SymBranching (FreshT m)) => r) -> r Source #

(Typeable mode, UnifiedBranching mode m) => UnifiedSimpleMergeable1 mode (FreshT m) Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSimpleMergeable

Methods

withBaseSimpleMergeable1 :: (If (IsConMode mode) () (SimpleMergeable1 (FreshT m)) => r) -> r Source #

MonadError e m => MonadError e (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

throwError :: e -> FreshT m a #

catchError :: FreshT m a -> (e -> FreshT m a) -> FreshT m a #

MonadReader r m => MonadReader r (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

ask :: FreshT m r #

local :: (r -> r) -> FreshT m a -> FreshT m a #

reader :: (r -> a) -> FreshT m a #

MonadState s m => MonadState s (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

get :: FreshT m s #

put :: s -> FreshT m () #

state :: (s -> (a, s)) -> FreshT m a #

MonadWriter w m => MonadWriter w (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

writer :: (a, w) -> FreshT m a #

tell :: w -> FreshT m () #

listen :: FreshT m a -> FreshT m (a, w) #

pass :: FreshT m (a, w -> w) -> FreshT m a #

(Typeable mode, UnifiedBranching mode m, Mergeable a) => UnifiedSimpleMergeable mode (FreshT m a) Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSimpleMergeable

Methods

withBaseSimpleMergeable :: (If (IsConMode mode) () (SimpleMergeable (FreshT m a)) => r) -> r Source #

(Applicative m, Monad m) => Applicative (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

pure :: a -> FreshT m a #

(<*>) :: FreshT m (a -> b) -> FreshT m a -> FreshT m b #

liftA2 :: (a -> b -> c) -> FreshT m a -> FreshT m b -> FreshT m c #

(*>) :: FreshT m a -> FreshT m b -> FreshT m b #

(<*) :: FreshT m a -> FreshT m b -> FreshT m a #

Functor f => Functor (FreshT f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fmap :: (a -> b) -> FreshT f a -> FreshT f b #

(<$) :: a -> FreshT f b -> FreshT f a #

Monad m => Monad (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

(>>=) :: FreshT m a -> (a -> FreshT m b) -> FreshT m b #

(>>) :: FreshT m a -> FreshT m b -> FreshT m b #

return :: a -> FreshT m a #

Monad m => MonadFresh (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Mergeable1 m => Mergeable1 (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

SymBranching m => SimpleMergeable1 (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> FreshT m a -> FreshT m a -> FreshT m a Source #

SymBranching m => SymBranching (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

TryMerge m => TryMerge (FreshT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

(Mergeable a, Mergeable1 m) => Mergeable (FreshT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

(SymBranching m, Mergeable a) => SimpleMergeable (FreshT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

mrgIte :: SymBool -> FreshT m a -> FreshT m a -> FreshT m a Source #

runFresh :: Fresh a -> Identifier -> a Source #

Run the symbolic generation with the given identifier and 0 as the initial index.

runFreshT :: Monad m => FreshT m a -> Identifier -> m a Source #

Run the symbolic generation with the given identifier and 0 as the initial index.

mrgRunFreshT :: (Monad m, TryMerge m, Mergeable a) => FreshT m a -> Identifier -> m a Source #

Run the symbolic generation with the given identifier and 0 as the initial index, and try to merge the result.

freshString :: (MonadFresh m, IsString s) => String -> m s Source #

Generate a fresh string with the given postfix.

>>> runFresh (freshString "b") "a" :: String
"a@0[b]"

Symbolic Generation Class

class Mergeable a => GenSym spec a where Source #

Class of types in which symbolic values can be generated with respect to some specification.

The result will be wrapped in a union-like monad. This ensures that we can generate those types with complex merging rules.

The uniqueness of symbolic constants is managed with the a monadic context. Fresh and FreshT can be useful.

Minimal complete definition

Nothing

Methods

fresh :: MonadFresh m => spec -> m (Union a) Source #

Generate a symbolic value given some specification. Within a single MonadFresh context, calls to fresh would generate unique symbolic constants.

The following example generates a symbolic boolean. No specification is needed.

>>> runFresh (fresh ()) "a" :: Union SymBool
{a@0}

The following example generates booleans, which cannot be merged into a single value with type Bool. No specification is needed.

>>> runFresh (fresh ()) "a" :: Union Bool
{If a@0 False True}

The following example generates Maybe Bools. There are more than one symbolic constants introduced, and their uniqueness is ensured. No specification is needed.

>>> runFresh (fresh ()) "a" :: Union (Maybe Bool)
{If a@0 Nothing (If a@1 (Just False) (Just True))}

The following example generates lists of symbolic booleans with length 1 to 2.

>>> runFresh (fresh (ListSpec 1 2 ())) "a" :: Union [SymBool]
{If a@2 [a@1] [a@0,a@1]}

When multiple symbolic values are generated, there will not be any identifier collision

>>> runFresh (do; a <- fresh (); b <- fresh (); return (a, b)) "a" :: (Union SymBool, Union SymBool)
({a@0},{a@1})

default fresh :: GenSymSimple spec a => MonadFresh m => spec -> m (Union a) Source #

Instances

Instances details
GenSym Int16 Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Int16 -> m (Union Int16) Source #

GenSym Int32 Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Int32 -> m (Union Int32) Source #

GenSym Int64 Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Int64 -> m (Union Int64) Source #

GenSym Int8 Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Int8 -> m (Union Int8) Source #

GenSym Word16 Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Word16 -> m (Union Word16) Source #

GenSym Word32 Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Word32 -> m (Union Word32) Source #

GenSym Word64 Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Word64 -> m (Union Word64) Source #

GenSym Word8 Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Word8 -> m (Union Word8) Source #

GenSym ByteString ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSym FPRoundingMode FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSym SymAlgReal SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSym SymBool SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

GenSym SymFPRoundingMode SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSym SymInteger SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSym Text Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Text -> m (Union Text) Source #

GenSym Integer Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Integer -> m (Union Integer) Source #

GenSym () SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union SymAlgReal) Source #

GenSym () SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

GenSym () SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union SymFPRoundingMode) Source #

GenSym () SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

GenSym () () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union ()) Source #

GenSym () Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union Bool) Source #

GenSym Bool Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Bool -> m (Union Bool) Source #

GenSym Char Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Char -> m (Union Char) Source #

GenSym Double Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Double -> m (Union Double) Source #

GenSym Float Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Float -> m (Union Float) Source #

GenSym Int Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Int -> m (Union Int) Source #

GenSym Word Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Word -> m (Union Word) Source #

(GenSym () a, Mergeable a) => GenSym Integer [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Integer -> m (Union [a]) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

fresh :: MonadFresh m => Int -> m (Union (SomeBV bv)) Source #

(GenSym aspec a, Mergeable a) => GenSym aspec (Maybe a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => aspec -> m (Union (Maybe a)) Source #

(GenSym spec a, Mergeable a) => GenSym spec (Union a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => spec -> m (Union (Union a)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union (Either a b)) Source #

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

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

Methods

fresh :: MonadFresh m => () -> m (Union (CBMCEither a b)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union (SymFP eb sb)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union (a, b)) Source #

(GenSym spec (m (Maybe a)), Mergeable1 m, Mergeable a) => GenSym spec (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m0 => spec -> m0 (Union (MaybeT m a)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union (a, b, c)) Source #

(GenSym spec (m (CBMCEither a b)), Mergeable1 m, Mergeable a, Mergeable b) => GenSym spec (CBMCExceptT a m b) Source # 
Instance details

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

Methods

fresh :: MonadFresh m0 => spec -> m0 (Union (CBMCExceptT a m b)) Source #

(GenSym spec (m (Either a b)), Mergeable1 m, Mergeable a, Mergeable b) => GenSym spec (ExceptT a m b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m0 => spec -> m0 (Union (ExceptT a m b)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union (a, b, c, d)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union (a, b, c, d, e)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union (a, b, c, d, e, f)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union (a, b, c, d, e, f, g)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => () -> m (Union (a, b, c, d, e, f, g, h)) Source #

(GenSym a a, Mergeable a) => GenSym (Union a) a Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Union a -> m (Union a) Source #

(Enum v, Mergeable v) => GenSym (EnumGenBound v) v Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => EnumGenBound v -> m (Union v) Source #

(Enum v, Mergeable v) => GenSym (EnumGenUpperBound v) v Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => EnumGenUpperBound v -> m (Union v) Source #

(GenSym spec a, Mergeable a) => GenSym (ListSpec spec) [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => ListSpec spec -> m (Union [a]) Source #

(GenSym spec a, Mergeable a) => GenSym (SimpleListSpec spec) [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => SimpleListSpec spec -> m (Union [a]) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

(forall (m :: Nat). (KnownNat m, 1 <= m) => GenSym () (bv m), Mergeable (SomeBV bv)) => GenSym (SomeBV bv) (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

fresh :: MonadFresh m => SomeBV bv -> m (Union (SomeBV bv)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

(GenSym aspec a, Mergeable a) => GenSym (Maybe aspec) (Maybe a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Maybe aspec -> m (Union (Maybe a)) Source #

(GenSym a a, Mergeable a) => GenSym [a] [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => [a] -> m (Union [a]) Source #

(KnownNat n, 1 <= n, forall (m :: Nat). (KnownNat m, 1 <= m) => GenSym () (bv m), Mergeable (SomeBV bv)) => GenSym (Proxy n) (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

fresh :: MonadFresh m => Proxy n -> m (Union (SomeBV bv)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => Either aspec bspec -> m (Union (Either a b)) Source #

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

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

Methods

fresh :: MonadFresh m => CBMCEither a b -> m (Union (CBMCEither a b)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => FP eb sb -> m (Union (FP eb sb)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => SymFP eb sb -> m (Union (SymFP eb sb)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

(GenSymSimple (m (Maybe a)) (m (Maybe a)), Mergeable1 m, Mergeable a) => GenSym (MaybeT m a) (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m0 => MaybeT m a -> m0 (Union (MaybeT m a)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (aspec, bspec) -> m (Union (Either a b)) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (aspec, bspec) -> m (Union (a, b)) Source #

(GenSymSimple (m (CBMCEither e a)) (m (CBMCEither e a)), Mergeable1 m, Mergeable e, Mergeable a) => GenSym (CBMCExceptT e m a) (CBMCExceptT e m a) Source # 
Instance details

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

Methods

fresh :: MonadFresh m0 => CBMCExceptT e m a -> m0 (Union (CBMCExceptT e m a)) Source #

(GenSymSimple (m (Either e a)) (m (Either e a)), Mergeable1 m, Mergeable e, Mergeable a) => GenSym (ExceptT e m a) (ExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m0 => ExceptT e m a -> m0 (Union (ExceptT e m a)) Source #

(GenSym aspec a, Mergeable a, GenSym bspec b, Mergeable b, GenSym cspec c, Mergeable c) => GenSym (aspec, bspec, cspec) (a, b, c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (aspec, bspec, cspec) -> m (Union (a, b, c)) Source #

(GenSym aspec a, Mergeable a, GenSym bspec b, Mergeable b, GenSym cspec c, Mergeable c, GenSym dspec d, Mergeable d) => GenSym (aspec, bspec, cspec, dspec) (a, b, c, d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (aspec, bspec, cspec, dspec) -> m (Union (a, b, c, d)) Source #

(GenSym aspec a, Mergeable a, GenSym bspec b, Mergeable b, GenSym cspec c, Mergeable c, GenSym dspec d, Mergeable d, GenSym espec e, Mergeable e) => GenSym (aspec, bspec, cspec, dspec, espec) (a, b, c, d, e) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (aspec, bspec, cspec, dspec, espec) -> m (Union (a, b, c, d, e)) Source #

(GenSym aspec a, Mergeable a, GenSym bspec b, Mergeable b, GenSym cspec c, Mergeable c, GenSym dspec d, Mergeable d, GenSym espec e, Mergeable e, GenSym fspec f, Mergeable f) => GenSym (aspec, bspec, cspec, dspec, espec, fspec) (a, b, c, d, e, f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (aspec, bspec, cspec, dspec, espec, fspec) -> m (Union (a, b, c, d, e, f)) Source #

(GenSym aspec a, Mergeable a, GenSym bspec b, Mergeable b, GenSym cspec c, Mergeable c, GenSym dspec d, Mergeable d, GenSym espec e, Mergeable e, GenSym fspec f, Mergeable f, GenSym gspec g, Mergeable g) => GenSym (aspec, bspec, cspec, dspec, espec, fspec, gspec) (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (aspec, bspec, cspec, dspec, espec, fspec, gspec) -> m (Union (a, b, c, d, e, f, g)) Source #

(GenSym aspec a, Mergeable a, GenSym bspec b, Mergeable b, GenSym cspec c, Mergeable c, GenSym dspec d, Mergeable d, GenSym espec e, Mergeable e, GenSym fspec f, Mergeable f, GenSym gspec g, Mergeable g, GenSym hspec h, Mergeable h) => GenSym (aspec, bspec, cspec, dspec, espec, fspec, gspec, hspec) (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => (aspec, bspec, cspec, dspec, espec, fspec, gspec, hspec) -> m (Union (a, b, c, d, e, f, g, h)) Source #

class GenSymSimple spec a where Source #

Class of types in which symbolic values can be generated with respect to some specification.

The result will not be wrapped in a union-like monad.

The uniqueness of symbolic constants is managed with the a monadic context. Fresh and FreshT can be useful.

Methods

simpleFresh :: MonadFresh m => spec -> m a Source #

Generate a symbolic value given some specification. The uniqueness is ensured.

The following example generates a symbolic boolean. No specification is needed.

>>> runFresh (simpleFresh ()) "a" :: SymBool
a@0

The following code generates list of symbolic boolean with length 2. As the length is fixed, we don't have to wrap the result in unions.

>>> runFresh (simpleFresh (SimpleListSpec 2 ())) "a" :: [SymBool]
[a@0,a@1]

Instances

Instances details
GenSymSimple Int16 Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple Int32 Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple Int64 Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple Int8 Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => Int8 -> m Int8 Source #

GenSymSimple Word16 Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple Word32 Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple Word64 Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple Word8 Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple ByteString ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple FPRoundingMode FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple SymAlgReal SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple SymBool SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple SymFPRoundingMode SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple SymInteger SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple Text Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => Text -> m Text Source #

GenSymSimple Integer Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple () SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

GenSymSimple () SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

GenSymSimple () SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple () SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

GenSymSimple () () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

GenSymSimple Bool Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => Bool -> m Bool Source #

GenSymSimple Char Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => Char -> m Char Source #

GenSymSimple Double Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple Float Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

GenSymSimple Int Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => Int -> m Int Source #

GenSymSimple Word Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => Word -> m Word Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

simpleFresh :: MonadFresh m => Int -> m (SomeBV bv) Source #

GenSym spec a => GenSymSimple spec (Union a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => spec -> m (Union a) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (SymFP eb sb) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (a, b) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m0 => spec -> m0 (MaybeT m a) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (a, b, c) Source #

GenSymSimple spec (m (CBMCEither a b)) => GenSymSimple spec (CBMCExceptT a m b) Source # 
Instance details

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

Methods

simpleFresh :: MonadFresh m0 => spec -> m0 (CBMCExceptT a m b) Source #

GenSymSimple spec (m (Either a b)) => GenSymSimple spec (ExceptT a m b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m0 => spec -> m0 (ExceptT a m b) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (a, b, c, d) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (a, b, c, d, e) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (a, b, c, d, e, f) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (a, b, c, d, e, f, g) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => () -> m (a, b, c, d, e, f, g, h) Source #

GenSymSimple spec a => GenSymSimple (SimpleListSpec spec) [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => SimpleListSpec spec -> m [a] Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

(forall (m :: Nat). (KnownNat m, 1 <= m) => GenSymSimple () (bv m), Mergeable (SomeBV bv)) => GenSymSimple (SomeBV bv) (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

simpleFresh :: MonadFresh m => SomeBV bv -> m (SomeBV bv) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

GenSymSimple aspec a => GenSymSimple (Maybe aspec) (Maybe a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => Maybe aspec -> m (Maybe a) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => [a] -> m [a] Source #

(KnownNat n, 1 <= n, forall (m :: Nat). (KnownNat m, 1 <= m) => GenSymSimple () (bv m), Mergeable (SomeBV bv)) => GenSymSimple (Proxy n) (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

simpleFresh :: MonadFresh m => Proxy n -> m (SomeBV bv) Source #

(GenSymSimple aspec a, GenSymSimple bspec b) => GenSymSimple (Either aspec bspec) (Either a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => Either aspec bspec -> m (Either a b) Source #

(GenSymSimple a a, GenSymSimple b b) => GenSymSimple (CBMCEither a b) (CBMCEither a b) Source # 
Instance details

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

Methods

simpleFresh :: MonadFresh m => CBMCEither a b -> m (CBMCEither a b) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => FP eb sb -> m (FP eb sb) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => SymFP eb sb -> m (SymFP eb sb) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

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

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m0 => MaybeT m a -> m0 (MaybeT m a) Source #

(GenSymSimple aspec a, GenSymSimple bspec b) => GenSymSimple (aspec, bspec) (a, b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => (aspec, bspec) -> m (a, b) Source #

GenSymSimple (m (CBMCEither e a)) (m (CBMCEither e a)) => GenSymSimple (CBMCExceptT e m a) (CBMCExceptT e m a) Source # 
Instance details

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

Methods

simpleFresh :: MonadFresh m0 => CBMCExceptT e m a -> m0 (CBMCExceptT e m a) Source #

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

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m0 => ExceptT e m a -> m0 (ExceptT e m a) Source #

(GenSymSimple aspec a, GenSymSimple bspec b, GenSymSimple cspec c) => GenSymSimple (aspec, bspec, cspec) (a, b, c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => (aspec, bspec, cspec) -> m (a, b, c) Source #

(GenSymSimple aspec a, GenSymSimple bspec b, GenSymSimple cspec c, GenSymSimple dspec d) => GenSymSimple (aspec, bspec, cspec, dspec) (a, b, c, d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => (aspec, bspec, cspec, dspec) -> m (a, b, c, d) Source #

(GenSymSimple aspec a, GenSymSimple bspec b, GenSymSimple cspec c, GenSymSimple dspec d, GenSymSimple espec e) => GenSymSimple (aspec, bspec, cspec, dspec, espec) (a, b, c, d, e) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => (aspec, bspec, cspec, dspec, espec) -> m (a, b, c, d, e) Source #

(GenSymSimple aspec a, GenSymSimple bspec b, GenSymSimple cspec c, GenSymSimple dspec d, GenSymSimple espec e, GenSymSimple fspec f) => GenSymSimple (aspec, bspec, cspec, dspec, espec, fspec) (a, b, c, d, e, f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => (aspec, bspec, cspec, dspec, espec, fspec) -> m (a, b, c, d, e, f) Source #

(GenSymSimple aspec a, GenSymSimple bspec b, GenSymSimple cspec c, GenSymSimple dspec d, GenSymSimple espec e, GenSymSimple fspec f, GenSymSimple gspec g) => GenSymSimple (aspec, bspec, cspec, dspec, espec, fspec, gspec) (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => (aspec, bspec, cspec, dspec, espec, fspec, gspec) -> m (a, b, c, d, e, f, g) Source #

(GenSymSimple aspec a, GenSymSimple bspec b, GenSymSimple cspec c, GenSymSimple dspec d, GenSymSimple espec e, GenSymSimple fspec f, GenSymSimple gspec g, GenSymSimple hspec h) => GenSymSimple (aspec, bspec, cspec, dspec, espec, fspec, gspec, hspec) (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => (aspec, bspec, cspec, dspec, espec, fspec, gspec, hspec) -> m (a, b, c, d, e, f, g, h) Source #

genSym :: GenSym spec a => spec -> Identifier -> Union a Source #

Generate a symbolic variable wrapped in a Union without the monadic context. A globally unique identifier should be supplied to ensure the uniqueness of symbolic constants in the generated symbolic values.

>>> genSym (ListSpec 1 2 ()) "a" :: Union [SymBool]
{If a@2 [a@1] [a@0,a@1]}

genSymSimple :: forall spec a. GenSymSimple spec a => spec -> Identifier -> a Source #

Generate a simple symbolic variable wrapped in a Union without the monadic context. A globally unique identifier should be supplied to ensure the uniqueness of symbolic constants in the generated symbolic values.

>>> genSymSimple (SimpleListSpec 2 ()) "a" :: [SymBool]
[a@0,a@1]

Symbolic Generation Class Derivation

derivedNoSpecFresh :: forall a m. (Generic a, GenSymNoSpec (Rep a), Mergeable a, MonadFresh m) => () -> m (Union a) Source #

We cannot provide DerivingVia style derivation for GenSym, while you can use this fresh implementation to implement GenSym for your own types.

This fresh implementation is for the types that does not need any specification. It will generate product types by generating each fields with () as specification, and generate all possible values for a sum type.

Note: Never use on recursive types.

derivedNoSpecSimpleFresh :: forall a m. (Generic a, GenSymSimpleNoSpec (Rep a), MonadFresh m) => () -> m a Source #

We cannot provide DerivingVia style derivation for GenSymSimple, while you can use this simpleFresh implementation to implement GenSymSimple fo your own types.

This simpleFresh implementation is for the types that does not need any specification. It will generate product types by generating each fields with () as specification. It will not work on sum types.

Note: Never use on recursive types.

derivedSameShapeSimpleFresh :: forall a m. (Generic a, GenSymSameShape (Rep a), MonadFresh m) => a -> m a Source #

We cannot provide DerivingVia style derivation for GenSymSimple, while you can use this simpleFresh implementation to implement GenSymSimple fo your own types.

This simpleFresh implementation is for the types that can be generated with a reference value of the same type.

For sum types, it will generate the result with the same data constructor. For product types, it will generate the result by generating each field with the corresponding reference value.

Note: Can be used on recursive types.

Symbolic choice

chooseFresh :: forall a m. (Mergeable a, MonadFresh m) => [a] -> m (Union a) Source #

Symbolically chooses one of the provided values. The procedure creates n - 1 fresh symbolic boolean variables every time it is evaluated, and use these variables to conditionally select one of the n provided expressions.

The result will be wrapped in a union-like monad, and also a monad maintaining the MonadFresh context.

>>> runFresh (chooseFresh [1,2,3]) "a" :: Union Integer
{If a@0 1 (If a@1 2 3)}

chooseSimpleFresh :: forall a m. (SimpleMergeable a, MonadFresh m) => [a] -> m a Source #

Symbolically chooses one of the provided values. The procedure creates n - 1 fresh symbolic boolean variables every time it is evaluated, and use these variables to conditionally select one of the n provided expressions.

The result will not be wrapped in a union-like monad, but will be wrapped in a monad maintaining the Fresh context.

>>> import Data.Proxy
>>> runFresh (chooseSimpleFresh [ssym "b", ssym "c", ssym "d"]) "a" :: SymInteger
(ite a@0 b (ite a@1 c d))

chooseUnionFresh :: forall a m. (Mergeable a, MonadFresh m) => [Union a] -> m (Union a) Source #

Symbolically chooses one of the provided values wrapped in union-like monads. The procedure creates n - 1 fresh symbolic boolean variables every time it is evaluated, and use these variables to conditionally select one of the n provided expressions.

The result will be wrapped in a union-like monad, and also a monad maintaining the Fresh context.

>>> let a = runFresh (chooseFresh [1, 2]) "a" :: Union Integer
>>> let b = runFresh (chooseFresh [2, 3]) "b" :: Union Integer
>>> runFresh (chooseUnionFresh [a, b]) "c" :: Union Integer
{If (&& c@0 a@0) 1 (If (|| c@0 b@0) 2 3)}

choose :: forall a. Mergeable a => [a] -> Identifier -> Union a Source #

A wrapper for chooseFresh that executes the MonadFresh context. A globally unique identifier should be supplied to ensure the uniqueness of symbolic constants in the generated symbolic values.

chooseSimple :: forall a. SimpleMergeable a => [a] -> Identifier -> a Source #

A wrapper for chooseSimpleFresh that executes the MonadFresh context. A globally unique identifier should be supplied to ensure the uniqueness of symbolic constants in the generated symbolic values.

chooseUnion :: forall a. Mergeable a => [Union a] -> Identifier -> Union a Source #

A wrapper for chooseUnionFresh that executes the MonadFresh context. A globally unique identifier should be supplied to ensure the uniqueness of symbolic constants in the generated symbolic values.

Useful specifications

data EnumGenBound a Source #

Specification for numbers with lower bound (inclusive) and upper bound (exclusive)

>>> runFresh (fresh (EnumGenBound @Integer 0 4)) "c" :: Union Integer
{If c@0 0 (If c@1 1 (If c@2 2 3))}

Constructors

EnumGenBound a a 

Instances

Instances details
(Enum v, Mergeable v) => GenSym (EnumGenBound v) v Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => EnumGenBound v -> m (Union v) Source #

newtype EnumGenUpperBound a Source #

Specification for enum values with upper bound (exclusive). The result would chosen from [0 .. upperbound].

>>> runFresh (fresh (EnumGenUpperBound @Integer 4)) "c" :: Union Integer
{If c@0 0 (If c@1 1 (If c@2 2 3))}

Constructors

EnumGenUpperBound a 

Instances

Instances details
(Enum v, Mergeable v) => GenSym (EnumGenUpperBound v) v Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => EnumGenUpperBound v -> m (Union v) Source #

data ListSpec spec Source #

Specification for list generation.

>>> runFresh (fresh (ListSpec 0 2 ())) "c" :: Union [SymBool]
{If c@2 [] (If c@3 [c@1] [c@0,c@1])}
>>> runFresh (fresh (ListSpec 0 2 (SimpleListSpec 1 ()))) "c" :: Union [[SymBool]]
{If c@2 [] (If c@3 [[c@1]] [[c@0],[c@1]])}

Constructors

ListSpec 

Fields

Instances

Instances details
Show spec => Show (ListSpec spec) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

showsPrec :: Int -> ListSpec spec -> ShowS #

show :: ListSpec spec -> String #

showList :: [ListSpec spec] -> ShowS #

(GenSymConstrained spec a, Mergeable a) => GenSymConstrained (ListSpec spec) [a] Source # 
Instance details

Defined in Grisette.Experimental.GenSymConstrained

Methods

freshConstrained :: (MonadFresh m, MonadError e m, MonadUnion m) => e -> ListSpec spec -> m (Union [a]) Source #

(GenSym spec a, Mergeable a) => GenSym (ListSpec spec) [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => ListSpec spec -> m (Union [a]) Source #

data SimpleListSpec spec Source #

Specification for list generation of a specific length.

>>> runFresh (simpleFresh (SimpleListSpec 2 ())) "c" :: [SymBool]
[c@0,c@1]

Constructors

SimpleListSpec 

Fields

Instances

Instances details
Show spec => Show (SimpleListSpec spec) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

(GenSymConstrained spec a, Mergeable a) => GenSymConstrained (SimpleListSpec spec) [a] Source # 
Instance details

Defined in Grisette.Experimental.GenSymConstrained

Methods

freshConstrained :: (MonadFresh m, MonadError e m, MonadUnion m) => e -> SimpleListSpec spec -> m (Union [a]) Source #

GenSymSimpleConstrained spec a => GenSymSimpleConstrained (SimpleListSpec spec) [a] Source # 
Instance details

Defined in Grisette.Experimental.GenSymConstrained

Methods

simpleFreshConstrained :: (MonadFresh m, MonadError e m, MonadUnion m) => e -> SimpleListSpec spec -> m [a] Source #

(GenSym spec a, Mergeable a) => GenSym (SimpleListSpec spec) [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

fresh :: MonadFresh m => SimpleListSpec spec -> m (Union [a]) Source #

GenSymSimple spec a => GenSymSimple (SimpleListSpec spec) [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.GenSym

Methods

simpleFresh :: MonadFresh m => SimpleListSpec spec -> m [a] Source #

Error Handling

Grisette supports using ExceptT to handle errors, and provides the mrg* variants for the combinators in Grisette.Lib.Mtl, for example, mrgThrowError.

>>> import Control.Monad.Except
>>> import Grisette.Lib.Control.Monad.Except
>>> mrgThrowError AssertionError :: ExceptT AssertionError Union ()
ExceptT {Left AssertionError}

You can define your own error types, and reason about them with the solver APIs.

>>> import GHC.Generics
>>> :{
  data Error = Error1 | Error2 | Error3
    deriving (Show, Generic)
    deriving (Mergeable) via Default Error
:}
>>> let [a,b,c] = ["a","b","c"] :: [SymBool]
>>> res = mrgIf a (throwError Error1) (mrgIf b (return c) (throwError Error2)) :: ExceptT Error Union SymBool
>>> res
ExceptT {If (|| a (! b)) (If a (Left Error1) (Left Error2)) (Right c)}
>>> solveExcept z3 (\case Left _ -> con False; Right x -> x) res
Right (Model {a -> False :: Bool, b -> True :: Bool, c -> True :: Bool})

The solver call in the above example means that we want the solver to find the conditions under which no error is thrown, and the result is true. For more details, please refer to the documentation of the solver APIs.

For those who prefer to encode errors as assertions and assumptions, we provide the symAssert and symAssume functions. These functions relies on the TransformError type class to transform the assertions and assumptions to the user-defined error type. See their documentation for details.

Predefined errors

data AssertionError Source #

Assertion error.

Constructors

AssertionError 

Instances

Instances details
Generic AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

Associated Types

type Rep AssertionError :: Type -> Type #

Show AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

NFData AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

Methods

rnf :: AssertionError -> () #

Eq AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

Ord AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

EvalSym AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

ExtractSym AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Mergeable AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

PPrint AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

SimpleMergeable AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

SubstSym AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> AssertionError -> AssertionError Source #

SymEq AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymOrd AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

AllSyms AssertionError Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

TransformError ArithException AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Error

TransformError ArrayException AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Error

TransformError AssertionError AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Error

TransformError AssertionError VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Error

ToCon AssertionError AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToSym AssertionError AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Typeable mode => UnifiedSimpleMergeable mode AssertionError Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSimpleMergeable

Typeable mode => UnifiedSymEq mode AssertionError Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSymEq

Typeable mode => UnifiedSymOrd mode AssertionError Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSymOrd

type Rep AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

type Rep AssertionError = D1 ('MetaData "AssertionError" "Grisette.Internal.Core.Control.Exception" "grisette-0.8.0.0-9ziui23pS5H4p62qxsVv1c" 'False) (C1 ('MetaCons "AssertionError" 'PrefixI 'False) (U1 :: Type -> Type))

data VerificationConditions Source #

Verification conditions. A crashed program path can terminate with either assertion violation errors or assumption violation errors.

Instances

Instances details
Generic VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

Associated Types

type Rep VerificationConditions :: Type -> Type #

Show VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

NFData VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

Methods

rnf :: VerificationConditions -> () #

Eq VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

Ord VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

EvalSym VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

ExtractSym VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Mergeable VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

PPrint VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

SubstSym VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> VerificationConditions -> VerificationConditions Source #

SymEq VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

SymOrd VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

AllSyms VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

TransformError AssertionError VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Error

TransformError VerificationConditions VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Error

ToCon VerificationConditions VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

ToSym VerificationConditions VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Typeable mode => UnifiedSymEq mode VerificationConditions Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSymEq

Typeable mode => UnifiedSymOrd mode VerificationConditions Source # 
Instance details

Defined in Grisette.Unified.Internal.Class.UnifiedSymOrd

type Rep VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Exception

type Rep VerificationConditions = D1 ('MetaData "VerificationConditions" "Grisette.Internal.Core.Control.Exception" "grisette-0.8.0.0-9ziui23pS5H4p62qxsVv1c" 'False) (C1 ('MetaCons "AssertionViolation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AssumptionViolation" 'PrefixI 'False) (U1 :: Type -> Type))

Error transformation

class TransformError from to where Source #

This class indicates that the error type to can always represent the error type from.

This is useful in implementing generic procedures that may throw errors. For example, we support symbolic division and modulo operations. These operations should throw an error when the divisor is zero, and we use the standard error type ArithException for this purpose. However, the user may use other type to represent errors, so we need this type class to transform the ArithException to the user-defined types.

Another example of these generic procedures is the symAssert and symAssume functions. They can be used with any error types that are compatible with the AssertionError and VerificationConditions types, respectively.

Methods

transformError :: from -> to Source #

Transforms an error with type from to an error with type to.

symAssert :: (TransformError AssertionError to, Mergeable to, MonadError to erm, MonadUnion erm) => SymBool -> erm () Source #

Used within a monadic multi path computation to begin exception processing.

Checks the condition passed to the function. The current execution path will be terminated with assertion error if the condition is false.

If the condition is symbolic, Grisette will split the execution into two paths based on the condition. The symbolic execution will continue on the then-branch, where the condition is true. For the else branch, where the condition is false, the execution will be terminated.

The resulting monadic environment should be compatible with the AssertionError error type. See TransformError type class for details.

Examples:

Terminates the execution if the condition is false. Note that we may lose the Mergeable knowledge here if no possible execution path is viable. This may affect the efficiency in theory, but in practice this should not be a problem as all paths are terminated and no further evaluation would be performed.

>>> symAssert (con False) :: ExceptT AssertionError Union ()
ExceptT {Left AssertionError}
>>> do; symAssert (con False); mrgReturn 1 :: ExceptT AssertionError Union Integer
ExceptT <Left AssertionError>

No effect if the condition is true:

>>> symAssert (con True) :: ExceptT AssertionError Union ()
ExceptT {Right ()}
>>> do; symAssert (con True); mrgReturn 1 :: ExceptT AssertionError Union Integer
ExceptT {Right 1}

Splitting the path and terminate one of them when the condition is symbolic.

>>> symAssert (ssym "a") :: ExceptT AssertionError Union ()
ExceptT {If (! a) (Left AssertionError) (Right ())}
>>> do; symAssert (ssym "a"); mrgReturn 1 :: ExceptT AssertionError Union Integer
ExceptT {If (! a) (Left AssertionError) (Right 1)}

AssertionError is compatible with VerificationConditions:

>>> symAssert (ssym "a") :: ExceptT VerificationConditions Union ()
ExceptT {If (! a) (Left AssertionViolation) (Right ())}

symAssume :: (TransformError VerificationConditions to, Mergeable to, MonadError to erm, MonadUnion erm) => SymBool -> erm () Source #

Used within a monadic multi path computation to begin exception processing.

Similar to symAssert, but terminates the execution path with AssumptionViolation error.

Examples:

>>> symAssume (ssym "a") :: ExceptT VerificationConditions Union ()
ExceptT {If (! a) (Left AssumptionViolation) (Right ())}

symAssertWith :: (Mergeable e, MonadError e erm, MonadUnion erm) => e -> SymBool -> erm () Source #

Symbolic assertion with a custom error.

symAssertTransformableError :: (Mergeable to, TransformError from to, MonadError to erm, MonadUnion erm) => from -> SymBool -> erm () Source #

Used within a monadic multi path computation for exception processing.

Terminate the current execution path with the specified error if the condition does not hold. Compatible error can be transformed.

>>> let assert = symAssertTransformableError AssertionError :: SymBool -> ExceptT AssertionError Union ()
>>> assert "a"
ExceptT {If (! a) (Left AssertionError) (Right ())}

symThrowTransformableError :: (Mergeable to, Mergeable a, TransformError from to, MonadError to erm, MonadUnion erm) => from -> erm a Source #

Used within a monadic multi path computation to begin exception processing.

Terminate the current execution path with the specified error. Compatible errors can be transformed.

>>> symThrowTransformableError Overflow :: ExceptT AssertionError Union ()
ExceptT {Left AssertionError}

Simulate CBMC error handling

newtype CBMCEither a b Source #

A wrapper type for Either. Uses different merging strategies.

Constructors

CBMCEither 

Fields

Instances

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

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

Methods

fresh :: MonadFresh m => () -> m (Union (CBMCEither a b)) Source #

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

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

Methods

lift :: Quote m => CBMCEither a b -> m Exp #

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

Eq a => Eq1 (CBMCEither a) Source # 
Instance details

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

Methods

liftEq :: (a0 -> b -> Bool) -> CBMCEither a a0 -> CBMCEither a b -> Bool #

Ord a => Ord1 (CBMCEither a) Source # 
Instance details

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

Methods

liftCompare :: (a0 -> b -> Ordering) -> CBMCEither a a0 -> CBMCEither a b -> Ordering #

Read a => Read1 (CBMCEither a) Source # 
Instance details

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

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (CBMCEither a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [CBMCEither a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (CBMCEither a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [CBMCEither a a0] #

Show a => Show1 (CBMCEither a) Source # 
Instance details

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

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> CBMCEither a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [CBMCEither a a0] -> ShowS #

Applicative (CBMCEither a) Source # 
Instance details

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

Methods

pure :: a0 -> CBMCEither a a0 #

(<*>) :: CBMCEither a (a0 -> b) -> CBMCEither a a0 -> CBMCEither a b #

liftA2 :: (a0 -> b -> c) -> CBMCEither a a0 -> CBMCEither a b -> CBMCEither a c #

(*>) :: CBMCEither a a0 -> CBMCEither a b -> CBMCEither a b #

(<*) :: CBMCEither a a0 -> CBMCEither a b -> CBMCEither a a0 #

Functor (CBMCEither a) Source # 
Instance details

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

Methods

fmap :: (a0 -> b) -> CBMCEither a a0 -> CBMCEither a b #

(<$) :: a0 -> CBMCEither a b -> CBMCEither a a0 #

Monad (CBMCEither a) Source # 
Instance details

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

Methods

(>>=) :: CBMCEither a a0 -> (a0 -> CBMCEither a b) -> CBMCEither a b #

(>>) :: CBMCEither a a0 -> CBMCEither a b -> CBMCEither a b #

return :: a0 -> CBMCEither a a0 #

Mergeable e => Mergeable1 (CBMCEither e) Source # 
Instance details

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

UnionWithExcept (Union (CBMCEither e v)) Union e v Source # 
Instance details

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

Generic (CBMCEither a b) Source # 
Instance details

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

Associated Types

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

Methods

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

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

(Read a, Read b) => Read (CBMCEither a b) Source # 
Instance details

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

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

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

Methods

showsPrec :: Int -> CBMCEither a b -> ShowS #

show :: CBMCEither a b -> String #

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

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

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

Methods

rnf :: CBMCEither a b -> () #

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

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

Methods

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

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

(Ord a, Ord b) => Ord (CBMCEither a b) Source # 
Instance details

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

Methods

compare :: CBMCEither a b -> CBMCEither a b -> Ordering #

(<) :: CBMCEither a b -> CBMCEither a b -> Bool #

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

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

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

max :: CBMCEither a b -> CBMCEither a b -> CBMCEither a b #

min :: CBMCEither a b -> CBMCEither a b -> CBMCEither a b #

(EvalSym a, EvalSym b) => EvalSym (CBMCEither a b) Source # 
Instance details

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

Methods

evalSym :: Bool -> Model -> CBMCEither a b -> CBMCEither a b Source #

(ExtractSym a, ExtractSym b) => ExtractSym (CBMCEither a b) Source # 
Instance details

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

(Mergeable e, Mergeable a) => Mergeable (CBMCEither e a) Source # 
Instance details

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

(SymEq e, SymEq a) => SymEq (CBMCEither e a) Source # 
Instance details

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

(SymOrd a, SymOrd b) => SymOrd (CBMCEither a b) Source # 
Instance details

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

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

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

Methods

hashWithSalt :: Int -> CBMCEither a b -> Int #

hash :: CBMCEither a b -> Int #

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

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

Methods

fresh :: MonadFresh m => CBMCEither a b -> m (Union (CBMCEither a b)) Source #

(GenSymSimple a a, GenSymSimple b b) => GenSymSimple (CBMCEither a b) (CBMCEither a b) Source # 
Instance details

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

Methods

simpleFresh :: MonadFresh m => CBMCEither a b -> m (CBMCEither a b) Source #

(ToCon e1 e2, ToCon a1 a2) => ToCon (Either e1 a1) (CBMCEither e2 a2) Source # 
Instance details

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

Methods

toCon :: Either e1 a1 -> Maybe (CBMCEither e2 a2) Source #

(ToCon e1 e2, ToCon a1 a2) => ToCon (CBMCEither e1 a1) (Either e2 a2) Source # 
Instance details

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

Methods

toCon :: CBMCEither e1 a1 -> Maybe (Either e2 a2) Source #

(ToCon e1 e2, ToCon a1 a2) => ToCon (CBMCEither e1 a1) (CBMCEither e2 a2) Source # 
Instance details

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

Methods

toCon :: CBMCEither e1 a1 -> Maybe (CBMCEither e2 a2) Source #

(ToSym e1 e2, ToSym a1 a2) => ToSym (Either e1 a1) (CBMCEither e2 a2) Source # 
Instance details

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

Methods

toSym :: Either e1 a1 -> CBMCEither e2 a2 Source #

(ToSym e1 e2, ToSym a1 a2) => ToSym (CBMCEither e1 a1) (Either e2 a2) Source # 
Instance details

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

Methods

toSym :: CBMCEither e1 a1 -> Either e2 a2 Source #

(ToSym e1 e2, ToSym a1 a2) => ToSym (CBMCEither e1 a1) (CBMCEither e2 a2) Source # 
Instance details

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

Methods

toSym :: CBMCEither e1 a1 -> CBMCEither e2 a2 Source #

type Rep (CBMCEither a b) Source # 
Instance details

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

type Rep (CBMCEither a b) = D1 ('MetaData "CBMCEither" "Grisette.Internal.Core.Control.Monad.CBMCExcept" "grisette-0.8.0.0-9ziui23pS5H4p62qxsVv1c" 'True) (C1 ('MetaCons "CBMCEither" 'PrefixI 'True) (S1 ('MetaSel ('Just "runCBMCEither") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either a b))))

newtype CBMCExceptT e m a Source #

Similar to ExceptT, but with different error handling mechanism.

Constructors

CBMCExceptT 

Fields

Instances

Instances details
Functor m => Generic1 (CBMCExceptT e m :: Type -> Type) Source # 
Instance details

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

Associated Types

type Rep1 (CBMCExceptT e m) :: k -> Type #

Methods

from1 :: forall (a :: k). CBMCExceptT e m a -> Rep1 (CBMCExceptT e m) a #

to1 :: forall (a :: k). Rep1 (CBMCExceptT e m) a -> CBMCExceptT e m a #

Monad m => MonadError e (CBMCExceptT e m) Source # 
Instance details

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

Methods

throwError :: e -> CBMCExceptT e m a #

catchError :: CBMCExceptT e m a -> (e -> CBMCExceptT e m a) -> CBMCExceptT e m a #

(GenSym spec (m (CBMCEither a b)), Mergeable1 m, Mergeable a, Mergeable b) => GenSym spec (CBMCExceptT a m b) Source # 
Instance details

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

Methods

fresh :: MonadFresh m0 => spec -> m0 (Union (CBMCExceptT a m b)) Source #

GenSymSimple spec (m (CBMCEither a b)) => GenSymSimple spec (CBMCExceptT a m b) Source # 
Instance details

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

Methods

simpleFresh :: MonadFresh m0 => spec -> m0 (CBMCExceptT a m b) Source #

MonadTrans (CBMCExceptT e) Source # 
Instance details

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

Methods

lift :: Monad m => m a -> CBMCExceptT e m a #

MonadFail m => MonadFail (CBMCExceptT e m) Source # 
Instance details

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

Methods

fail :: String -> CBMCExceptT e m a #

MonadFix m => MonadFix (CBMCExceptT e m) Source # 
Instance details

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

Methods

mfix :: (a -> CBMCExceptT e m a) -> CBMCExceptT e m a #

MonadIO m => MonadIO (CBMCExceptT e m) Source # 
Instance details

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

Methods

liftIO :: IO a -> CBMCExceptT e m a #

MonadZip m => MonadZip (CBMCExceptT e m) Source # 
Instance details

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

Methods

mzip :: CBMCExceptT e m a -> CBMCExceptT e m b -> CBMCExceptT e m (a, b) #

mzipWith :: (a -> b -> c) -> CBMCExceptT e m a -> CBMCExceptT e m b -> CBMCExceptT e m c #

munzip :: CBMCExceptT e m (a, b) -> (CBMCExceptT e m a, CBMCExceptT e m b) #

Foldable f => Foldable (CBMCExceptT e f) Source # 
Instance details

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

Methods

fold :: Monoid m => CBMCExceptT e f m -> m #

foldMap :: Monoid m => (a -> m) -> CBMCExceptT e f a -> m #

foldMap' :: Monoid m => (a -> m) -> CBMCExceptT e f a -> m #

foldr :: (a -> b -> b) -> b -> CBMCExceptT e f a -> b #

foldr' :: (a -> b -> b) -> b -> CBMCExceptT e f a -> b #

foldl :: (b -> a -> b) -> b -> CBMCExceptT e f a -> b #

foldl' :: (b -> a -> b) -> b -> CBMCExceptT e f a -> b #

foldr1 :: (a -> a -> a) -> CBMCExceptT e f a -> a #

foldl1 :: (a -> a -> a) -> CBMCExceptT e f a -> a #

toList :: CBMCExceptT e f a -> [a] #

null :: CBMCExceptT e f a -> Bool #

length :: CBMCExceptT e f a -> Int #

elem :: Eq a => a -> CBMCExceptT e f a -> Bool #

maximum :: Ord a => CBMCExceptT e f a -> a #

minimum :: Ord a => CBMCExceptT e f a -> a #

sum :: Num a => CBMCExceptT e f a -> a #

product :: Num a => CBMCExceptT e f a -> a #

(Eq e, Eq1 m) => Eq1 (CBMCExceptT e m) Source # 
Instance details

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

Methods

liftEq :: (a -> b -> Bool) -> CBMCExceptT e m a -> CBMCExceptT e m b -> Bool #

(Ord e, Ord1 m) => Ord1 (CBMCExceptT e m) Source # 
Instance details

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

Methods

liftCompare :: (a -> b -> Ordering) -> CBMCExceptT e m a -> CBMCExceptT e m b -> Ordering #

(Read e, Read1 m) => Read1 (CBMCExceptT e m) Source # 
Instance details

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

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (CBMCExceptT e m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [CBMCExceptT e m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (CBMCExceptT e m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [CBMCExceptT e m a] #

(Show e, Show1 m) => Show1 (CBMCExceptT e m) Source # 
Instance details

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

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> CBMCExceptT e m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [CBMCExceptT e m a] -> ShowS #

Contravariant m => Contravariant (CBMCExceptT e m) Source # 
Instance details

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

Methods

contramap :: (a' -> a) -> CBMCExceptT e m a -> CBMCExceptT e m a' #

(>$) :: b -> CBMCExceptT e m b -> CBMCExceptT e m a #

Traversable f => Traversable (CBMCExceptT e f) Source # 
Instance details

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

Methods

traverse :: Applicative f0 => (a -> f0 b) -> CBMCExceptT e f a -> f0 (CBMCExceptT e f b) #

sequenceA :: Applicative f0 => CBMCExceptT e f (f0 a) -> f0 (CBMCExceptT e f a) #

mapM :: Monad m => (a -> m b) -> CBMCExceptT e f a -> m (CBMCExceptT e f b) #

sequence :: Monad m => CBMCExceptT e f (m a) -> m (CBMCExceptT e f a) #

(Functor m, Monad m, Monoid e) => Alternative (CBMCExceptT e m) Source # 
Instance details

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

Methods

empty :: CBMCExceptT e m a #

(<|>) :: CBMCExceptT e m a -> CBMCExceptT e m a -> CBMCExceptT e m a #

some :: CBMCExceptT e m a -> CBMCExceptT e m [a] #

many :: CBMCExceptT e m a -> CBMCExceptT e m [a] #

(Functor m, Monad m) => Applicative (CBMCExceptT e m) Source # 
Instance details

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

Methods

pure :: a -> CBMCExceptT e m a #

(<*>) :: CBMCExceptT e m (a -> b) -> CBMCExceptT e m a -> CBMCExceptT e m b #

liftA2 :: (a -> b -> c) -> CBMCExceptT e m a -> CBMCExceptT e m b -> CBMCExceptT e m c #

(*>) :: CBMCExceptT e m a -> CBMCExceptT e m b -> CBMCExceptT e m b #

(<*) :: CBMCExceptT e m a -> CBMCExceptT e m b -> CBMCExceptT e m a #

Functor m => Functor (CBMCExceptT e m) Source # 
Instance details

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

Methods

fmap :: (a -> b) -> CBMCExceptT e m a -> CBMCExceptT e m b #

(<$) :: a -> CBMCExceptT e m b -> CBMCExceptT e m a #

Monad m => Monad (CBMCExceptT e m) Source # 
Instance details

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

Methods

(>>=) :: CBMCExceptT e m a -> (a -> CBMCExceptT e m b) -> CBMCExceptT e m b #

(>>) :: CBMCExceptT e m a -> CBMCExceptT e m b -> CBMCExceptT e m b #

return :: a -> CBMCExceptT e m a #

(Monad m, Monoid e) => MonadPlus (CBMCExceptT e m) Source # 
Instance details

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

Methods

mzero :: CBMCExceptT e m a #

mplus :: CBMCExceptT e m a -> CBMCExceptT e m a -> CBMCExceptT e m a #

(Mergeable1 m, Mergeable e) => Mergeable1 (CBMCExceptT e m) Source # 
Instance details

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

(SymBranching m, Mergeable e) => SimpleMergeable1 (CBMCExceptT e m) Source # 
Instance details

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

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> CBMCExceptT e m a -> CBMCExceptT e m a -> CBMCExceptT e m a Source #

(SymBranching m, Mergeable e) => SymBranching (CBMCExceptT e m) Source # 
Instance details

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

(TryMerge m, Mergeable e) => TryMerge (CBMCExceptT e m) Source # 
Instance details

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

Generic (CBMCExceptT e m a) Source # 
Instance details

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

Associated Types

type Rep (CBMCExceptT e m a) :: Type -> Type #

Methods

from :: CBMCExceptT e m a -> Rep (CBMCExceptT e m a) x #

to :: Rep (CBMCExceptT e m a) x -> CBMCExceptT e m a #

(Read e, Read1 m, Read a) => Read (CBMCExceptT e m a) Source # 
Instance details

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

(Show e, Show1 m, Show a) => Show (CBMCExceptT e m a) Source # 
Instance details

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

Methods

showsPrec :: Int -> CBMCExceptT e m a -> ShowS #

show :: CBMCExceptT e m a -> String #

showList :: [CBMCExceptT e m a] -> ShowS #

(Eq e, Eq1 m, Eq a) => Eq (CBMCExceptT e m a) Source # 
Instance details

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

Methods

(==) :: CBMCExceptT e m a -> CBMCExceptT e m a -> Bool #

(/=) :: CBMCExceptT e m a -> CBMCExceptT e m a -> Bool #

(Ord e, Ord1 m, Ord a) => Ord (CBMCExceptT e m a) Source # 
Instance details

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

Methods

compare :: CBMCExceptT e m a -> CBMCExceptT e m a -> Ordering #

(<) :: CBMCExceptT e m a -> CBMCExceptT e m a -> Bool #

(<=) :: CBMCExceptT e m a -> CBMCExceptT e m a -> Bool #

(>) :: CBMCExceptT e m a -> CBMCExceptT e m a -> Bool #

(>=) :: CBMCExceptT e m a -> CBMCExceptT e m a -> Bool #

max :: CBMCExceptT e m a -> CBMCExceptT e m a -> CBMCExceptT e m a #

min :: CBMCExceptT e m a -> CBMCExceptT e m a -> CBMCExceptT e m a #

EvalSym (m (CBMCEither e a)) => EvalSym (CBMCExceptT e m a) Source # 
Instance details

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

Methods

evalSym :: Bool -> Model -> CBMCExceptT e m a -> CBMCExceptT e m a Source #

ExtractSym (m (CBMCEither e a)) => ExtractSym (CBMCExceptT e m a) Source # 
Instance details

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

(Mergeable1 m, Mergeable e, Mergeable a) => Mergeable (CBMCExceptT e m a) Source # 
Instance details

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

(SymBranching m, Mergeable e, Mergeable a) => SimpleMergeable (CBMCExceptT e m a) Source # 
Instance details

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

Methods

mrgIte :: SymBool -> CBMCExceptT e m a -> CBMCExceptT e m a -> CBMCExceptT e m a Source #

SymEq (m (CBMCEither e a)) => SymEq (CBMCExceptT e m a) Source # 
Instance details

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

SymOrd (m (CBMCEither e a)) => SymOrd (CBMCExceptT e m a) Source # 
Instance details

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

(Monad u, TryMerge u, Mergeable e, Mergeable v) => UnionWithExcept (CBMCExceptT e u v) u e v Source # 
Instance details

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

Methods

extractUnionExcept :: CBMCExceptT e u v -> u (Either e v) Source #

ToCon (m1 (CBMCEither e1 a)) (Either e2 b) => ToCon (CBMCExceptT e1 m1 a) (Either e2 b) Source # 
Instance details

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

Methods

toCon :: CBMCExceptT e1 m1 a -> Maybe (Either e2 b) Source #

(GenSymSimple (m (CBMCEither e a)) (m (CBMCEither e a)), Mergeable1 m, Mergeable e, Mergeable a) => GenSym (CBMCExceptT e m a) (CBMCExceptT e m a) Source # 
Instance details

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

Methods

fresh :: MonadFresh m0 => CBMCExceptT e m a -> m0 (Union (CBMCExceptT e m a)) Source #

GenSymSimple (m (CBMCEither e a)) (m (CBMCEither e a)) => GenSymSimple (CBMCExceptT e m a) (CBMCExceptT e m a) Source # 
Instance details

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

Methods

simpleFresh :: MonadFresh m0 => CBMCExceptT e m a -> m0 (CBMCExceptT e m a) Source #

(ToCon1 m1 m2, ToCon e1 e2, ToCon a b) => ToCon (CBMCExceptT e1 m1 a) (CBMCExceptT e2 m2 b) Source # 
Instance details

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

Methods

toCon :: CBMCExceptT e1 m1 a -> Maybe (CBMCExceptT e2 m2 b) Source #

(ToSym e1 e2, ToSym a b, ToSym1 m1 m2) => ToSym (CBMCExceptT e1 m1 a) (CBMCExceptT e2 m2 b) Source # 
Instance details

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

Methods

toSym :: CBMCExceptT e1 m1 a -> CBMCExceptT e2 m2 b Source #

type Rep1 (CBMCExceptT e m :: Type -> Type) Source # 
Instance details

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

type Rep1 (CBMCExceptT e m :: Type -> Type) = D1 ('MetaData "CBMCExceptT" "Grisette.Internal.Core.Control.Monad.CBMCExcept" "grisette-0.8.0.0-9ziui23pS5H4p62qxsVv1c" 'True) (C1 ('MetaCons "CBMCExceptT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runCBMCExceptT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (m :.: Rec1 (CBMCEither e))))
type Rep (CBMCExceptT e m a) Source # 
Instance details

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

type Rep (CBMCExceptT e m a) = D1 ('MetaData "CBMCExceptT" "Grisette.Internal.Core.Control.Monad.CBMCExcept" "grisette-0.8.0.0-9ziui23pS5H4p62qxsVv1c" 'True) (C1 ('MetaCons "CBMCExceptT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runCBMCExceptT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (CBMCEither e a)))))

cbmcExcept :: Monad m => Either e a -> CBMCExceptT e m a Source #

Wrap an Either value in CBMCExceptT

mapCBMCExceptT :: (m (Either e a) -> n (Either e' b)) -> CBMCExceptT e m a -> CBMCExceptT e' n b Source #

Map the error and values in a CBMCExceptT

withCBMCExceptT :: Functor m => (e -> e') -> CBMCExceptT e m a -> CBMCExceptT e' m a Source #

Map the error in a CBMCExceptT

Solver backend

Grisette abstracts the solver backend with the Solver type class, and the most basic solver call is the solve function.

In the following code, we will search for the integer solutions to two equation systems. The first equation system, as shown below, has the solution (x, y) = (13, -7).

[ left{ begin{aligned} x + y &= 6 -- x - y &= 20

Solver interfaces

data SolvingFailure Source #

The current failures that can be returned by the solver.

Constructors

Unsat

Unsatisfiable: No model is available.

Unk

Unknown: The solver cannot determine whether the formula is satisfiable.

ResultNumLimitReached

The solver has reached the maximum number of models to return.

SolvingError SomeException

The solver has encountered an error.

Terminated

The solver has been terminated.

Instances

Instances details
Show SolvingFailure Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Solver

class Monad m => MonadicSolver m where Source #

A monadic solver interface.

This interface abstract the monadic interface of a solver. All the operations performed in the monad are using a single solver instance. The solver instance is management by the monad's run function.

monadicSolverSolve :: MonadicSolver m => SymBool -> m (Either SolvingFailure Model) Source #

Solve a single formula with a monadic solver. Find an assignment to it to make it true.

data SolverCommand Source #

The commands that can be sent to a solver.

class Solver handle => ConfigurableSolver config handle | config -> handle where Source #

A class that abstracts the creation of a solver instance based on a configuration.

The solver instance will need to be terminated by the user, with the solver interface.

Methods

newSolver :: config -> IO handle Source #

class Solver handle where Source #

A class that abstracts the solver interface.

Methods

solverRunCommand :: (handle -> IO (Either SolvingFailure a)) -> handle -> SolverCommand -> IO (Either SolvingFailure a) Source #

Run a solver command.

solverAssert :: handle -> SymBool -> IO (Either SolvingFailure ()) Source #

Assert a formula.

solverCheckSat :: handle -> IO (Either SolvingFailure Model) Source #

Solve a formula.

solverPush :: handle -> Int -> IO (Either SolvingFailure ()) Source #

Push n levels.

solverPop :: handle -> Int -> IO (Either SolvingFailure ()) Source #

Pop n levels.

solverResetAssertions :: handle -> IO (Either SolvingFailure ()) Source #

Reset all assertions in the solver.

The solver keeps all the assertions used in the previous commands:

>>> solver <- newSolver z3
>>> solverSolve solver "a"
Right (Model {a -> True :: Bool})
>>> solverSolve solver $ symNot "a"
Left Unsat

You can clear the assertions using solverResetAssertions:

>>> solverResetAssertions solver
Right ()
>>> solverSolve solver $ symNot "a"
Right (Model {a -> False :: Bool})

solverTerminate :: handle -> IO () Source #

Terminate the solver, wait until the last command is finished.

solverForceTerminate :: handle -> IO () Source #

Force terminate the solver, do not wait for the last command to finish.

solverSolve :: Solver handle => handle -> SymBool -> IO (Either SolvingFailure Model) Source #

Solve a single formula. Find an assignment to it to make it true.

withSolver :: ConfigurableSolver config handle => config -> (handle -> IO a) -> IO a Source #

Start a solver, run a computation with the solver, and terminate the solver after the computation finishes.

When an exception happens, this will forcibly terminate the solver.

Note: if Grisette is compiled with sbv < 10.10, the solver likely won't be really terminated until it has finished the last action, and this will result in long-running or zombie solver instances.

This was due to a bug in sbv, which is fixed in https://github.com/LeventErkok/sbv/pull/695.

solve Source #

Arguments

:: ConfigurableSolver config handle 
=> config

solver configuration

-> SymBool

formula to solve, the solver will try to make it true

-> IO (Either SolvingFailure Model) 

Solve a single formula. Find an assignment to it to make it true.

>>> solve z3 ("a" .&& ("b" :: SymInteger) .== 1)
Right (Model {a -> True :: Bool, b -> 1 :: Integer})
>>> solve z3 ("a" .&& symNot "a")
Left Unsat

solverSolveMulti Source #

Arguments

:: Solver handle 
=> handle

solver handle

-> Int

maximum number of models to return

-> SymBool

formula to solve, the solver will try to make it true

-> IO ([Model], SolvingFailure) 

Solve a single formula while returning multiple models to make it true. The maximum number of desired models are given.

solveMulti Source #

Arguments

:: ConfigurableSolver config handle 
=> config

solver configuration

-> Int

maximum number of models to return

-> SymBool

formula to solve, the solver will try to make it true

-> IO ([Model], SolvingFailure) 

Solve a single formula while returning multiple models to make it true. The maximum number of desired models are given.

>>> solveMulti z3 4 ("a" .|| "b")
[Model {a -> True :: Bool, b -> False :: Bool},Model {a -> False :: Bool, b -> True :: Bool},Model {a -> True :: Bool, b -> True :: Bool}]

Union with exceptions

class UnionWithExcept t u e v | t -> u e v where Source #

A class that abstracts the union-like structures that contains exceptions.

Methods

extractUnionExcept :: t -> u (Either e v) Source #

Extract a union of exceptions and values from the structure.

Instances

Instances details
UnionWithExcept (Union (Either e v)) Union e v Source # 
Instance details

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

UnionWithExcept (Union (CBMCEither e v)) Union e v Source # 
Instance details

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

(Monad u, TryMerge u, Mergeable e, Mergeable v) => UnionWithExcept (CBMCExceptT e u v) u e v Source # 
Instance details

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

Methods

extractUnionExcept :: CBMCExceptT e u v -> u (Either e v) Source #

UnionWithExcept (ExceptT e u v) u e v Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Solver

Methods

extractUnionExcept :: ExceptT e u v -> u (Either e v) Source #

solverSolveExcept Source #

Arguments

:: (UnionWithExcept t u e v, PlainUnion u, Functor u, Solver handle) 
=> handle

solver handle

-> (Either e v -> SymBool)

mapping the results to symbolic boolean formulas, the solver would try to find a model to make the formula true

-> t

the program to be solved, should be a union of exception and values

-> IO (Either SolvingFailure Model) 

Solver procedure for programs with error handling.

solveExcept Source #

Arguments

:: (UnionWithExcept t u e v, PlainUnion u, Functor u, ConfigurableSolver config handle) 
=> config

solver configuration

-> (Either e v -> SymBool)

mapping the results to symbolic boolean formulas, the solver would try to find a model to make the formula true

-> t

the program to be solved, should be a union of exception and values

-> IO (Either SolvingFailure Model) 

Solver procedure for programs with error handling.

>>> import Control.Monad.Except
>>> let x = "x" :: SymInteger
>>> :{
  res :: ExceptT AssertionError Union ()
  res = do
    symAssert $ x .> 0       -- constrain that x is positive
    symAssert $ x .< 2       -- constrain that x is less than 2
:}
>>> :{
  translate (Left _) = con False -- errors are not desirable
  translate _ = con True         -- non-errors are desirable
:}
>>> solveExcept z3 translate res
Right (Model {x -> 1 :: Integer})

solverSolveMultiExcept Source #

Arguments

:: (UnionWithExcept t u e v, PlainUnion u, Functor u, Solver handle) 
=> handle

solver configuration

-> Int

maximum number of models to return

-> (Either e v -> SymBool)

mapping the results to symbolic boolean formulas, the solver would try to find a model to make the formula true

-> t

the program to be solved, should be a union of exception and values

-> IO ([Model], SolvingFailure) 

Solver procedure for programs with error handling. Would return multiple models if possible.

solveMultiExcept Source #

Arguments

:: (UnionWithExcept t u e v, PlainUnion u, Functor u, ConfigurableSolver config handle) 
=> config

solver configuration

-> Int

maximum number of models to return

-> (Either e v -> SymBool)

mapping the results to symbolic boolean formulas, the solver would try to find a model to make the formula true

-> t

the program to be solved, should be a union of exception and values

-> IO ([Model], SolvingFailure) 

Solver procedure for programs with error handling. Would return multiple models if possible.

Generic Counter-example Guided Inductive Synthesis (CEGIS) interface

data VerifierResult cex exception Source #

The response from a verifier.

type SynthesisConstraintFun cex = cex -> IO SymBool Source #

Build the synthesizer constraint from the verfication result. The first argument will be guaranteed to be distinct during each invocation of the function in the CEGIS algorithm, so it can be used to instantiate the identifiers for fresh variables.

type VerifierFun cex exception = Model -> IO (VerifierResult cex exception) Source #

The verifier.

data CEGISResult exception Source #

The result of the CEGIS procedure.

Instances

Instances details
Show exception => Show (CEGISResult exception) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.CEGISSolver

Methods

showsPrec :: Int -> CEGISResult exception -> ShowS #

show :: CEGISResult exception -> String #

showList :: [CEGISResult exception] -> ShowS #

solverGenericCEGIS Source #

Arguments

:: Solver handle 
=> handle

Configuration of the solver.

-> Bool

Whether we should rerun the passed verifiers if any other verifier found a counter-example.

-> SymBool

The initial synthesis constraint.

-> SynthesisConstraintFun input

Synthesis constraint from counter-examples

-> [VerifierFun input exception]

The verifier functions.

-> IO ([input], CEGISResult exception) 

Generic CEGIS procedure. See genericCEGIS for more details.

The difference from genericCEGIS is that this function accepts a solver handle for the synthesizer, instead of a solver configuration.

solverGenericCEGISWithRefinement Source #

Arguments

:: Solver handle 
=> handle

Configuration of the solver.

-> Bool

Whether we should rerun the passed verifiers if any other verifier found a counter-example.

-> SymBool

The initial synthesis constraint.

-> SynthesisConstraintFun input

Synthesis constraint from counter-examples

-> Maybe RefinementConditionFun

Refinement condition generator.

-> [VerifierFun input exception]

The verifier functions.

-> IO ([input], CEGISResult exception) 

Generic CEGIS procedure with refinement. See genericCEGISWithRefinement for more details.

The difference from genericCEGISWithRefinement is that this function accepts a solver handle for the synthesizer, instead of a solver configuration.

genericCEGIS Source #

Arguments

:: ConfigurableSolver config handle 
=> config

Configuration of the solver.

-> Bool

Whether we should rerun the passed verifiers if any other verifier found a counter-example.

-> SymBool

The initial synthesis constraint.

-> SynthesisConstraintFun input

Synthesis constraint from counter-examples

-> [VerifierFun input exception]

The verifier functions.

-> IO ([input], CEGISResult exception) 

Generic CEGIS procedure.

The CEGIS procedure will try to find a model that satisfies the initial synthesis constraint, and satisfies all the inputs generated by the verifier.

genericCEGISWithRefinement Source #

Arguments

:: ConfigurableSolver config handle 
=> config

Configuration of the solver.

-> Bool

Whether we should rerun the passed verifiers if any other verifier found a counter-example.

-> SymBool

The initial synthesis constraint.

-> SynthesisConstraintFun input

Synthesis constraint from counter-examples

-> Maybe RefinementConditionFun

Refinement condition generator.

-> [VerifierFun input exception]

The verifier functions.

-> IO ([input], CEGISResult exception) 

Generic CEGIS procedure.

The CEGIS procedure will try to find a model that satisfies the initial synthesis constraint, and satisfies all the inputs generated by the verifier.

CEGIS interfaces with pre/post conditions

data CEGISCondition Source #

The condition for CEGIS to solve.

The first argument is the pre-condition, and the second argument is the post-condition.

The CEGIS procedures would try to find a model for the formula

\[ \forall P. (\exists I. \mathrm{pre}(P, I)) \wedge (\forall I. \mathrm{pre}(P, I)\implies \mathrm{post}(P, I)) \]

In program synthesis tasks, \(P\) is the symbolic constants in the symbolic program, and \(I\) is the input. The pre-condition is used to restrict the search space of the program. The procedure would only return programs that meets the pre-conditions on every possible inputs, and there are at least one possible input. The post-condition is used to specify the desired program behaviors.

solverCegisMultiInputs Source #

Arguments

:: (EvalSym input, ExtractSym input, Solver handle) 
=> handle 
-> handle 
-> [input]

Initial symbolic inputs. The solver will try to find a program that works on all the inputs representable by these inputs (see CEGISCondition).

-> (input -> CEGISCondition)

The condition for the solver to solve. All the symbolic constants that are not in the inputs will be considered as part of the symbolic program.

-> IO ([input], CEGISResult SolvingFailure)

The counter-examples generated during the CEGIS loop, and the model found by the solver.

CEGIS with multiple (possibly symbolic) inputs. See cegisMultiInputs for more details.

The difference from cegisMultiInputs is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegis Source #

Arguments

:: (Solver handle, EvalSym inputs, ExtractSym inputs, SymEq inputs) 
=> handle

The synthesizer solver handle

-> handle

The verifier solver handle

-> inputs

Initial symbolic inputs. The solver will try to find a program that works on all the inputs representable by it (see CEGISCondition).

-> (inputs -> CEGISCondition)

The condition for the solver to solve. All the symbolic constants that are not in the inputs will be considered as part of the symbolic program.

-> IO ([inputs], CEGISResult SolvingFailure)

The counter-examples generated during the CEGIS loop, and the model found by the solver.

CEGIS with a single symbolic input to represent a set of inputs. See cegis for more details.

The difference from cegis is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisExcept :: (UnionWithExcept t u e v, PlainUnion u, Functor u, EvalSym inputs, ExtractSym inputs, Solver handle, SymEq inputs) => handle -> handle -> inputs -> (Either e v -> CEGISCondition) -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using a single symbolic input to represent a set of inputs. See cegisExcept for more details.

The difference from cegisExcept is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisExceptStdVC :: (UnionWithExcept t u VerificationConditions (), PlainUnion u, Monad u, EvalSym inputs, ExtractSym inputs, Solver handle, SymEq inputs) => handle -> handle -> inputs -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using a single symbolic input to represent a set of inputs. See cegisExceptStdVC for more details.

The difference from cegisExceptStdVC is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisExceptVC :: (UnionWithExcept t u e v, PlainUnion u, Monad u, EvalSym inputs, ExtractSym inputs, Solver handle, SymEq inputs) => handle -> handle -> inputs -> (Either e v -> u (Either VerificationConditions ())) -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using a single symbolic input to represent a set of inputs.

The errors should be translated to assertion or assumption violations.

The difference from cegisExceptVC is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisExceptMultiInputs :: (Solver handle, EvalSym inputs, ExtractSym inputs, UnionWithExcept t u e v, PlainUnion u, Monad u) => handle -> handle -> [inputs] -> (Either e v -> CEGISCondition) -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using multiple (possibly symbolic) inputs to represent a set of inputs.

The difference from cegisExceptMultiInputs is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisExceptStdVCMultiInputs :: (Solver handle, EvalSym inputs, ExtractSym inputs, UnionWithExcept t u VerificationConditions (), PlainUnion u, Monad u) => handle -> handle -> [inputs] -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using multiple (possibly symbolic) inputs to represent a set of inputs. See cegisExceptStdVCMultiInputs for more details.

The difference from cegisExceptStdVCMultiInputs is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisExceptVCMultiInputs :: (Solver handle, EvalSym inputs, ExtractSym inputs, UnionWithExcept t u e v, PlainUnion u, Monad u) => handle -> handle -> [inputs] -> (Either e v -> u (Either VerificationConditions ())) -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using multiple (possibly symbolic) inputs to represent a set of inputs.

The errors should be translated to assertion or assumption violations.

The difference from cegisExceptVCMultiInputs is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisForAll Source #

Arguments

:: (ExtractSym forallInput, Solver handle) 
=> handle 
-> handle 
-> forallInput

A symbolic value. All the symbolic constants in the value are treated as for-all variables.

-> CEGISCondition 
-> IO ([Model], CEGISResult SolvingFailure)

First output are the counter-examples for all the for-all variables, and the second output is the model for all other variables if CEGIS succeeds.

CEGIS with a single symbolic input to represent a set of inputs. See cegisForAll for more details.

The difference from cegisForAll is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisForAllExcept :: (UnionWithExcept t u e v, PlainUnion u, Functor u, EvalSym inputs, ExtractSym inputs, Solver handle, SymEq inputs) => handle -> handle -> inputs -> (Either e v -> CEGISCondition) -> t -> IO ([Model], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, with a forall variable.

See cegisForAllExcept, cegisForAll and cegisExcept.

The difference from cegisForAllExcept is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisForAllExceptStdVC :: (UnionWithExcept t u VerificationConditions (), PlainUnion u, Monad u, EvalSym inputs, ExtractSym inputs, Solver handle, SymEq inputs) => handle -> handle -> inputs -> t -> IO ([Model], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, with a forall variable.

See cegisForAllExceptStdVC cegisForAll and cegisExceptStdVC.

The difference from cegisForAllExceptStdVC is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

solverCegisForAllExceptVC :: (UnionWithExcept t u e v, PlainUnion u, Monad u, EvalSym inputs, ExtractSym inputs, Solver handle, SymEq inputs) => handle -> handle -> inputs -> (Either e v -> u (Either VerificationConditions ())) -> t -> IO ([Model], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, with a forall variable.

See cegisForAllExceptVC cegisForAll and cegisExceptVC.

The difference from cegisForAllExceptVC is that this function accepts two solver handles, one for the synthesizer and one for the verifier.

The synthesizer solver will **not** be reset, while the verifier solver will be reset after each iteration.

cegisPostCond :: SymBool -> CEGISCondition Source #

Construct a CEGIS condition with only a post-condition. The pre-condition would be set to true, meaning that all programs in the program space are allowed.

cegisPrePost :: SymBool -> SymBool -> CEGISCondition Source #

Construct a CEGIS condition with both pre- and post-conditions.

cegisMultiInputs Source #

Arguments

:: (EvalSym input, ExtractSym input, ConfigurableSolver config handle) 
=> config

The configuration of the solver

-> [input]

Initial symbolic inputs. The solver will try to find a program that works on all the inputs representable by these inputs (see CEGISCondition).

-> (input -> CEGISCondition)

The condition for the solver to solve. All the symbolic constants that are not in the inputs will be considered as part of the symbolic program.

-> IO ([input], CEGISResult SolvingFailure)

The counter-examples generated during the CEGIS loop, and the model found by the solver.

CEGIS with multiple (possibly symbolic) inputs. Solves the following formula (see CEGISCondition for details).

\[ \forall P. (\exists I\in\mathrm{inputs}. \mathrm{pre}(P, I)) \wedge (\forall I\in\mathrm{inputs}. \mathrm{pre}(P, I)\implies \mathrm{post}(P, I)) \]

For simpler queries, where the inputs are representable by a single symbolic value, you may want to use cegis or cegisExcept instead. We have an example for the cegis call.

cegis Source #

Arguments

:: (ConfigurableSolver config handle, EvalSym inputs, ExtractSym inputs, SymEq inputs) 
=> config

The configuration of the solver

-> inputs

Initial symbolic inputs. The solver will try to find a program that works on all the inputs representable by it (see CEGISCondition).

-> (inputs -> CEGISCondition)

The condition for the solver to solve. All the symbolic constants that are not in the inputs will be considered as part of the symbolic program.

-> IO ([inputs], CEGISResult SolvingFailure)

The counter-examples generated during the CEGIS loop, and the model found by the solver.

CEGIS with a single symbolic input to represent a set of inputs.

The following example tries to find the value of c such that for all positive x, x * c && c -2. The c .> -2 clause is used to make the solution unique.

>>> let [x,c] = ["x","c"] :: [SymInteger]
>>> cegis z3 x (\x -> cegisPrePost (x .> 0) (x * c .< 0 .&& c .> -2))
(...,CEGISSuccess (Model {c -> -1 :: Integer}))

cegisExcept :: (UnionWithExcept t u e v, PlainUnion u, Functor u, EvalSym inputs, ExtractSym inputs, ConfigurableSolver config handle, SymEq inputs) => config -> inputs -> (Either e v -> CEGISCondition) -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using a single symbolic input to represent a set of inputs.

cegisExcept is particularly useful when custom error types are used. With cegisExcept, you define how the errors are interpreted to the CEGIS conditions after the symbolic evaluation. This could increase the readability and modularity of the code.

The following example tries to find the value of c such that for all positive x, x * c && c -2. The c .> -2 assertion is used to make the solution unique.

>>> let [x,c] = ["x","c"] :: [SymInteger]
>>> import Control.Monad.Except
>>> :{
  res :: SymInteger -> ExceptT VerificationConditions Union ()
  res x = do
    symAssume $ x .> 0
    symAssert $ x * c .< 0
    symAssert $ c .> -2
:}
>>> :{
  translation (Left AssumptionViolation) = cegisPrePost (con False) (con True)
  translation (Left AssertionViolation) = cegisPostCond (con False)
  translation _ = cegisPostCond (con True)
:}
>>> cegisExcept z3 x translation res
([...],CEGISSuccess (Model {c -> -1 :: Integer}))

cegisExceptStdVC :: (UnionWithExcept t u VerificationConditions (), PlainUnion u, Monad u, EvalSym inputs, ExtractSym inputs, ConfigurableSolver config handle, SymEq inputs) => config -> inputs -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using a single symbolic input to represent a set of inputs. This function saves the efforts to implement the translation function for the standard error type VerificationConditions, and the standard result type ().

This function translates assumption violations to failed pre-conditions, and translates assertion violations to failed post-conditions. The () result will not fail any conditions.

The following example tries to find the value of c such that for all positive x, x * c && c -2. The c .> -2 assertion is used to make the solution unique.

>>> let [x,c] = ["x","c"] :: [SymInteger]
>>> import Control.Monad.Except
>>> :{
  res :: SymInteger -> ExceptT VerificationConditions Union ()
  res x = do
    symAssume $ x .> 0
    symAssert $ x * c .< 0
    symAssert $ c .> -2
:}
>>> cegisExceptStdVC z3 x res
([...],CEGISSuccess (Model {c -> -1 :: Integer}))

cegisExceptVC :: (UnionWithExcept t u e v, PlainUnion u, Monad u, EvalSym inputs, ExtractSym inputs, ConfigurableSolver config handle, SymEq inputs) => config -> inputs -> (Either e v -> u (Either VerificationConditions ())) -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using a single symbolic input to represent a set of inputs.

The errors should be translated to assertion or assumption violations.

cegisExceptMultiInputs :: (ConfigurableSolver config handle, EvalSym inputs, ExtractSym inputs, UnionWithExcept t u e v, PlainUnion u, Monad u) => config -> [inputs] -> (Either e v -> CEGISCondition) -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using multiple (possibly symbolic) inputs to represent a set of inputs.

cegisExceptStdVCMultiInputs :: (ConfigurableSolver config handle, EvalSym inputs, ExtractSym inputs, UnionWithExcept t u VerificationConditions (), PlainUnion u, Monad u) => config -> [inputs] -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using multiple (possibly symbolic) inputs to represent a set of inputs. This function saves the efforts to implement the translation function for the standard error type VerificationConditions, and the standard result type ().

This function translates assumption violations to failed pre-conditions, and translates assertion violations to failed post-conditions. The () result will not fail any conditions.

cegisExceptVCMultiInputs :: (ConfigurableSolver config handle, EvalSym inputs, ExtractSym inputs, UnionWithExcept t u e v, PlainUnion u, Monad u) => config -> [inputs] -> (Either e v -> u (Either VerificationConditions ())) -> (inputs -> t) -> IO ([inputs], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, using multiple (possibly symbolic) inputs to represent a set of inputs.

The errors should be translated to assertion or assumption violations.

cegisForAll Source #

Arguments

:: (ExtractSym forallInput, ConfigurableSolver config handle) 
=> config 
-> forallInput

A symbolic value. All the symbolic constants in the value are treated as for-all variables.

-> CEGISCondition 
-> IO ([Model], CEGISResult SolvingFailure)

First output are the counter-examples for all the for-all variables, and the second output is the model for all other variables if CEGIS succeeds.

CEGIS with a single symbolic input to represent a set of inputs.

The following example tries to find the value of c such that for all positive x, x * c && c -2. The c .> -2 clause is used to make the solution unique.

>>> let [x,c] = ["x","c"] :: [SymInteger]
>>> cegisForAll z3 x $ cegisPrePost (x .> 0) (x * c .< 0 .&& c .> -2)
(...,CEGISSuccess (Model {c -> -1 :: Integer}))

cegisForAllExcept :: (UnionWithExcept t u e v, PlainUnion u, Functor u, EvalSym inputs, ExtractSym inputs, ConfigurableSolver config handle, SymEq inputs) => config -> inputs -> (Either e v -> CEGISCondition) -> t -> IO ([Model], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, with a forall variable.

See cegisForAll and cegisExcept.

cegisForAllExceptStdVC :: (UnionWithExcept t u VerificationConditions (), PlainUnion u, Monad u, EvalSym inputs, ExtractSym inputs, ConfigurableSolver config handle, SymEq inputs) => config -> inputs -> t -> IO ([Model], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, with a forall variable.

See cegisForAll and cegisExceptStdVC.

cegisForAllExceptVC :: (UnionWithExcept t u e v, PlainUnion u, Monad u, EvalSym inputs, ExtractSym inputs, ConfigurableSolver config handle, SymEq inputs) => config -> inputs -> (Either e v -> u (Either VerificationConditions ())) -> t -> IO ([Model], CEGISResult SolvingFailure) Source #

CEGIS for symbolic programs with error handling, with a forall variable.

See cegisForAll and cegisExceptVC.

Substitutions for symbolic values given solver models

Symbolic constant extraction

class Monoid symbolSet => SymbolSetOps symbolSet (typedSymbol :: Type -> Type) | symbolSet -> typedSymbol where Source #

The operations on symbolic constant sets

Note that symbolic constants with different types are considered different.

>>> let aBool = "a" :: TypedAnySymbol Bool
>>> let bBool = "b" :: TypedAnySymbol Bool
>>> let cBool = "c" :: TypedAnySymbol Bool
>>> let aInteger = "a" :: TypedAnySymbol Integer
>>> emptySet :: AnySymbolSet
SymbolSet {}
>>> containsSymbol aBool (buildSymbolSet aBool :: AnySymbolSet)
True
>>> containsSymbol bBool (buildSymbolSet aBool :: AnySymbolSet)
False
>>> insertSymbol aBool (buildSymbolSet aBool :: AnySymbolSet)
SymbolSet {a :: Bool}
>>> insertSymbol aInteger (buildSymbolSet aBool :: AnySymbolSet)
SymbolSet {a :: Bool, a :: Integer}
>>> let abSet = buildSymbolSet (aBool, bBool) :: AnySymbolSet
>>> let acSet = buildSymbolSet (aBool, cBool) :: AnySymbolSet
>>> intersectionSet abSet acSet
SymbolSet {a :: Bool}
>>> unionSet abSet acSet
SymbolSet {a :: Bool, b :: Bool, c :: Bool}
>>> differenceSet abSet acSet
SymbolSet {b :: Bool}

Methods

emptySet :: symbolSet Source #

Construct an empty set

isEmptySet :: symbolSet -> Bool Source #

Check if the set is empty

containsSymbol :: forall a. typedSymbol a -> symbolSet -> Bool Source #

Check if the set contains the given symbol

insertSymbol :: forall a. typedSymbol a -> symbolSet -> symbolSet Source #

Insert a symbol into the set

intersectionSet :: symbolSet -> symbolSet -> symbolSet Source #

Set intersection

unionSet :: symbolSet -> symbolSet -> symbolSet Source #

Set union

differenceSet :: symbolSet -> symbolSet -> symbolSet Source #

Set difference

class SymbolSetOps symbolSet typedSymbol => SymbolSetRep rep symbolSet (typedSymbol :: Type -> Type) where Source #

A type class for building a symbolic constant set manually from a symbolic constant set representation

>>> buildSymbolSet ("a" :: TypedAnySymbol Bool, "b" :: TypedAnySymbol Bool) :: AnySymbolSet
SymbolSet {a :: Bool, b :: Bool}

Methods

buildSymbolSet :: rep -> symbolSet Source #

Build a symbolic constant set

Instances

Instances details
SymbolSetRep (SomeTypedSymbol knd) (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

SymbolSetRep [SomeTypedSymbol knd] (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

SymbolSetRep [TypedSymbol knd t] (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildSymbolSet :: [TypedSymbol knd t] -> SymbolSet knd Source #

SymbolSetRep (TypedSymbol knd t) (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

SymbolSetRep (TypedSymbol knd a, TypedSymbol knd b) (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildSymbolSet :: (TypedSymbol knd a, TypedSymbol knd b) -> SymbolSet knd Source #

SymbolSetRep (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c) (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildSymbolSet :: (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c) -> SymbolSet knd Source #

SymbolSetRep (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d) (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildSymbolSet :: (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d) -> SymbolSet knd Source #

SymbolSetRep (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d, TypedSymbol knd e) (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildSymbolSet :: (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d, TypedSymbol knd e) -> SymbolSet knd Source #

SymbolSetRep (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d, TypedSymbol knd e, TypedSymbol knd f) (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildSymbolSet :: (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d, TypedSymbol knd e, TypedSymbol knd f) -> SymbolSet knd Source #

SymbolSetRep (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d, TypedSymbol knd e, TypedSymbol knd f, TypedSymbol knd g) (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildSymbolSet :: (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d, TypedSymbol knd e, TypedSymbol knd f, TypedSymbol knd g) -> SymbolSet knd Source #

SymbolSetRep (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d, TypedSymbol knd e, TypedSymbol knd f, TypedSymbol knd g, TypedSymbol knd h) (SymbolSet knd) (TypedSymbol knd) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildSymbolSet :: (TypedSymbol knd a, TypedSymbol knd b, TypedSymbol knd c, TypedSymbol knd d, TypedSymbol knd e, TypedSymbol knd f, TypedSymbol knd g, TypedSymbol knd h) -> SymbolSet knd Source #

class ExtractSym a where Source #

Extracts all the symbols (symbolic constants) that are transitively contained in the given value.

>>> extractSym ("a" :: SymBool)
SymbolSet {a :: Bool}
>>> extractSym (mrgIf "a" (mrgReturn ["b"]) (mrgReturn ["c", "d"]) :: Union [SymBool])
SymbolSet {a :: Bool, b :: Bool, c :: Bool, d :: Bool}

Note 1: This type class can be derived for algebraic data types. You may need the DerivingVia and DerivingStrategies extensions.

data X = ... deriving Generic deriving ExtractSym via (Default X)

Minimal complete definition

extractSymMaybe

Instances

Instances details
ExtractSym All Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Any Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Ordering Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym AlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym NotRepresentableFPError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym SomeBVException Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

ExtractSym SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: () -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => () -> Maybe (SymbolSet knd) Source #

ExtractSym Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym a => ExtractSym (Identity a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym a => ExtractSym (First a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym a => ExtractSym (Last a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Last a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Last a -> Maybe (SymbolSet knd) Source #

ExtractSym a => ExtractSym (Down a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Down a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Down a -> Maybe (SymbolSet knd) Source #

ExtractSym a => ExtractSym (Dual a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Dual a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Dual a -> Maybe (SymbolSet knd) Source #

ExtractSym a => ExtractSym (Product a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym a => ExtractSym (Sum a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Sum a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Sum a -> Maybe (SymbolSet knd) Source #

ExtractSym p => ExtractSym (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Par1 p -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Par1 p -> Maybe (SymbolSet knd) Source #

(Generic a, GExtractSym Arity0 (Rep a)) => ExtractSym (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym a => ExtractSym (Union a) Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.Union

(KnownNat n, 1 <= n) => ExtractSym (IntN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: IntN n -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => IntN n -> Maybe (SymbolSet knd) Source #

(KnownNat n, 1 <= n) => ExtractSym (WordN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

(forall (n :: Nat). (KnownNat n, 1 <= n) => ExtractSym (bv n)) => ExtractSym (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

extractSym :: SomeBV bv -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => SomeBV bv -> Maybe (SymbolSet knd) Source #

(KnownNat n, 1 <= n) => ExtractSym (SymIntN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

(KnownNat n, 1 <= n) => ExtractSym (SymWordN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym a => ExtractSym (Maybe a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

ExtractSym a => ExtractSym [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: [a] -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => [a] -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b) => ExtractSym (Either a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Either a b -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Either a b -> Maybe (SymbolSet knd) Source #

ExtractSym (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: U1 p -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => U1 p -> Maybe (SymbolSet knd) Source #

ExtractSym (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: V1 p -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => V1 p -> Maybe (SymbolSet knd) Source #

(Generic1 f, GExtractSym Arity1 (Rep1 f), ExtractSym a) => ExtractSym (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

(ExtractSym a, ExtractSym b) => ExtractSym (CBMCEither a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.CBMCExcept

ValidFP eb sb => ExtractSym (FP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: FP eb sb -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => FP eb sb -> Maybe (SymbolSet knd) Source #

ExtractSym (SymType b) => ExtractSym (a --> b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a --> b) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a --> b) -> Maybe (SymbolSet knd) Source #

ValidFP eb fb => ExtractSym (SymFP eb fb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: SymFP eb fb -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => SymFP eb fb -> Maybe (SymbolSet knd) Source #

(SupportedPrim (ca --> cb), LinkedRep ca sa, LinkedRep cb sb) => ExtractSym (sa -~> sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (sa -~> sb) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (sa -~> sb) -> Maybe (SymbolSet knd) Source #

(SupportedPrim (ca =-> cb), LinkedRep ca sa, LinkedRep cb sb) => ExtractSym (sa =~> sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (sa =~> sb) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (sa =~> sb) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b) => ExtractSym (a =-> b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a =-> b) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a =-> b) -> Maybe (SymbolSet knd) Source #

(ExtractSym1 m, ExtractSym a) => ExtractSym (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: MaybeT m a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => MaybeT m a -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b) => ExtractSym (a, b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b) -> Maybe (SymbolSet knd) Source #

ExtractSym a => ExtractSym (Const a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Const a b -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Const a b -> Maybe (SymbolSet knd) Source #

ExtractSym (f a) => ExtractSym (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Ap f a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Ap f a -> Maybe (SymbolSet knd) Source #

ExtractSym (f a) => ExtractSym (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Alt f a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Alt f a -> Maybe (SymbolSet knd) Source #

ExtractSym (f p) => ExtractSym (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Rec1 f p -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Rec1 f p -> Maybe (SymbolSet knd) Source #

ExtractSym (m (CBMCEither e a)) => ExtractSym (CBMCExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.CBMCExcept

(ExtractSym1 m, ExtractSym e, ExtractSym a) => ExtractSym (ExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: ExceptT e m a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => ExceptT e m a -> Maybe (SymbolSet knd) Source #

(ExtractSym1 m, ExtractSym a) => ExtractSym (IdentityT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

(ExtractSym1 m, ExtractSym w, ExtractSym a) => ExtractSym (WriterT w m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: WriterT w m a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => WriterT w m a -> Maybe (SymbolSet knd) Source #

(ExtractSym1 m, ExtractSym w, ExtractSym a) => ExtractSym (WriterT w m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: WriterT w m a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => WriterT w m a -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c) => ExtractSym (a, b, c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c) -> Maybe (SymbolSet knd) Source #

(ExtractSym (l a), ExtractSym (r a)) => ExtractSym (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Product l r a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Product l r a -> Maybe (SymbolSet knd) Source #

(ExtractSym (l a), ExtractSym (r a)) => ExtractSym (Sum l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Sum l r a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Sum l r a -> Maybe (SymbolSet knd) Source #

(ExtractSym (f p), ExtractSym (g p)) => ExtractSym ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (f :*: g) p -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (f :*: g) p -> Maybe (SymbolSet knd) Source #

(ExtractSym (f p), ExtractSym (g p)) => ExtractSym ((f :+: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (f :+: g) p -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (f :+: g) p -> Maybe (SymbolSet knd) Source #

ExtractSym c => ExtractSym (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: K1 i c p -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => K1 i c p -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d) => ExtractSym (a, b, c, d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d) -> Maybe (SymbolSet knd) Source #

ExtractSym (f (g a)) => ExtractSym (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: Compose f g a -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => Compose f g a -> Maybe (SymbolSet knd) Source #

ExtractSym (f (g p)) => ExtractSym ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (f :.: g) p -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (f :.: g) p -> Maybe (SymbolSet knd) Source #

ExtractSym (f p) => ExtractSym (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: M1 i c f p -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => M1 i c f p -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e) => ExtractSym (a, b, c, d, e) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f) => ExtractSym (a, b, c, d, e, f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g) => ExtractSym (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f, g) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f, g) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h) => ExtractSym (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f, g, h) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f, g, h) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i) => ExtractSym (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f, g, h, i) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f, g, h, i) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j) => ExtractSym (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f, g, h, i, j) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f, g, h, i, j) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j, ExtractSym k) => ExtractSym (a, b, c, d, e, f, g, h, i, j, k) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f, g, h, i, j, k) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f, g, h, i, j, k) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j, ExtractSym k, ExtractSym l) => ExtractSym (a, b, c, d, e, f, g, h, i, j, k, l) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f, g, h, i, j, k, l) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f, g, h, i, j, k, l) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j, ExtractSym k, ExtractSym l, ExtractSym m) => ExtractSym (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j, ExtractSym k, ExtractSym l, ExtractSym m, ExtractSym n) => ExtractSym (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j, ExtractSym k, ExtractSym l, ExtractSym m, ExtractSym n, ExtractSym o) => ExtractSym (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

extractSym :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> AnySymbolSet Source #

extractSymMaybe :: forall (knd :: SymbolKind). IsSymbolKind knd => (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Maybe (SymbolSet knd) Source #

class (forall a. ExtractSym a => ExtractSym (f a)) => ExtractSym1 f where Source #

Lifting of ExtractSym to unary type constructors.

Methods

liftExtractSymMaybe :: IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> f a -> Maybe (SymbolSet knd) Source #

Lifts the extractSymMaybe function to unary type constructors.

Instances

Instances details
ExtractSym1 Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Identity a -> Maybe (SymbolSet knd) Source #

ExtractSym1 First Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> First a -> Maybe (SymbolSet knd) Source #

ExtractSym1 Last Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Last a -> Maybe (SymbolSet knd) Source #

ExtractSym1 Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Down a -> Maybe (SymbolSet knd) Source #

ExtractSym1 Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Dual a -> Maybe (SymbolSet knd) Source #

ExtractSym1 Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Product a -> Maybe (SymbolSet knd) Source #

ExtractSym1 Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Sum a -> Maybe (SymbolSet knd) Source #

ExtractSym1 Union Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.Union

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Union a -> Maybe (SymbolSet knd) Source #

ExtractSym1 Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Maybe a -> Maybe (SymbolSet knd) Source #

ExtractSym1 List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> [a] -> Maybe (SymbolSet knd) Source #

ExtractSym a => ExtractSym1 (Either a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> Either a a0 -> Maybe (SymbolSet knd) Source #

(Generic1 f, GExtractSym Arity1 (Rep1 f)) => ExtractSym1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Default1 f a -> Maybe (SymbolSet knd) Source #

ExtractSym1 m => ExtractSym1 (MaybeT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> MaybeT m a -> Maybe (SymbolSet knd) Source #

ExtractSym a => ExtractSym1 ((,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, a0) -> Maybe (SymbolSet knd) Source #

ExtractSym a => ExtractSym1 (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> Const a a0 -> Maybe (SymbolSet knd) Source #

ExtractSym1 f => ExtractSym1 (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Ap f a -> Maybe (SymbolSet knd) Source #

ExtractSym1 f => ExtractSym1 (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Alt f a -> Maybe (SymbolSet knd) Source #

(ExtractSym1 m, ExtractSym e) => ExtractSym1 (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> ExceptT e m a -> Maybe (SymbolSet knd) Source #

ExtractSym1 m => ExtractSym1 (IdentityT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> IdentityT m a -> Maybe (SymbolSet knd) Source #

(ExtractSym1 m, ExtractSym w) => ExtractSym1 (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> WriterT w m a -> Maybe (SymbolSet knd) Source #

(ExtractSym1 m, ExtractSym w) => ExtractSym1 (WriterT w m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> WriterT w m a -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b) => ExtractSym1 ((,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym1 l, ExtractSym1 r) => ExtractSym1 (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Product l r a -> Maybe (SymbolSet knd) Source #

(ExtractSym1 l, ExtractSym1 r) => ExtractSym1 (Sum l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Sum l r a -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c) => ExtractSym1 ((,,,) a b c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym1 f, ExtractSym1 g) => ExtractSym1 (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Compose f g a -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d) => ExtractSym1 ((,,,,) a b c d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e) => ExtractSym1 ((,,,,,) a b c d e) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f) => ExtractSym1 ((,,,,,,) a b c d e f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, f, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g) => ExtractSym1 ((,,,,,,,) a b c d e f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, f, g, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h) => ExtractSym1 ((,,,,,,,,) a b c d e f g h) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, f, g, h, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i) => ExtractSym1 ((,,,,,,,,,) a b c d e f g h i) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, f, g, h, i, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j) => ExtractSym1 ((,,,,,,,,,,) a b c d e f g h i j) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, f, g, h, i, j, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j, ExtractSym k) => ExtractSym1 ((,,,,,,,,,,,) a b c d e f g h i j k) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, f, g, h, i, j, k, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j, ExtractSym k, ExtractSym l) => ExtractSym1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j, ExtractSym k, ExtractSym l, ExtractSym m) => ExtractSym1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b, ExtractSym c, ExtractSym d, ExtractSym e, ExtractSym f, ExtractSym g, ExtractSym h, ExtractSym i, ExtractSym j, ExtractSym k, ExtractSym l, ExtractSym m, ExtractSym n) => ExtractSym1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> Maybe (SymbolSet knd) Source #

extractSym1 :: (ExtractSym1 f, ExtractSym a, IsSymbolKind knd) => f a -> SymbolSet knd Source #

Lift the standard extractSym to unary type constructors.

extractSymMaybe1 :: (ExtractSym1 f, ExtractSym a, IsSymbolKind knd) => f a -> Maybe (SymbolSet knd) Source #

Lift the standard extractSymMaybe to unary type constructors.

class (forall a. ExtractSym a => ExtractSym1 (f a)) => ExtractSym2 f where Source #

Lifting of ExtractSym to binary type constructors.

Methods

liftExtractSymMaybe2 :: IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> (b -> Maybe (SymbolSet knd)) -> f a b -> Maybe (SymbolSet knd) Source #

Lifts the extractSymMaybe function to binary type constructors.

Instances

Instances details
ExtractSym2 Either Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe2 :: forall (knd :: SymbolKind) a b. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> (b -> Maybe (SymbolSet knd)) -> Either a b -> Maybe (SymbolSet knd) Source #

ExtractSym2 (,) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe2 :: forall (knd :: SymbolKind) a b. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> (b -> Maybe (SymbolSet knd)) -> (a, b) -> Maybe (SymbolSet knd) Source #

ExtractSym a => ExtractSym2 ((,,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe2 :: forall (knd :: SymbolKind) a0 b. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (b -> Maybe (SymbolSet knd)) -> (a, a0, b) -> Maybe (SymbolSet knd) Source #

(ExtractSym a, ExtractSym b) => ExtractSym2 ((,,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe2 :: forall (knd :: SymbolKind) a0 b0. IsSymbolKind knd => (a0 -> Maybe (SymbolSet knd)) -> (b0 -> Maybe (SymbolSet knd)) -> (a, b, a0, b0) -> Maybe (SymbolSet knd) Source #

extractSym2 :: (ExtractSym2 f, ExtractSym a, ExtractSym b, IsSymbolKind knd) => f a b -> SymbolSet knd Source #

Lift the standard extractSym to binary type constructors.

extractSymMaybe2 :: (ExtractSym2 f, ExtractSym a, ExtractSym b, IsSymbolKind knd) => f a b -> Maybe (SymbolSet knd) Source #

Lift the standard extractSymMaybe to binary type constructors.

Evaluation with a model

When given a satisfiable formula, a solver can return a model that specifies the concrete assignments of the variables in the formula to make the formula true. We can use this model to evaluate some symbolic values by substituting the symbolic constants with the concrete assignments.

class SymbolSetOps symbolSet typedSymbol => ModelOps model symbolSet typedSymbol | model -> symbolSet typedSymbol where Source #

The operations on Models.

Note that symbolic constants with different types are considered different.

>>> let aBool = "a" :: TypedAnySymbol Bool
>>> let bBool = "b" :: TypedAnySymbol Bool
>>> let cBool = "c" :: TypedAnySymbol Bool
>>> let aInteger = "a" :: TypedAnySymbol Integer
>>> emptyModel :: Model
Model {}
>>> valueOf aBool (buildModel (aBool ::= True) :: Model)
Just True
>>> valueOf bBool (buildModel (aBool ::= True) :: Model)
Nothing
>>> insertValue bBool False (buildModel (aBool ::= True) :: Model)
Model {a -> True :: Bool, b -> False :: Bool}
>>> let abModel = buildModel (aBool ::= True, bBool ::= False) :: Model
>>> let acSet = buildSymbolSet (aBool, cBool) :: AnySymbolSet
>>> exceptFor acSet abModel
Model {b -> False :: Bool}
>>> restrictTo acSet abModel
Model {a -> True :: Bool}
>>> extendTo acSet abModel
Model {a -> True :: Bool, b -> False :: Bool, c -> False :: Bool}
>>> exact acSet abModel
Model {a -> True :: Bool, c -> False :: Bool}

Methods

emptyModel :: model Source #

Construct an empty model

isEmptyModel :: model -> Bool Source #

Check if the model is empty

modelContains :: typedSymbol a -> model -> Bool Source #

Check if the model contains the given symbol

valueOf :: typedSymbol t -> model -> Maybe t Source #

Extract the assigned value for a given symbolic constant

insertValue :: typedSymbol t -> t -> model -> model Source #

Insert an assignment into the model

exceptFor :: symbolSet -> model -> model Source #

Returns a model that removed all the assignments for the symbolic constants in the set

exceptFor' :: typedSymbol t -> model -> model Source #

Returns a model that removed the assignments for the symbolic constants

restrictTo :: symbolSet -> model -> model Source #

Returns a model that only keeps the assignments for the symbolic constants in the set

extendTo :: symbolSet -> model -> model Source #

Returns a model that extends the assignments for the symbolic constants in the set by assigning default values to them

exact :: symbolSet -> model -> model Source #

Returns a model that contains the assignments for exactly the symbolic constants in the set by removing assignments for the symbolic constants that are not in the set and add assignments for the missing symbolic constants by assigning default values to them.

class ModelRep rep model | rep -> model where Source #

A type class for building a model manually from a model representation

Methods

buildModel :: rep -> model Source #

Build a model

>>> let aBool = "a" :: TypedAnySymbol Bool
>>> let bBool = "b" :: TypedAnySymbol Bool
>>> buildModel (aBool ::= True, bBool ::= False) :: Model
Model {a -> True :: Bool, b -> False :: Bool}

Instances

Instances details
ModelRep (ModelValuePair t) Model Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

ModelRep (ModelSymPair ct st) Model Source # 
Instance details

Defined in Grisette.Internal.SymPrim.ModelRep

Methods

buildModel :: ModelSymPair ct st -> Model Source #

(ModelRep a Model, ModelRep b Model) => ModelRep (a, b) Model Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildModel :: (a, b) -> Model Source #

(ModelRep a Model, ModelRep b Model, ModelRep c Model) => ModelRep (a, b, c) Model Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildModel :: (a, b, c) -> Model Source #

(ModelRep a Model, ModelRep b Model, ModelRep c Model, ModelRep d Model) => ModelRep (a, b, c, d) Model Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildModel :: (a, b, c, d) -> Model Source #

(ModelRep a Model, ModelRep b Model, ModelRep c Model, ModelRep d Model, ModelRep e Model) => ModelRep (a, b, c, d, e) Model Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildModel :: (a, b, c, d, e) -> Model Source #

(ModelRep a Model, ModelRep b Model, ModelRep c Model, ModelRep d Model, ModelRep e Model, ModelRep f Model) => ModelRep (a, b, c, d, e, f) Model Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildModel :: (a, b, c, d, e, f) -> Model Source #

(ModelRep a Model, ModelRep b Model, ModelRep c Model, ModelRep d Model, ModelRep e Model, ModelRep f Model, ModelRep g Model) => ModelRep (a, b, c, d, e, f, g) Model Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildModel :: (a, b, c, d, e, f, g) -> Model Source #

(ModelRep a Model, ModelRep b Model, ModelRep c Model, ModelRep d Model, ModelRep e Model, ModelRep f Model, ModelRep g Model, ModelRep h Model) => ModelRep (a, b, c, d, e, f, g, h) Model Source # 
Instance details

Defined in Grisette.Internal.SymPrim.Prim.Model

Methods

buildModel :: (a, b, c, d, e, f, g, h) -> Model Source #

class EvalSym a where Source #

Evaluating symbolic values with some model. This would substitute the symbols (symbolic constants) with the values in the model.

>>> let model = insertValue "a" (1 :: Integer) emptyModel :: Model
>>> evalSym False model ([ssym "a", ssym "b"] :: [SymInteger])
[1,b]

If we set the first argument true, the missing symbols will be filled in with some default values:

>>> evalSym True model ([ssym "a", ssym "b"] :: [SymInteger])
[1,0]

Note 1: This type class can be derived for algebraic data types. You may need the DerivingVia and DerivingStrategies extensions.

data X = ... deriving Generic deriving EvalSym via (Default X)

Methods

evalSym :: Bool -> Model -> a -> a Source #

Evaluate a symbolic value with some model, possibly fill in values for the missing symbols.

Instances

Instances details
EvalSym All Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> All -> All Source #

EvalSym Any Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Any -> Any Source #

EvalSym Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Int16 -> Int16 Source #

EvalSym Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Int32 -> Int32 Source #

EvalSym Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Int64 -> Int64 Source #

EvalSym Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Int8 -> Int8 Source #

EvalSym Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Word16 -> Word16 Source #

EvalSym Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Word32 -> Word32 Source #

EvalSym Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Word64 -> Word64 Source #

EvalSym Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Word8 -> Word8 Source #

EvalSym ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

EvalSym Ordering Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

EvalSym AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

EvalSym VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

EvalSym CEGISCondition Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.CEGISSolver

EvalSym AlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> AlgReal -> AlgReal Source #

EvalSym FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

EvalSym NotRepresentableFPError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

EvalSym SomeBVException Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

EvalSym SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

EvalSym SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> SymBool -> SymBool Source #

EvalSym SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

EvalSym SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

EvalSym Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Text -> Text Source #

EvalSym Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Integer -> Integer Source #

EvalSym () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> () -> () Source #

EvalSym Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Bool -> Bool Source #

EvalSym Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Char -> Char Source #

EvalSym Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Double -> Double Source #

EvalSym Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Float -> Float Source #

EvalSym Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Int -> Int Source #

EvalSym Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Word -> Word Source #

EvalSym a => EvalSym (Identity a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Identity a -> Identity a Source #

EvalSym a => EvalSym (First a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> First a -> First a Source #

EvalSym a => EvalSym (Last a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Last a -> Last a Source #

EvalSym a => EvalSym (Down a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Down a -> Down a Source #

EvalSym a => EvalSym (Dual a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Dual a -> Dual a Source #

EvalSym a => EvalSym (Product a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Product a -> Product a Source #

EvalSym a => EvalSym (Sum a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Sum a -> Sum a Source #

EvalSym p => EvalSym (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Par1 p -> Par1 p Source #

(Generic a, GEvalSym Arity0 (Rep a)) => EvalSym (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Default a -> Default a Source #

EvalSym a => EvalSym (Union a) Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.Union

Methods

evalSym :: Bool -> Model -> Union a -> Union a Source #

(KnownNat n, 1 <= n) => EvalSym (IntN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> IntN n -> IntN n Source #

(KnownNat n, 1 <= n) => EvalSym (WordN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> WordN n -> WordN n Source #

(forall (n :: Nat). (KnownNat n, 1 <= n) => EvalSym (bv n)) => EvalSym (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

evalSym :: Bool -> Model -> SomeBV bv -> SomeBV bv Source #

(KnownNat n, 1 <= n) => EvalSym (SymIntN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> SymIntN n -> SymIntN n Source #

(KnownNat n, 1 <= n) => EvalSym (SymWordN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> SymWordN n -> SymWordN n Source #

EvalSym a => EvalSym (Maybe a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Maybe a -> Maybe a Source #

EvalSym a => EvalSym [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> [a] -> [a] Source #

(EvalSym a, EvalSym b) => EvalSym (Either a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Either a b -> Either a b Source #

EvalSym (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> U1 p -> U1 p Source #

EvalSym (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> V1 p -> V1 p Source #

(Generic1 f, GEvalSym Arity1 (Rep1 f), EvalSym a) => EvalSym (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Default1 f a -> Default1 f a Source #

(EvalSym a, EvalSym b) => EvalSym (CBMCEither a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.CBMCExcept

Methods

evalSym :: Bool -> Model -> CBMCEither a b -> CBMCEither a b Source #

ValidFP eb fb => EvalSym (FP eb fb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> FP eb fb -> FP eb fb Source #

EvalSym (SymType b) => EvalSym (a --> b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a --> b) -> a --> b Source #

ValidFP eb sb => EvalSym (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> SymFP eb sb -> SymFP eb sb Source #

(SupportedPrim (ca --> cb), LinkedRep ca sa, LinkedRep cb sb) => EvalSym (sa -~> sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (sa -~> sb) -> sa -~> sb Source #

(SupportedPrim (ca =-> cb), LinkedRep ca sa, LinkedRep cb sb) => EvalSym (sa =~> sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (sa =~> sb) -> sa =~> sb Source #

(EvalSym a, EvalSym b) => EvalSym (a =-> b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a =-> b) -> a =-> b Source #

(EvalSym1 m, EvalSym a) => EvalSym (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> MaybeT m a -> MaybeT m a Source #

(EvalSym a, EvalSym b) => EvalSym (a, b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b) -> (a, b) Source #

EvalSym a => EvalSym (Const a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Const a b -> Const a b Source #

EvalSym (f a) => EvalSym (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Ap f a -> Ap f a Source #

EvalSym (f a) => EvalSym (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Alt f a -> Alt f a Source #

EvalSym (f p) => EvalSym (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Rec1 f p -> Rec1 f p Source #

EvalSym (m (CBMCEither e a)) => EvalSym (CBMCExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.CBMCExcept

Methods

evalSym :: Bool -> Model -> CBMCExceptT e m a -> CBMCExceptT e m a Source #

(EvalSym1 m, EvalSym e, EvalSym a) => EvalSym (ExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> ExceptT e m a -> ExceptT e m a Source #

(EvalSym1 m, EvalSym a) => EvalSym (IdentityT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> IdentityT m a -> IdentityT m a Source #

(EvalSym1 m, EvalSym s, EvalSym a) => EvalSym (WriterT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> WriterT s m a -> WriterT s m a Source #

(EvalSym1 m, EvalSym s, EvalSym a) => EvalSym (WriterT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> WriterT s m a -> WriterT s m a Source #

(EvalSym a, EvalSym b, EvalSym c) => EvalSym (a, b, c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c) -> (a, b, c) Source #

(EvalSym (l a), EvalSym (r a)) => EvalSym (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Product l r a -> Product l r a Source #

(EvalSym (l a), EvalSym (r a)) => EvalSym (Sum l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Sum l r a -> Sum l r a Source #

(EvalSym (f p), EvalSym (g p)) => EvalSym ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (f :*: g) p -> (f :*: g) p Source #

(EvalSym (f p), EvalSym (g p)) => EvalSym ((f :+: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (f :+: g) p -> (f :+: g) p Source #

EvalSym c => EvalSym (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> K1 i c p -> K1 i c p Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d) => EvalSym (a, b, c, d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d) -> (a, b, c, d) Source #

EvalSym (f (g a)) => EvalSym (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Compose f g a -> Compose f g a Source #

EvalSym (f (g p)) => EvalSym ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (f :.: g) p -> (f :.: g) p Source #

EvalSym (f p) => EvalSym (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> M1 i c f p -> M1 i c f p Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e) => EvalSym (a, b, c, d, e) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f) => EvalSym (a, b, c, d, e, f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g) => EvalSym (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h) => EvalSym (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i) => EvalSym (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j) => EvalSym (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j, EvalSym k) => EvalSym (a, b, c, d, e, f, g, h, i, j, k) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j, EvalSym k, EvalSym l) => EvalSym (a, b, c, d, e, f, g, h, i, j, k, l) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j, EvalSym k, EvalSym l, EvalSym m) => EvalSym (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j, EvalSym k, EvalSym l, EvalSym m, EvalSym n) => EvalSym (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j, EvalSym k, EvalSym l, EvalSym m, EvalSym n, EvalSym o) => EvalSym (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

evalSymToCon :: (ToCon a b, EvalSym a) => Model -> a -> b Source #

Evaluate a symbolic value with some model, fill in values for the missing symbols, and convert the result to a concrete value.

>>> let model = insertValue "a" (1 :: Integer) emptyModel :: Model
>>> evalSymToCon model ([ssym "a", ssym "b"] :: [SymInteger]) :: [Integer]
[1,0]

class (forall a. EvalSym a => EvalSym (f a)) => EvalSym1 f where Source #

Lifting of EvalSym to unary type constructors.

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> f a -> f a Source #

Lift the evalSym function to unary type constructors.

Instances

Instances details
EvalSym1 Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Identity a -> Identity a Source #

EvalSym1 First Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> First a -> First a Source #

EvalSym1 Last Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Last a -> Last a Source #

EvalSym1 Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Down a -> Down a Source #

EvalSym1 Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Dual a -> Dual a Source #

EvalSym1 Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Product a -> Product a Source #

EvalSym1 Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Sum a -> Sum a Source #

EvalSym1 Union Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.Union

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Union a -> Union a Source #

EvalSym1 Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Maybe a -> Maybe a Source #

EvalSym1 List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> [a] -> [a] Source #

EvalSym a => EvalSym1 (Either a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> Either a a0 -> Either a a0 Source #

(Generic1 f, GEvalSym Arity1 (Rep1 f)) => EvalSym1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Default1 f a -> Default1 f a Source #

EvalSym1 m => EvalSym1 (MaybeT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> MaybeT m a -> MaybeT m a Source #

EvalSym a => EvalSym1 ((,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, a0) -> (a, a0) Source #

EvalSym a => EvalSym1 (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> Const a a0 -> Const a a0 Source #

EvalSym1 f => EvalSym1 (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Ap f a -> Ap f a Source #

EvalSym1 f => EvalSym1 (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Alt f a -> Alt f a Source #

(EvalSym1 m, EvalSym e) => EvalSym1 (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> ExceptT e m a -> ExceptT e m a Source #

EvalSym1 m => EvalSym1 (IdentityT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> IdentityT m a -> IdentityT m a Source #

(EvalSym1 m, EvalSym s) => EvalSym1 (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> WriterT s m a -> WriterT s m a Source #

(EvalSym1 m, EvalSym s) => EvalSym1 (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> WriterT s m a -> WriterT s m a Source #

(EvalSym a, EvalSym b) => EvalSym1 ((,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, a0) -> (a, b, a0) Source #

(EvalSym1 l, EvalSym1 r) => EvalSym1 (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Product l r a -> Product l r a Source #

(EvalSym1 l, EvalSym1 r) => EvalSym1 (Sum l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Sum l r a -> Sum l r a Source #

(EvalSym a, EvalSym b, EvalSym c) => EvalSym1 ((,,,) a b c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, a0) -> (a, b, c, a0) Source #

(EvalSym1 f, EvalSym1 g) => EvalSym1 (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Compose f g a -> Compose f g a Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d) => EvalSym1 ((,,,,) a b c d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, a0) -> (a, b, c, d, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e) => EvalSym1 ((,,,,,) a b c d e) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, a0) -> (a, b, c, d, e, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f) => EvalSym1 ((,,,,,,) a b c d e f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g) => EvalSym1 ((,,,,,,,) a b c d e f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, f, g, a0) -> (a, b, c, d, e, f, g, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h) => EvalSym1 ((,,,,,,,,) a b c d e f g h) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, f, g, h, a0) -> (a, b, c, d, e, f, g, h, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i) => EvalSym1 ((,,,,,,,,,) a b c d e f g h i) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, f, g, h, i, a0) -> (a, b, c, d, e, f, g, h, i, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j) => EvalSym1 ((,,,,,,,,,,) a b c d e f g h i j) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, a0) -> (a, b, c, d, e, f, g, h, i, j, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j, EvalSym k) => EvalSym1 ((,,,,,,,,,,,) a b c d e f g h i j k) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, k, a0) -> (a, b, c, d, e, f, g, h, i, j, k, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j, EvalSym k, EvalSym l) => EvalSym1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j, EvalSym k, EvalSym l, EvalSym m) => EvalSym1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) Source #

(EvalSym a, EvalSym b, EvalSym c, EvalSym d, EvalSym e, EvalSym f, EvalSym g, EvalSym h, EvalSym i, EvalSym j, EvalSym k, EvalSym l, EvalSym m, EvalSym n) => EvalSym1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a0 -> a0) -> Bool -> Model -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) Source #

evalSym1 :: (EvalSym1 f, EvalSym a) => Bool -> Model -> f a -> f a Source #

Lifting the standard evalSym to unary type constructors.

evalSymToCon1 :: (EvalSym1 f, EvalSym a, ToCon1 f g, ToCon a b) => Model -> f a -> g b Source #

Evaluate and convert to concrete values with lifted standard evalSym for unary type constructors. See evalSymToCon.

class (forall a. EvalSym a => EvalSym1 (f a)) => EvalSym2 f where Source #

Lifting of EvalSym1 to binary type constructors.

Methods

liftEvalSym2 :: (Bool -> Model -> a -> a) -> (Bool -> Model -> b -> b) -> Bool -> Model -> f a b -> f a b Source #

Lift the evalSym function to binary type constructors.

Instances

Instances details
EvalSym2 Either Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym2 :: (Bool -> Model -> a -> a) -> (Bool -> Model -> b -> b) -> Bool -> Model -> Either a b -> Either a b Source #

EvalSym2 (,) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym2 :: (Bool -> Model -> a -> a) -> (Bool -> Model -> b -> b) -> Bool -> Model -> (a, b) -> (a, b) Source #

EvalSym a => EvalSym2 ((,,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym2 :: (Bool -> Model -> a0 -> a0) -> (Bool -> Model -> b -> b) -> Bool -> Model -> (a, a0, b) -> (a, a0, b) Source #

(EvalSym a, EvalSym b) => EvalSym2 ((,,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym2 :: (Bool -> Model -> a0 -> a0) -> (Bool -> Model -> b0 -> b0) -> Bool -> Model -> (a, b, a0, b0) -> (a, b, a0, b0) Source #

evalSym2 :: (EvalSym2 f, EvalSym a, EvalSym b) => Bool -> Model -> f a b -> f a b Source #

Lifting the standard evalSym to binary type constructors.

evalSymToCon2 :: (EvalSym2 f, EvalSym a, EvalSym c, ToCon2 f g, ToCon a b, ToCon c d) => Model -> f a c -> g b d Source #

Evaluate and convert to concrete values with lifted standard evalSym for binary type constructors. See evalSymToCon.

Substitution of a symbol

class SubstSym a where Source #

Substitution of symbols (symbolic constants) to a symbolic value.

>>> a = "a" :: TypedAnySymbol Bool
>>> v = "x" .&& "y" :: SymBool
>>> substSym a v (["a" .&& "b", "a"] :: [SymBool])
[(&& (&& x y) b),(&& x y)]

Note 1: This type class can be derived for algebraic data types. You may need the DerivingVia and DerivingStrategies extensions.

data X = ... deriving Generic deriving SubstSym via (Default X)

Methods

substSym :: (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> a -> a Source #

Instances

Instances details
SubstSym All Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> All -> All Source #

SubstSym Any Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Any -> Any Source #

SubstSym Int16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Int16 -> Int16 Source #

SubstSym Int32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Int32 -> Int32 Source #

SubstSym Int64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Int64 -> Int64 Source #

SubstSym Int8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Int8 -> Int8 Source #

SubstSym Word16 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Word16 -> Word16 Source #

SubstSym Word32 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Word32 -> Word32 Source #

SubstSym Word64 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Word64 -> Word64 Source #

SubstSym Word8 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Word8 -> Word8 Source #

SubstSym ByteString Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> ByteString -> ByteString Source #

SubstSym Ordering Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Ordering -> Ordering Source #

SubstSym AssertionError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> AssertionError -> AssertionError Source #

SubstSym VerificationConditions Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> VerificationConditions -> VerificationConditions Source #

SubstSym AlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> AlgReal -> AlgReal Source #

SubstSym FPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> FPRoundingMode -> FPRoundingMode Source #

SubstSym NotRepresentableFPError Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> NotRepresentableFPError -> NotRepresentableFPError Source #

SubstSym SomeBVException Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> SomeBVException -> SomeBVException Source #

SubstSym SymAlgReal Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> SymAlgReal -> SymAlgReal Source #

SubstSym SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> SymBool -> SymBool Source #

SubstSym SymFPRoundingMode Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> SymFPRoundingMode -> SymFPRoundingMode Source #

SubstSym SymInteger Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> SymInteger -> SymInteger Source #

SubstSym Text Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Text -> Text Source #

SubstSym Integer Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Integer -> Integer Source #

SubstSym () Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> () -> () Source #

SubstSym Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Bool -> Bool Source #

SubstSym Char Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Char -> Char Source #

SubstSym Double Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Double -> Double Source #

SubstSym Float Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Float -> Float Source #

SubstSym Int Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Int -> Int Source #

SubstSym Word Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Word -> Word Source #

SubstSym a => SubstSym (Identity a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Identity a -> Identity a Source #

SubstSym a => SubstSym (First a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> First a -> First a Source #

SubstSym a => SubstSym (Last a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Last a -> Last a Source #

SubstSym a => SubstSym (Down a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Down a -> Down a Source #

SubstSym a => SubstSym (Dual a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Dual a -> Dual a Source #

SubstSym a => SubstSym (Product a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Product a -> Product a Source #

SubstSym a => SubstSym (Sum a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Sum a -> Sum a Source #

SubstSym p => SubstSym (Par1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Par1 p -> Par1 p Source #

(Generic a, GSubstSym Arity0 (Rep a)) => SubstSym (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Default a -> Default a Source #

SubstSym a => SubstSym (Union a) Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.Union

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Union a -> Union a Source #

(KnownNat n, 1 <= n) => SubstSym (IntN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> IntN n -> IntN n Source #

(KnownNat n, 1 <= n) => SubstSym (WordN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> WordN n -> WordN n Source #

(forall (n :: Nat). (KnownNat n, 1 <= n) => SubstSym (bv n)) => SubstSym (SomeBV bv) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.SomeBV

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> SomeBV bv -> SomeBV bv Source #

(KnownNat n, 1 <= n) => SubstSym (SymIntN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> SymIntN n -> SymIntN n Source #

(KnownNat n, 1 <= n) => SubstSym (SymWordN n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> SymWordN n -> SymWordN n Source #

SubstSym a => SubstSym (Maybe a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Maybe a -> Maybe a Source #

SubstSym a => SubstSym [a] Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> [a] -> [a] Source #

(SubstSym a, SubstSym b) => SubstSym (Either a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Either a b -> Either a b Source #

SubstSym (U1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> U1 p -> U1 p Source #

SubstSym (V1 p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> V1 p -> V1 p Source #

(Generic1 f, GSubstSym Arity1 (Rep1 f), SubstSym a) => SubstSym (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Default1 f a -> Default1 f a Source #

ValidFP eb sb => SubstSym (FP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb0 (knd :: SymbolKind). (LinkedRep cb sb0, IsSymbolKind knd) => TypedSymbol knd cb -> sb0 -> FP eb sb -> FP eb sb Source #

ValidFP eb sb => SubstSym (SymFP eb sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb0 (knd :: SymbolKind). (LinkedRep cb sb0, IsSymbolKind knd) => TypedSymbol knd cb -> sb0 -> SymFP eb sb -> SymFP eb sb Source #

(SupportedPrim (ca --> cb), LinkedRep ca sa, LinkedRep cb sb) => SubstSym (sa -~> sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb0 (knd :: SymbolKind). (LinkedRep cb sb0, IsSymbolKind knd) => TypedSymbol knd cb -> sb0 -> (sa -~> sb) -> sa -~> sb Source #

(SupportedPrim (ca =-> cb), LinkedRep ca sa, LinkedRep cb sb) => SubstSym (sa =~> sb) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb0 (knd :: SymbolKind). (LinkedRep cb sb0, IsSymbolKind knd) => TypedSymbol knd cb -> sb0 -> (sa =~> sb) -> sa =~> sb Source #

(SubstSym1 m, SubstSym a) => SubstSym (MaybeT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> MaybeT m a -> MaybeT m a Source #

(SubstSym a, SubstSym b) => SubstSym (a, b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b) -> (a, b) Source #

SubstSym a => SubstSym (Const a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Const a b -> Const a b Source #

SubstSym (f a) => SubstSym (Ap f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Ap f a -> Ap f a Source #

SubstSym (f a) => SubstSym (Alt f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Alt f a -> Alt f a Source #

SubstSym (f p) => SubstSym (Rec1 f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Rec1 f p -> Rec1 f p Source #

(SubstSym1 m, SubstSym e, SubstSym a) => SubstSym (ExceptT e m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> ExceptT e m a -> ExceptT e m a Source #

(SubstSym1 m, SubstSym a) => SubstSym (IdentityT m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> IdentityT m a -> IdentityT m a Source #

(SubstSym1 m, SubstSym a, SubstSym s) => SubstSym (WriterT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> WriterT s m a -> WriterT s m a Source #

(SubstSym1 m, SubstSym a, SubstSym s) => SubstSym (WriterT s m a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> WriterT s m a -> WriterT s m a Source #

(SubstSym a, SubstSym b, SubstSym c) => SubstSym (a, b, c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c) -> (a, b, c) Source #

(SubstSym (l a), SubstSym (r a)) => SubstSym (Product l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Product l r a -> Product l r a Source #

(SubstSym (l a), SubstSym (r a)) => SubstSym (Sum l r a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Sum l r a -> Sum l r a Source #

(SubstSym (f p), SubstSym (g p)) => SubstSym ((f :*: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (f :*: g) p -> (f :*: g) p Source #

(SubstSym (f p), SubstSym (g p)) => SubstSym ((f :+: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (f :+: g) p -> (f :+: g) p Source #

SubstSym c => SubstSym (K1 i c p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> K1 i c p -> K1 i c p Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d) => SubstSym (a, b, c, d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d) -> (a, b, c, d) Source #

SubstSym (f (g a)) => SubstSym (Compose f g a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Compose f g a -> Compose f g a Source #

SubstSym (f (g p)) => SubstSym ((f :.: g) p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (f :.: g) p -> (f :.: g) p Source #

SubstSym (f p) => SubstSym (M1 i c f p) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> M1 i c f p -> M1 i c f p Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e) => SubstSym (a, b, c, d, e) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f) => SubstSym (a, b, c, d, e, f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g) => SubstSym (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h) => SubstSym (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i) => SubstSym (a, b, c, d, e, f, g, h, i) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j) => SubstSym (a, b, c, d, e, f, g, h, i, j) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j, SubstSym k) => SubstSym (a, b, c, d, e, f, g, h, i, j, k) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j, SubstSym k, SubstSym l) => SubstSym (a, b, c, d, e, f, g, h, i, j, k, l) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j, SubstSym k, SubstSym l, SubstSym m) => SubstSym (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j, SubstSym k, SubstSym l, SubstSym m, SubstSym n) => SubstSym (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j, SubstSym k, SubstSym l, SubstSym m, SubstSym n, SubstSym o) => SubstSym (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

class (forall a. SubstSym a => SubstSym (f a)) => SubstSym1 f where Source #

Lifting of SubstSym to unary type constructors.

Methods

liftSubstSym :: (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> f a -> f a Source #

Lift a symbol substitution function to unary type constructors.

Instances

Instances details
SubstSym1 Identity Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Identity a -> Identity a Source #

SubstSym1 First Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> First a -> First a Source #

SubstSym1 Last Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Last a -> Last a Source #

SubstSym1 Down Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Down a -> Down a Source #

SubstSym1 Dual Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Dual a -> Dual a Source #

SubstSym1 Product Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Product a -> Product a Source #

SubstSym1 Sum Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Sum a -> Sum a Source #

SubstSym1 Union Source # 
Instance details

Defined in Grisette.Internal.Core.Control.Monad.Union

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Union a -> Union a Source #

SubstSym1 Maybe Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Maybe a -> Maybe a Source #

SubstSym1 List Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> [a] -> [a] Source #

SubstSym a => SubstSym1 (Either a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> Either a a0 -> Either a a0 Source #

(Generic1 f, GSubstSym Arity1 (Rep1 f)) => SubstSym1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Default1 f a -> Default1 f a Source #

SubstSym1 m => SubstSym1 (MaybeT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> MaybeT m a -> MaybeT m a Source #

SubstSym a => SubstSym1 ((,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, a0) -> (a, a0) Source #

SubstSym a => SubstSym1 (Const a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> Const a a0 -> Const a a0 Source #

SubstSym1 f => SubstSym1 (Ap f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Ap f a -> Ap f a Source #

SubstSym1 f => SubstSym1 (Alt f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Alt f a -> Alt f a Source #

(SubstSym1 m, SubstSym e) => SubstSym1 (ExceptT e m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> ExceptT e m a -> ExceptT e m a Source #

SubstSym1 m => SubstSym1 (IdentityT m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> IdentityT m a -> IdentityT m a Source #

(SubstSym1 m, SubstSym s) => SubstSym1 (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> WriterT s m a -> WriterT s m a Source #

(SubstSym1 m, SubstSym s) => SubstSym1 (WriterT s m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> WriterT s m a -> WriterT s m a Source #

(SubstSym a, SubstSym b) => SubstSym1 ((,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, a0) -> (a, b, a0) Source #

(SubstSym1 l, SubstSym1 r) => SubstSym1 (Product l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Product l r a -> Product l r a Source #

(SubstSym1 l, SubstSym1 r) => SubstSym1 (Sum l r) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Sum l r a -> Sum l r a Source #

(SubstSym a, SubstSym b, SubstSym c) => SubstSym1 ((,,,) a b c) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, a0) -> (a, b, c, a0) Source #

(SubstSym1 f, SubstSym1 g) => SubstSym1 (Compose f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Compose f g a -> Compose f g a Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d) => SubstSym1 ((,,,,) a b c d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, a0) -> (a, b, c, d, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e) => SubstSym1 ((,,,,,) a b c d e) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, a0) -> (a, b, c, d, e, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f) => SubstSym1 ((,,,,,,) a b c d e f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g) => SubstSym1 ((,,,,,,,) a b c d e f g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, a0) -> (a, b, c, d, e, f, g, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h) => SubstSym1 ((,,,,,,,,) a b c d e f g h) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, a0) -> (a, b, c, d, e, f, g, h, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i) => SubstSym1 ((,,,,,,,,,) a b c d e f g h i) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, a0) -> (a, b, c, d, e, f, g, h, i, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j) => SubstSym1 ((,,,,,,,,,,) a b c d e f g h i j) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, a0) -> (a, b, c, d, e, f, g, h, i, j, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j, SubstSym k) => SubstSym1 ((,,,,,,,,,,,) a b c d e f g h i j k) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, k, a0) -> (a, b, c, d, e, f, g, h, i, j, k, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j, SubstSym k, SubstSym l) => SubstSym1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j, SubstSym k, SubstSym l, SubstSym m) => SubstSym1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) Source #

(SubstSym a, SubstSym b, SubstSym c, SubstSym d, SubstSym e, SubstSym f, SubstSym g, SubstSym h, SubstSym i, SubstSym j, SubstSym k, SubstSym l, SubstSym m, SubstSym n) => SubstSym1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> TypedSymbol knd cb -> sb -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) Source #

substSym1 :: (SubstSym1 f, SubstSym a, LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> f a -> f a Source #

Lifting the standard substSym to unary type constructors.

class (forall a. SubstSym a => SubstSym1 (f a)) => SubstSym2 f where Source #

Lifting of SubstSym to binary type constructors.

Methods

liftSubstSym2 :: (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> f a b -> f a b Source #

Lift a symbol substitution function to binary type constructors.

Instances

Instances details
SubstSym2 Either Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> Either a b -> Either a b Source #

SubstSym2 (,) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a, b) -> (a, b) Source #

SubstSym a => SubstSym2 ((,,) a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a0 b. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> (TypedSymbol knd cb -> sb -> b -> b) -> TypedSymbol knd cb -> sb -> (a, a0, b) -> (a, a0, b) Source #

(SubstSym a, SubstSym b) => SubstSym2 ((,,,) a b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym2 :: forall cb sb (knd :: SymbolKind) a0 b0. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a0 -> a0) -> (TypedSymbol knd cb -> sb -> b0 -> b0) -> TypedSymbol knd cb -> sb -> (a, b, a0, b0) -> (a, b, a0, b0) Source #

substSym2 :: (SubstSym2 f, SubstSym a, SubstSym b, LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> f a b -> f a b Source #

Lifting the standard substSym to binary type constructors.

Utilities

Memoization

htmemo :: (Eq k, Hashable k) => (k -> a) -> k -> a Source #

Function memoizer with mutable hash table.

htmemo2 :: (Eq k1, Hashable k1, Eq k2, Hashable k2) => (k1 -> k2 -> a) -> k1 -> k2 -> a Source #

Function memoizer with mutable hash table. Works on binary functions.

htmemo3 :: (Eq k1, Hashable k1, Eq k2, Hashable k2, Eq k3, Hashable k3) => (k1 -> k2 -> k3 -> a) -> k1 -> k2 -> k3 -> a Source #

Function memoizer with mutable hash table. Works on ternary functions.

htmup :: (Eq k, Hashable k) => (b -> c) -> (k -> b) -> k -> c Source #

Lift a memoizer to work with one more argument.

htmemoFix :: (Eq k, Hashable k) => ((k -> a) -> k -> a) -> k -> a Source #

Memoizing recursion. Use like fix.

Generic deriving of classes

Default wrappers

newtype Default a #

This newtype wrapper can be used to derive default instances for classes taking an argument of kind Type.

Constructors

Default 

Fields

Instances

Instances details
(Generic a, Generic b, GToCon Arity0 (Rep a) (Rep b)) => ToCon a (Default b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: a -> Maybe (Default b) Source #

(Generic a, Generic b, GToSym Arity0 (Rep a) (Rep b), GMergeable Arity0 (Rep b)) => ToSym a (Default b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: a -> Default b Source #

(Generic a, GEq a, Enum' (Rep a)) => GEnum (Default a)

The Enum class in base is slightly different; it comprises toEnum and fromEnum. Generics.Deriving.Enum provides functions toEnumDefault and fromEnumDefault.

Instance details

Defined in Generics.Deriving.Default

Methods

genum :: [Default a] #

(Generic a, GEq' (Rep a)) => GEq (Default a) 
Instance details

Defined in Generics.Deriving.Default

Methods

geq :: Default a -> Default a -> Bool #

(Generic a, GMonoid' (Rep a)) => GMonoid (Default a) 
Instance details

Defined in Generics.Deriving.Default

Methods

gmempty :: Default a #

gmappend :: Default a -> Default a -> Default a #

gmconcat :: [Default a] -> Default a #

(Generic a, GSemigroup' (Rep a)) => GSemigroup (Default a)

Semigroups often have many sensible implementations of <> / gsappend, and therefore no sensible default. Indeed, there is no GSemigroup' instance for representations of sum types.

In other cases, one may wish to use the existing wrapper newtypes in base, such as the following (using First):

newtype FirstSemigroup = FirstSemigroup Bool
  deriving stock (Eq, Show)
  deriving (GSemigroup) via (First Bool)
Instance details

Defined in Generics.Deriving.Default

Methods

gsappend :: Default a -> Default a -> Default a #

gstimes :: Integral b => b -> Default a -> Default a #

gsconcat :: NonEmpty (Default a) -> Default a #

(Generic a, GShow' (Rep a)) => GShow (Default a)

For example, with this type:

newtype TestShow = TestShow Bool
  deriving (GShow) via (Default Bool)

gshow for TestShow would produce the same string as gshow for Bool.

In this example, TestShow requires no Generic instance, as the constraint on gshowsPrec from Default Bool is Generic Bool.

In general, when using a newtype wrapper, the instance can be derived via the wrapped type, as here (via Default Bool rather than Default TestShow).

Instance details

Defined in Generics.Deriving.Default

(Generic a, Uniplate' (Rep a) a, Context' (Rep a) a) => Uniplate (Default a) 
Instance details

Defined in Generics.Deriving.Default

Methods

children :: Default a -> [Default a] #

context :: Default a -> [Default a] -> Default a #

descend :: (Default a -> Default a) -> Default a -> Default a #

descendM :: Monad m => (Default a -> m (Default a)) -> Default a -> m (Default a) #

transform :: (Default a -> Default a) -> Default a -> Default a #

transformM :: Monad m => (Default a -> m (Default a)) -> Default a -> m (Default a) #

(Generic a, GEvalSym Arity0 (Rep a)) => EvalSym (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Default a -> Default a Source #

(Generic a, GExtractSym Arity0 (Rep a)) => ExtractSym (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

(Generic a, GMergeable Arity0 (Rep a)) => Mergeable (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Generic a, GPPrint Arity0 (Rep a)) => PPrint (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Default a -> Doc ann Source #

pformatPrec :: Int -> Default a -> Doc ann Source #

pformatList :: [Default a] -> Doc ann Source #

(Generic a, GSimpleMergeable Arity0 (Rep a), GMergeable Arity0 (Rep a)) => SimpleMergeable (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Default a -> Default a -> Default a Source #

(Generic a, GSubstSym Arity0 (Rep a)) => SubstSym (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Default a -> Default a Source #

(Generic a, GSymEq Arity0 (Rep a)) => SymEq (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

(Generic a, GSymOrd Arity0 (Rep a), GSymEq Arity0 (Rep a)) => SymOrd (Default a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

(Generic a, GAllSyms Arity0 (Rep a)) => AllSyms (Default a) Source # 
Instance details

Defined in Grisette.Internal.SymPrim.AllSyms

newtype Default1 (f :: Type -> Type) a #

This newtype wrapper can be used to derive default instances for classes taking an argument of kind Type -> Type.

Constructors

Default1 

Fields

Instances

Instances details
(Generic1 f1, Generic1 f2, GToCon Arity1 (Rep1 f1) (Rep1 f2)) => ToCon1 f1 (Default1 f2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

liftToCon :: (a -> Maybe b) -> f1 a -> Maybe (Default1 f2 b) Source #

(Generic1 f1, Generic1 f2, GToSym Arity1 (Rep1 f1) (Rep1 f2), GMergeable Arity1 (Rep1 f2)) => ToSym1 f1 (Default1 f2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

liftToSym :: Mergeable b => (a -> b) -> f1 a -> Default1 f2 b Source #

(Generic1 f, GCopoint' (Rep1 f)) => GCopoint (Default1 f) 
Instance details

Defined in Generics.Deriving.Default

Methods

gcopoint :: Default1 f a -> a #

(Generic1 t, GFoldable' (Rep1 t)) => GFoldable (Default1 t) 
Instance details

Defined in Generics.Deriving.Default

Methods

gfoldMap :: Monoid m => (a -> m) -> Default1 t a -> m #

gfold :: Monoid m => Default1 t m -> m #

gfoldr :: (a -> b -> b) -> b -> Default1 t a -> b #

gfoldr' :: (a -> b -> b) -> b -> Default1 t a -> b #

gfoldl :: (a -> b -> a) -> a -> Default1 t b -> a #

gfoldl' :: (a -> b -> a) -> a -> Default1 t b -> a #

gfoldr1 :: (a -> a -> a) -> Default1 t a -> a #

gfoldl1 :: (a -> a -> a) -> Default1 t a -> a #

(Generic1 f, GFunctor' (Rep1 f)) => GFunctor (Default1 f) 
Instance details

Defined in Generics.Deriving.Default

Methods

gmap :: (a -> b) -> Default1 f a -> Default1 f b #

(Generic1 t, GFunctor' (Rep1 t), GFoldable' (Rep1 t), GTraversable' (Rep1 t)) => GTraversable (Default1 t) 
Instance details

Defined in Generics.Deriving.Default

Methods

gtraverse :: Applicative f => (a -> f b) -> Default1 t a -> f (Default1 t b) #

gsequenceA :: Applicative f => Default1 t (f a) -> f (Default1 t a) #

gmapM :: Monad m => (a -> m b) -> Default1 t a -> m (Default1 t b) #

gsequence :: Monad m => Default1 t (m a) -> m (Default1 t a) #

(Generic1 f, GEvalSym Arity1 (Rep1 f)) => EvalSym1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

liftEvalSym :: (Bool -> Model -> a -> a) -> Bool -> Model -> Default1 f a -> Default1 f a Source #

(Generic1 f, GExtractSym Arity1 (Rep1 f)) => ExtractSym1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

liftExtractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => (a -> Maybe (SymbolSet knd)) -> Default1 f a -> Maybe (SymbolSet knd) Source #

(Generic1 f, GMergeable Arity1 (Rep1 f)) => Mergeable1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Generic1 f, GPPrint Arity1 (Rep1 f)) => PPrint1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

liftPFormatPrec :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> Default1 f a -> Doc ann Source #

liftPFormatList :: (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [Default1 f a] -> Doc ann Source #

(Generic1 f, GSimpleMergeable Arity1 (Rep1 f), GMergeable Arity1 (Rep1 f)) => SimpleMergeable1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

liftMrgIte :: (SymBool -> a -> a -> a) -> SymBool -> Default1 f a -> Default1 f a -> Default1 f a Source #

(Generic1 f, GSubstSym Arity1 (Rep1 f)) => SubstSym1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

liftSubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> Default1 f a -> Default1 f a Source #

(Generic1 f, GSymEq Arity1 (Rep1 f)) => SymEq1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

liftSymEq :: (a -> b -> SymBool) -> Default1 f a -> Default1 f b -> SymBool Source #

(Generic1 f, GSymOrd Arity1 (Rep1 f), GSymEq Arity1 (Rep1 f)) => SymOrd1 (Default1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

liftSymCompare :: (a -> b -> Union Ordering) -> Default1 f a -> Default1 f b -> Union Ordering 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 #

(Generic1 f1, Generic1 f2, GToCon Arity1 (Rep1 f1) (Rep1 f2), ToCon a b) => ToCon (f1 a) (Default1 f2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

toCon :: f1 a -> Maybe (Default1 f2 b) Source #

(Generic1 f1, Generic1 f2, GToSym Arity1 (Rep1 f1) (Rep1 f2), ToSym a b, GMergeable Arity1 (Rep1 f2)) => ToSym (f1 a) (Default1 f2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

toSym :: f1 a -> Default1 f2 b Source #

(Generic1 f, GEvalSym Arity1 (Rep1 f), EvalSym a) => EvalSym (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

evalSym :: Bool -> Model -> Default1 f a -> Default1 f a Source #

(Generic1 f, GExtractSym Arity1 (Rep1 f), ExtractSym a) => ExtractSym (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

(Generic1 f, GMergeable Arity1 (Rep1 f), Mergeable a) => Mergeable (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(Generic1 f, GPPrint Arity1 (Rep1 f), PPrint a) => PPrint (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

pformat :: Default1 f a -> Doc ann Source #

pformatPrec :: Int -> Default1 f a -> Doc ann Source #

pformatList :: [Default1 f a] -> Doc ann Source #

(Generic1 f, GSimpleMergeable Arity1 (Rep1 f), GMergeable Arity1 (Rep1 f), SimpleMergeable a) => SimpleMergeable (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

mrgIte :: SymBool -> Default1 f a -> Default1 f a -> Default1 f a Source #

(Generic1 f, GSubstSym Arity1 (Rep1 f), SubstSym a) => SubstSym (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

substSym :: forall cb sb (knd :: SymbolKind). (LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> Default1 f a -> Default1 f a Source #

(Generic1 f, GSymEq Arity1 (Rep1 f), SymEq a) => SymEq (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

(Generic1 f, GSymOrd Arity1 (Rep1 f), GSymEq Arity1 (Rep1 f), SymOrd a) => SymOrd (Default1 f a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

(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 #

SymEq

data family SymEqArgs arity a b :: Type Source #

The arguments to the generic equality function.

Instances

Instances details
data SymEqArgs Arity0 _ _1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

newtype SymEqArgs Arity1 a b Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

newtype SymEqArgs Arity1 a b = SymEqArgs1 (a -> b -> SymBool)

class GSymEq arity f where Source #

The class of types that can be generically compared for symbolic equality.

Methods

gsymEq :: SymEqArgs arity a b -> f a -> f b -> SymBool Source #

Instances

Instances details
GSymEq Arity1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

gsymEq :: SymEqArgs Arity1 a b -> Par1 a -> Par1 b -> SymBool Source #

GSymEq arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

gsymEq :: SymEqArgs arity a b -> U1 a -> U1 b -> SymBool Source #

GSymEq arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

gsymEq :: SymEqArgs arity a b -> V1 a -> V1 b -> SymBool Source #

SymEq1 f => GSymEq Arity1 (Rec1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

gsymEq :: SymEqArgs Arity1 a b -> Rec1 f a -> Rec1 f b -> SymBool Source #

(GSymEq arity a, GSymEq arity b) => GSymEq arity (a :*: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

gsymEq :: SymEqArgs arity a0 b0 -> (a :*: b) a0 -> (a :*: b) b0 -> SymBool Source #

(GSymEq arity a, GSymEq arity b) => GSymEq arity (a :+: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

gsymEq :: SymEqArgs arity a0 b0 -> (a :+: b) a0 -> (a :+: b) b0 -> SymBool Source #

SymEq a => GSymEq arity (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

gsymEq :: SymEqArgs arity a0 b -> K1 i a a0 -> K1 i a b -> SymBool Source #

(SymEq1 f, GSymEq Arity1 g) => GSymEq Arity1 (f :.: g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

gsymEq :: SymEqArgs Arity1 a b -> (f :.: g) a -> (f :.: g) b -> SymBool Source #

GSymEq arity a => GSymEq arity (M1 i c a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymEq

Methods

gsymEq :: SymEqArgs arity a0 b -> M1 i c a a0 -> M1 i c a b -> SymBool Source #

genericSymEq :: (Generic a, GSymEq Arity0 (Rep a)) => a -> a -> SymBool Source #

Generic (.==) function.

genericLiftSymEq :: (Generic1 f, GSymEq Arity1 (Rep1 f)) => (a -> b -> SymBool) -> f a -> f b -> SymBool Source #

Generic liftSymEq function.

SymOrd

data family SymOrdArgs arity a b :: Type Source #

The arguments to the generic comparison function.

Instances

Instances details
data SymOrdArgs Arity0 _ _1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

newtype SymOrdArgs Arity1 a b Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

newtype SymOrdArgs Arity1 a b = SymOrdArgs1 (a -> b -> Union Ordering)

class GSymOrd arity f where Source #

The class of types that can be generically symbolically compared.

Methods

gsymCompare :: SymOrdArgs arity a b -> f a -> f b -> Union Ordering Source #

Instances

Instances details
GSymOrd Arity1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

GSymOrd arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

gsymCompare :: SymOrdArgs arity a b -> U1 a -> U1 b -> Union Ordering Source #

GSymOrd arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

gsymCompare :: SymOrdArgs arity a b -> V1 a -> V1 b -> Union Ordering Source #

SymOrd1 f => GSymOrd Arity1 (Rec1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

gsymCompare :: SymOrdArgs Arity1 a b -> Rec1 f a -> Rec1 f b -> Union Ordering Source #

(GSymOrd arity a, GSymOrd arity b) => GSymOrd arity (a :*: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

gsymCompare :: SymOrdArgs arity a0 b0 -> (a :*: b) a0 -> (a :*: b) b0 -> Union Ordering Source #

(GSymOrd arity a, GSymOrd arity b) => GSymOrd arity (a :+: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

gsymCompare :: SymOrdArgs arity a0 b0 -> (a :+: b) a0 -> (a :+: b) b0 -> Union Ordering Source #

SymOrd a => GSymOrd arity (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

gsymCompare :: SymOrdArgs arity a0 b -> K1 i a a0 -> K1 i a b -> Union Ordering Source #

(SymOrd1 f, GSymOrd Arity1 g) => GSymOrd Arity1 (f :.: g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

gsymCompare :: SymOrdArgs Arity1 a b -> (f :.: g) a -> (f :.: g) b -> Union Ordering Source #

GSymOrd arity a => GSymOrd arity (M1 i c a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SymOrd

Methods

gsymCompare :: SymOrdArgs arity a0 b -> M1 i c a a0 -> M1 i c a b -> Union Ordering Source #

genericSymCompare :: (Generic a, GSymOrd Arity0 (Rep a)) => a -> a -> Union Ordering Source #

Generic symCompare function.

genericLiftSymCompare :: (Generic1 f, GSymOrd Arity1 (Rep1 f)) => (a -> b -> Union Ordering) -> f a -> f b -> Union Ordering Source #

Generic liftSymCompare function.

Mergeable

data family MergeableArgs arity a :: Type Source #

The arguments to the generic merging strategy function.

class GMergeable arity f where Source #

The class of types that can be generically merged.

Instances

Instances details
GMergeable Arity1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

GMergeable arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

GMergeable arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Mergeable1 f => GMergeable Arity1 (Rec1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

(GMergeable arity a, GMergeable arity b) => GMergeable arity (a :*: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

grootStrategy :: MergeableArgs arity a0 -> MergingStrategy ((a :*: b) a0) Source #

(GMergeable arity a, GMergeable arity b) => GMergeable arity (a :+: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

grootStrategy :: MergeableArgs arity a0 -> MergingStrategy ((a :+: b) a0) Source #

Mergeable c => GMergeable arity (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

grootStrategy :: MergeableArgs arity a -> MergingStrategy (K1 i c a) Source #

(Mergeable1 f, GMergeable Arity1 g) => GMergeable Arity1 (f :.: g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

GMergeable arity a => GMergeable arity (M1 i c a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.Mergeable

Methods

grootStrategy :: MergeableArgs arity a0 -> MergingStrategy (M1 i c a a0) Source #

SimpleMergeable

data family SimpleMergeableArgs arity a :: Type Source #

The arguments to the generic simple merging function.

class GSimpleMergeable arity f where Source #

Generic SimpleMergeable class.

Methods

gmrgIte :: SimpleMergeableArgs arity a -> SymBool -> f a -> f a -> f a Source #

Instances

Instances details
GSimpleMergeable Arity1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

GSimpleMergeable arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

gmrgIte :: SimpleMergeableArgs arity a -> SymBool -> U1 a -> U1 a -> U1 a Source #

GSimpleMergeable arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

gmrgIte :: SimpleMergeableArgs arity a -> SymBool -> V1 a -> V1 a -> V1 a Source #

SimpleMergeable1 f => GSimpleMergeable Arity1 (Rec1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

gmrgIte :: SimpleMergeableArgs Arity1 a -> SymBool -> Rec1 f a -> Rec1 f a -> Rec1 f a Source #

(GSimpleMergeable arity a, GSimpleMergeable arity b) => GSimpleMergeable arity (a :*: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

gmrgIte :: SimpleMergeableArgs arity a0 -> SymBool -> (a :*: b) a0 -> (a :*: b) a0 -> (a :*: b) a0 Source #

SimpleMergeable c => GSimpleMergeable arity (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

gmrgIte :: SimpleMergeableArgs arity a -> SymBool -> K1 i c a -> K1 i c a -> K1 i c a Source #

(SimpleMergeable1 f, GSimpleMergeable Arity1 g) => GSimpleMergeable Arity1 (f :.: g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

gmrgIte :: SimpleMergeableArgs Arity1 a -> SymBool -> (f :.: g) a -> (f :.: g) a -> (f :.: g) a Source #

GSimpleMergeable arity a => GSimpleMergeable arity (M1 i c a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SimpleMergeable

Methods

gmrgIte :: SimpleMergeableArgs arity a0 -> SymBool -> M1 i c a a0 -> M1 i c a a0 -> M1 i c a a0 Source #

genericMrgIte :: (Generic a, GSimpleMergeable Arity0 (Rep a)) => SymBool -> a -> a -> a Source #

Generic mrgIte function.

genericLiftMrgIte :: (Generic1 f, GSimpleMergeable Arity1 (Rep1 f)) => (SymBool -> a -> a -> a) -> SymBool -> f a -> f a -> f a Source #

Generic liftMrgIte function.

ToCon

data family ToConArgs arity a b :: Type Source #

The arguments to the generic toCon function.

Instances

Instances details
data ToConArgs Arity0 _ _1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

newtype ToConArgs Arity1 a b Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

newtype ToConArgs Arity1 a b = ToConArgs1 (a -> Maybe b)

class GToCon arity f1 f2 where Source #

The class of types that can be generically converted to concrete values.

Methods

gtoCon :: ToConArgs arity a b -> f1 a -> Maybe (f2 b) Source #

Instances

Instances details
GToCon Arity1 Par1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

gtoCon :: ToConArgs Arity1 a b -> Par1 a -> Maybe (Par1 b) Source #

GToCon arity (U1 :: Type -> Type) (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

gtoCon :: ToConArgs arity a b -> U1 a -> Maybe (U1 b) Source #

GToCon arity (V1 :: Type -> Type) (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

gtoCon :: ToConArgs arity a b -> V1 a -> Maybe (V1 b) Source #

ToCon1 f1 f2 => GToCon Arity1 (Rec1 f1) (Rec1 f2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

gtoCon :: ToConArgs Arity1 a b -> Rec1 f1 a -> Maybe (Rec1 f2 b) Source #

(GToCon arity a b, GToCon arity c d) => GToCon arity (a :*: c) (b :*: d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

gtoCon :: ToConArgs arity a0 b0 -> (a :*: c) a0 -> Maybe ((b :*: d) b0) Source #

(GToCon arity a b, GToCon arity c d) => GToCon arity (a :+: c) (b :+: d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

gtoCon :: ToConArgs arity a0 b0 -> (a :+: c) a0 -> Maybe ((b :+: d) b0) Source #

ToCon a b => GToCon arity (K1 i a :: Type -> Type) (K1 i b :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

gtoCon :: ToConArgs arity a0 b0 -> K1 i a a0 -> Maybe (K1 i b b0) Source #

(ToCon1 f1 f2, GToCon Arity1 g1 g2) => GToCon Arity1 (f1 :.: g1) (f2 :.: g2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

gtoCon :: ToConArgs Arity1 a b -> (f1 :.: g1) a -> Maybe ((f2 :.: g2) b) Source #

GToCon arity a b => GToCon arity (M1 i c1 a) (M1 i c2 b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToCon

Methods

gtoCon :: ToConArgs arity a0 b0 -> M1 i c1 a a0 -> Maybe (M1 i c2 b b0) Source #

genericToCon :: (Generic a, Generic b, GToCon Arity0 (Rep a) (Rep b)) => a -> Maybe b Source #

Generic toCon function.

genericLiftToCon :: (Generic1 f1, Generic1 f2, GToCon Arity1 (Rep1 f1) (Rep1 f2)) => (a -> Maybe b) -> f1 a -> Maybe (f2 b) Source #

Generic liftToCon function.

ToSym

data family ToSymArgs arity a b :: Type Source #

The arguments to the generic toSym function.

Instances

Instances details
data ToSymArgs Arity0 _ _1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

data ToSymArgs Arity1 _ _1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

data ToSymArgs Arity1 _ _1 where

class GToSym arity f1 f2 where Source #

The class of types that can be generically converted to symbolic values.

Methods

gtoSym :: ToSymArgs arity a b -> f1 a -> f2 b Source #

Instances

Instances details
GToSym Arity1 Par1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

gtoSym :: ToSymArgs Arity1 a b -> Par1 a -> Par1 b Source #

GToSym arity (U1 :: Type -> Type) (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

gtoSym :: ToSymArgs arity a b -> U1 a -> U1 b Source #

GToSym arity (V1 :: Type -> Type) (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

gtoSym :: ToSymArgs arity a b -> V1 a -> V1 b Source #

ToSym1 f1 f2 => GToSym Arity1 (Rec1 f1) (Rec1 f2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

gtoSym :: ToSymArgs Arity1 a b -> Rec1 f1 a -> Rec1 f2 b Source #

(GToSym arity a b, GToSym arity c d) => GToSym arity (a :*: c) (b :*: d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

gtoSym :: ToSymArgs arity a0 b0 -> (a :*: c) a0 -> (b :*: d) b0 Source #

(GToSym arity a b, GToSym arity c d) => GToSym arity (a :+: c) (b :+: d) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

gtoSym :: ToSymArgs arity a0 b0 -> (a :+: c) a0 -> (b :+: d) b0 Source #

ToSym a b => GToSym arity (K1 i a :: Type -> Type) (K1 i b :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

gtoSym :: ToSymArgs arity a0 b0 -> K1 i a a0 -> K1 i b b0 Source #

(ToSym1 f1 f2, GToSym Arity1 g1 g2, Mergeable1 g2) => GToSym Arity1 (f1 :.: g1) (f2 :.: g2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

gtoSym :: ToSymArgs Arity1 a b -> (f1 :.: g1) a -> (f2 :.: g2) b Source #

GToSym arity f1 f2 => GToSym arity (M1 i c1 f1) (M1 i c2 f2) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ToSym

Methods

gtoSym :: ToSymArgs arity a b -> M1 i c1 f1 a -> M1 i c2 f2 b Source #

genericToSym :: (Generic a, Generic b, GToSym Arity0 (Rep a) (Rep b)) => a -> b Source #

Generic toSym function.

genericLiftToSym :: (Generic1 f1, Generic1 f2, GToSym Arity1 (Rep1 f1) (Rep1 f2), Mergeable b) => (a -> b) -> f1 a -> f2 b Source #

Generic liftToSym function.

EvalSym

data family EvalSymArgs arity a :: Type Source #

The arguments to the generic evalSym function.

Instances

Instances details
data EvalSymArgs Arity0 _ Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

newtype EvalSymArgs Arity1 a Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

newtype EvalSymArgs Arity1 a = EvalSymArgs1 (Bool -> Model -> a -> a)

class GEvalSym arity f where Source #

The class of types that can be generically evaluated.

Methods

gevalSym :: EvalSymArgs arity a -> Bool -> Model -> f a -> f a Source #

Instances

Instances details
GEvalSym Arity1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

gevalSym :: EvalSymArgs Arity1 a -> Bool -> Model -> Par1 a -> Par1 a Source #

GEvalSym arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

gevalSym :: EvalSymArgs arity a -> Bool -> Model -> U1 a -> U1 a Source #

GEvalSym arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

gevalSym :: EvalSymArgs arity a -> Bool -> Model -> V1 a -> V1 a Source #

EvalSym1 a => GEvalSym Arity1 (Rec1 a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

gevalSym :: EvalSymArgs Arity1 a0 -> Bool -> Model -> Rec1 a a0 -> Rec1 a a0 Source #

(GEvalSym arity a, GEvalSym arity b) => GEvalSym arity (a :*: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

gevalSym :: EvalSymArgs arity a0 -> Bool -> Model -> (a :*: b) a0 -> (a :*: b) a0 Source #

(GEvalSym arity a, GEvalSym arity b) => GEvalSym arity (a :+: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

gevalSym :: EvalSymArgs arity a0 -> Bool -> Model -> (a :+: b) a0 -> (a :+: b) a0 Source #

EvalSym a => GEvalSym arity (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

gevalSym :: EvalSymArgs arity a0 -> Bool -> Model -> K1 i a a0 -> K1 i a a0 Source #

(EvalSym1 f, GEvalSym Arity1 g) => GEvalSym Arity1 (f :.: g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

gevalSym :: EvalSymArgs Arity1 a -> Bool -> Model -> (f :.: g) a -> (f :.: g) a Source #

GEvalSym arity a => GEvalSym arity (M1 i c a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.EvalSym

Methods

gevalSym :: EvalSymArgs arity a0 -> Bool -> Model -> M1 i c a a0 -> M1 i c a a0 Source #

genericEvalSym :: (Generic a, GEvalSym Arity0 (Rep a)) => Bool -> Model -> a -> a Source #

Generic evalSym function.

genericLiftEvalSym :: (Generic1 f, GEvalSym Arity1 (Rep1 f)) => (Bool -> Model -> a -> a) -> Bool -> Model -> f a -> f a Source #

Generic liftEvalSym function.

ExtractSym

data family ExtractSymArgs arity (knd :: SymbolKind) a :: Type Source #

The arguments to the generic extractSym function.

Instances

Instances details
data ExtractSymArgs Arity0 _ _1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

newtype ExtractSymArgs Arity1 knd a Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

newtype ExtractSymArgs Arity1 knd a = ExtractSymArgs1 (a -> Maybe (SymbolSet knd))

class GExtractSym arity f where Source #

The class of types that can generically extract the symbols.

Methods

gextractSymMaybe :: IsSymbolKind knd => ExtractSymArgs arity knd a -> f a -> Maybe (SymbolSet knd) Source #

Instances

Instances details
GExtractSym Arity1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

gextractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => ExtractSymArgs Arity1 knd a -> Par1 a -> Maybe (SymbolSet knd) Source #

GExtractSym arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

gextractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => ExtractSymArgs arity knd a -> U1 a -> Maybe (SymbolSet knd) Source #

GExtractSym arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

gextractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => ExtractSymArgs arity knd a -> V1 a -> Maybe (SymbolSet knd) Source #

ExtractSym1 a => GExtractSym Arity1 (Rec1 a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

gextractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => ExtractSymArgs Arity1 knd a0 -> Rec1 a a0 -> Maybe (SymbolSet knd) Source #

(GExtractSym arity a, GExtractSym arity b) => GExtractSym arity (a :*: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

gextractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => ExtractSymArgs arity knd a0 -> (a :*: b) a0 -> Maybe (SymbolSet knd) Source #

(GExtractSym arity a, GExtractSym arity b) => GExtractSym arity (a :+: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

gextractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => ExtractSymArgs arity knd a0 -> (a :+: b) a0 -> Maybe (SymbolSet knd) Source #

ExtractSym a => GExtractSym arity (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

gextractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => ExtractSymArgs arity knd a0 -> K1 i a a0 -> Maybe (SymbolSet knd) Source #

(ExtractSym1 f, GExtractSym Arity1 g) => GExtractSym Arity1 (f :.: g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

gextractSymMaybe :: forall (knd :: SymbolKind) a. IsSymbolKind knd => ExtractSymArgs Arity1 knd a -> (f :.: g) a -> Maybe (SymbolSet knd) Source #

GExtractSym arity a => GExtractSym arity (M1 i c a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.ExtractSym

Methods

gextractSymMaybe :: forall (knd :: SymbolKind) a0. IsSymbolKind knd => ExtractSymArgs arity knd a0 -> M1 i c a a0 -> Maybe (SymbolSet knd) Source #

SubstSym

data family SubstSymArgs arity (knd :: SymbolKind) a cb sb :: Type Source #

The arguments to the generic substSym function.

Instances

Instances details
data SubstSymArgs Arity0 _ _1 _2 _3 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

newtype SubstSymArgs Arity1 knd a cb sb Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

newtype SubstSymArgs Arity1 knd a cb sb = SubstSymArgs1 (TypedSymbol knd cb -> sb -> a -> a)

class GSubstSym arity f where Source #

The class of types where we can generically substitute the symbols in a value.

Methods

gsubstSym :: (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs arity knd a cb sb -> TypedSymbol knd cb -> sb -> f a -> f a Source #

Instances

Instances details
GSubstSym Arity1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

gsubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs Arity1 knd a cb sb -> TypedSymbol knd cb -> sb -> Par1 a -> Par1 a Source #

GSubstSym arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

gsubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs arity knd a cb sb -> TypedSymbol knd cb -> sb -> U1 a -> U1 a Source #

GSubstSym arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

gsubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs arity knd a cb sb -> TypedSymbol knd cb -> sb -> V1 a -> V1 a Source #

SubstSym1 a => GSubstSym Arity1 (Rec1 a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

gsubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs Arity1 knd a0 cb sb -> TypedSymbol knd cb -> sb -> Rec1 a a0 -> Rec1 a a0 Source #

(GSubstSym arity a, GSubstSym arity b) => GSubstSym arity (a :*: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

gsubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs arity knd a0 cb sb -> TypedSymbol knd cb -> sb -> (a :*: b) a0 -> (a :*: b) a0 Source #

(GSubstSym arity a, GSubstSym arity b) => GSubstSym arity (a :+: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

gsubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs arity knd a0 cb sb -> TypedSymbol knd cb -> sb -> (a :+: b) a0 -> (a :+: b) a0 Source #

SubstSym a => GSubstSym arity (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

gsubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs arity knd a0 cb sb -> TypedSymbol knd cb -> sb -> K1 i a a0 -> K1 i a a0 Source #

(SubstSym1 f, GSubstSym Arity1 g) => GSubstSym Arity1 (f :.: g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

gsubstSym :: forall cb sb (knd :: SymbolKind) a. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs Arity1 knd a cb sb -> TypedSymbol knd cb -> sb -> (f :.: g) a -> (f :.: g) a Source #

GSubstSym arity a => GSubstSym arity (M1 i c a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SubstSym

Methods

gsubstSym :: forall cb sb (knd :: SymbolKind) a0. (LinkedRep cb sb, IsSymbolKind knd) => SubstSymArgs arity knd a0 cb sb -> TypedSymbol knd cb -> sb -> M1 i c a a0 -> M1 i c a a0 Source #

genericSubstSym :: (Generic a, GSubstSym Arity0 (Rep a), LinkedRep cb sb, IsSymbolKind knd) => TypedSymbol knd cb -> sb -> a -> a Source #

Generic substSym function.

genericLiftSubstSym :: (Generic1 f, GSubstSym Arity1 (Rep1 f), LinkedRep cb sb, IsSymbolKind knd) => (TypedSymbol knd cb -> sb -> a -> a) -> TypedSymbol knd cb -> sb -> f a -> f a Source #

Generic liftSubstSym function.

PPrint

genericPFormatPrec :: (Generic a, GPPrint Arity0 (Rep a)) => Int -> a -> Doc ann Source #

Generic pformatPrec function.

genericLiftPFormatPrec :: (Generic1 f, GPPrint Arity1 (Rep1 f)) => (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> Int -> f a -> Doc ann Source #

Generic liftPFormatPrec function.

genericPFormatList :: (Generic a, GPPrint Arity0 (Rep a)) => [a] -> Doc ann Source #

Generic pformatList function.

genericLiftPFormatList :: (Generic1 f, GPPrint Arity1 (Rep1 f)) => (Int -> a -> Doc ann) -> ([a] -> Doc ann) -> [f a] -> Doc ann Source #

Generic liftPFormatList function.

data family PPrintArgs arity a ann :: Type Source #

The arguments to the generic PPrint class.

Instances

Instances details
data PPrintArgs Arity0 _ _1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

data PPrintArgs Arity1 a ann Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

data PPrintArgs Arity1 a ann = PPrintArgs1 (Int -> a -> Doc ann) ([a] -> Doc ann)

class GPPrint arity f where Source #

Generic PPrint class.

Minimal complete definition

gpformatPrec

Methods

gpformatPrec :: PPrintArgs arity a ann -> PPrintType -> Int -> f a -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs arity a ann -> [f a] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs arity a ann -> f a -> Bool Source #

Instances

Instances details
GPPrint Arity1 Par1 Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

GPPrint arity (U1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs arity a ann -> PPrintType -> Int -> U1 a -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs arity a ann -> [U1 a] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs arity a ann -> U1 a -> Bool Source #

GPPrint arity (V1 :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs arity a ann -> PPrintType -> Int -> V1 a -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs arity a ann -> [V1 a] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs arity a ann -> V1 a -> Bool Source #

PPrint1 f => GPPrint Arity1 (Rec1 f) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs Arity1 a ann -> PPrintType -> Int -> Rec1 f a -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs Arity1 a ann -> [Rec1 f a] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs Arity1 a ann -> Rec1 f a -> Bool Source #

(GPPrint arity a, GPPrint arity b) => GPPrint arity (a :*: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs arity a0 ann -> PPrintType -> Int -> (a :*: b) a0 -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs arity a0 ann -> [(a :*: b) a0] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs arity a0 ann -> (a :*: b) a0 -> Bool Source #

(GPPrint arity a, GPPrint arity b) => GPPrint arity (a :+: b) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs arity a0 ann -> PPrintType -> Int -> (a :+: b) a0 -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs arity a0 ann -> [(a :+: b) a0] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs arity a0 ann -> (a :+: b) a0 -> Bool Source #

(GPPrint arity a, Constructor c) => GPPrint arity (C1 c a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs arity a0 ann -> PPrintType -> Int -> C1 c a a0 -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs arity a0 ann -> [C1 c a a0] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs arity a0 ann -> C1 c a a0 -> Bool Source #

GPPrint arity a => GPPrint arity (D1 d a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs arity a0 ann -> PPrintType -> Int -> D1 d a a0 -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs arity a0 ann -> [D1 d a a0] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs arity a0 ann -> D1 d a a0 -> Bool Source #

PPrint c => GPPrint arity (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs arity a ann -> PPrintType -> Int -> K1 i c a -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs arity a ann -> [K1 i c a] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs arity a ann -> K1 i c a -> Bool Source #

(Selector s, GPPrint arity a) => GPPrint arity (S1 s a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs arity a0 ann -> PPrintType -> Int -> S1 s a a0 -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs arity a0 ann -> [S1 s a a0] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs arity a0 ann -> S1 s a a0 -> Bool Source #

(PPrint1 f, GPPrint Arity1 g) => GPPrint Arity1 (f :.: g) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.PPrint

Methods

gpformatPrec :: PPrintArgs Arity1 a ann -> PPrintType -> Int -> (f :.: g) a -> Doc ann Source #

gpformatList :: HasCallStack => PPrintArgs Arity1 a ann -> [(f :.: g) a] -> Doc ann Source #

gisNullary :: HasCallStack => PPrintArgs Arity1 a ann -> (f :.: g) a -> Bool Source #

data PPrintType Source #

Controls how to pretty-print a generic representation.

Constructors

Rec 
Tup 
Pref 
Inf String Int