grisette-0.9.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 SExpr Source #

S-expression data type. Used for symbol metadata.

Instances

Instances details
Generic SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Associated Types

type Rep SExpr :: Type -> Type #

Methods

from :: SExpr -> Rep SExpr x #

to :: Rep SExpr x -> SExpr #

Show SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Methods

showsPrec :: Int -> SExpr -> ShowS #

show :: SExpr -> String #

showList :: [SExpr] -> ShowS #

Binary SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Methods

put :: SExpr -> Put #

get :: Get SExpr #

putList :: [SExpr] -> Put #

Serial SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Methods

serialize :: MonadPut m => SExpr -> m () #

deserialize :: MonadGet m => m SExpr #

Serialize SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Methods

put :: Putter SExpr #

get :: Get SExpr #

NFData SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Methods

rnf :: SExpr -> () #

Eq SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Methods

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

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

Ord SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Methods

compare :: SExpr -> SExpr -> Ordering #

(<) :: SExpr -> SExpr -> Bool #

(<=) :: SExpr -> SExpr -> Bool #

(>) :: SExpr -> SExpr -> Bool #

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

max :: SExpr -> SExpr -> SExpr #

min :: SExpr -> SExpr -> SExpr #

Hashable SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Methods

hashWithSalt :: Int -> SExpr -> Int #

hash :: SExpr -> Int #

Lift SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

Methods

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

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

type Rep SExpr Source # 
Instance details

Defined in Grisette.Internal.Core.Data.SExpr

showsSExprWithParens :: Char -> Char -> SExpr -> ShowS Source #

Show an S-expression with specific parentheses.

fileLocation :: SpliceQ SExpr Source #

Get the file location of the splice.

data Identifier 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 metadata

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

>>> withMetadata "a" (NumberAtom 1)
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.

>>> $$(withLocation "a") -- a sample result could be "a:[grisette-file-location <interactive> 18 (4 18)]"
a:[grisette-file-location <interactive>...]

Constructors

Identifier 

Fields

Instances

Instances details
IsString Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Generic Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Associated Types

type Rep Identifier :: Type -> Type #

Show Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Binary Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Serial Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

serialize :: MonadPut m => Identifier -> m () #

deserialize :: MonadGet m => m Identifier #

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

type Rep Identifier Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

type Rep Identifier = D1 ('MetaData "Identifier" "Grisette.Internal.Core.Data.Symbol" "grisette-0.9.0.0-8b30m8DmEAJELhVBobm0Vc" 'False) (C1 ('MetaCons "Identifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "baseIdent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SExpr)))

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

Binary Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

put :: Symbol -> Put #

get :: Get Symbol #

putList :: [Symbol] -> Put #

Serial Symbol Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Symbol

Methods

serialize :: MonadPut m => Symbol -> m () #

deserialize :: MonadGet m => m Symbol #

Serialize 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.9.0.0-8b30m8DmEAJELhVBobm0Vc" '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.

withMetadata :: Text -> SExpr -> Identifier Source #

Identifier with extra metadata.

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

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

mapMetadata :: (SExpr -> SExpr) -> Identifier -> Identifier Source #

Modify the metadata of an identifier.

withLocation :: Text -> SpliceQ Identifier Source #

Identifier with the file 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.

mapIdentifier :: (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 #

(SupportedNonFuncPrim ca, 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 #

(LinkedRep ca sa, LinkedRep cb sb, SupportedPrim (ca =-> cb), SupportedNonFuncPrim ca) => 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 => Text -> SpliceQ s Source #

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

>>> $$(slocsym "a") :: SymBool
a:[grisette-file-location <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 => Text -> Int -> SpliceQ s Source #

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

>>> $$(ilocsym "a" 1) :: SymBool
a:[grisette-file-location <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 #

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

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

Methods

symIte :: SymBool -> (a --> b) -> (a --> b) -> a --> b 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 #

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

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

Methods

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

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 #

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

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

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

(SymOrd a, Integral a) => SymOrd (Ratio a) Source # 
Instance details

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

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