hasmtlib-2.5.1: A monad for interfacing with external SMT solvers
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Hasmtlib.Type.Expr

Synopsis

Documentation

newtype SMTVar (t :: SMTSort) Source #

An internal SMT variable with a phantom-type which holds an Int as it's identifier.

Constructors

SMTVar 

Fields

Instances

Instances details
Generic (SMTVar t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Associated Types

type Rep (SMTVar t) :: Type -> Type #

Methods

from :: SMTVar t -> Rep (SMTVar t) x #

to :: Rep (SMTVar t) x -> SMTVar t #

Show (SMTVar t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

showsPrec :: Int -> SMTVar t -> ShowS #

show :: SMTVar t -> String #

showList :: [SMTVar t] -> ShowS #

Eq (SMTVar t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(==) :: SMTVar t -> SMTVar t -> Bool #

(/=) :: SMTVar t -> SMTVar t -> Bool #

Ord (SMTVar t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

compare :: SMTVar t -> SMTVar t -> Ordering #

(<) :: SMTVar t -> SMTVar t -> Bool #

(<=) :: SMTVar t -> SMTVar t -> Bool #

(>) :: SMTVar t -> SMTVar t -> Bool #

(>=) :: SMTVar t -> SMTVar t -> Bool #

max :: SMTVar t -> SMTVar t -> SMTVar t #

min :: SMTVar t -> SMTVar t -> SMTVar t #

Render (SMTVar t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

render :: SMTVar t -> Builder Source #

type Rep (SMTVar t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

type Rep (SMTVar t) = D1 ('MetaData "SMTVar" "Language.Hasmtlib.Type.Expr" "hasmtlib-2.5.1-inplace" 'True) (C1 ('MetaCons "SMTVar" 'PrefixI 'True) (S1 ('MetaSel ('Just "_varId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

varId :: forall t t. Iso (SMTVar t) (SMTVar t) Int Int Source #

data Value (t :: SMTSort) where Source #

A wrapper for values of SMTSorts. This wraps a Haskell-value into the SMT-Context.

Instances

Instances details
GCompare Value Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Methods

gcompare :: forall (a :: k) (b :: k). Value a -> Value b -> GOrdering a b #

GEq Value Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Methods

geq :: forall (a :: k) (b :: k). Value a -> Value b -> Maybe (a :~: b) #

Show (Value t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

showsPrec :: Int -> Value t -> ShowS #

show :: Value t -> String #

showList :: [Value t] -> ShowS #

Eq (HaskellType t) => Eq (Value t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Methods

(==) :: Value t -> Value t -> Bool #

(/=) :: Value t -> Value t -> Bool #

Ord (HaskellType t) => Ord (Value t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Methods

compare :: Value t -> Value t -> Ordering #

(<) :: Value t -> Value t -> Bool #

(<=) :: Value t -> Value t -> Bool #

(>) :: Value t -> Value t -> Bool #

(>=) :: Value t -> Value t -> Bool #

max :: Value t -> Value t -> Value t #

min :: Value t -> Value t -> Value t #

Render (Value t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

render :: Value t -> Builder Source #

unwrapValue :: Value t -> HaskellType t Source #

Unwraps a Haskell-value from the SMT-Context-Value.

wrapValue :: forall t. KnownSMTSort t => HaskellType t -> Value t Source #

Wraps a Haskell-value into the SMT-Context-Value.

data Expr (t :: SMTSort) where Source #

An SMT-Expression. For building expressions use the corresponding instances: Boolean, Num, Equatable, ...

With a lot of criminal energy you may build invalid expressions regarding the SMTLib Version 2.6 - Specification. Therefore it is highly recommended to rely on the instances.

Constructors

Var :: KnownSMTSort t => SMTVar t -> Expr t 
Constant :: Value t -> Expr t 
Plus :: Num (HaskellType t) => Expr t -> Expr t -> Expr t 
Minus :: Num (HaskellType t) => Expr t -> Expr t -> Expr t 
Neg :: Num (HaskellType t) => Expr t -> Expr t 
Mul :: Num (HaskellType t) => Expr t -> Expr t -> Expr t 
Abs :: Num (HaskellType t) => Expr t -> Expr t 
Mod :: Integral (HaskellType t) => Expr t -> Expr t -> Expr t 
IDiv :: Integral (HaskellType t) => Expr t -> Expr t -> Expr t 
Div :: Expr RealSort -> Expr RealSort -> Expr RealSort 
LTH :: (Ord (HaskellType t), KnownSMTSort t) => Expr t -> Expr t -> Expr BoolSort 
LTHE :: (Ord (HaskellType t), KnownSMTSort t) => Expr t -> Expr t -> Expr BoolSort 
EQU :: (Eq (HaskellType t), KnownSMTSort t, KnownNat n) => Vector (n + 2) (Expr t) -> Expr BoolSort 
Distinct :: (Eq (HaskellType t), KnownSMTSort t, KnownNat n) => Vector (n + 2) (Expr t) -> Expr BoolSort 
GTHE :: (Ord (HaskellType t), KnownSMTSort t) => Expr t -> Expr t -> Expr BoolSort 
GTH :: (Ord (HaskellType t), KnownSMTSort t) => Expr t -> Expr t -> Expr BoolSort 
Not :: Boolean (HaskellType t) => Expr t -> Expr t 
And :: Boolean (HaskellType t) => Expr t -> Expr t -> Expr t 
Or :: Boolean (HaskellType t) => Expr t -> Expr t -> Expr t 
Impl :: Boolean (HaskellType t) => Expr t -> Expr t -> Expr t 
Xor :: Boolean (HaskellType t) => Expr t -> Expr t -> Expr t 
Pi :: Expr RealSort 
Sqrt :: Expr RealSort -> Expr RealSort 
Exp :: Expr RealSort -> Expr RealSort 
Sin :: Expr RealSort -> Expr RealSort 
Cos :: Expr RealSort -> Expr RealSort 
Tan :: Expr RealSort -> Expr RealSort 
Asin :: Expr RealSort -> Expr RealSort 
Acos :: Expr RealSort -> Expr RealSort 
Atan :: Expr RealSort -> Expr RealSort 
ToReal :: Expr IntSort -> Expr RealSort 
ToInt :: Expr RealSort -> Expr IntSort 
IsInt :: Expr RealSort -> Expr BoolSort 
Ite :: Expr BoolSort -> Expr t -> Expr t -> Expr t 
BvNand :: KnownNat n => Expr (BvSort n) -> Expr (BvSort n) -> Expr (BvSort n) 
BvNor :: KnownNat n => Expr (BvSort n) -> Expr (BvSort n) -> Expr (BvSort n) 
BvShL :: KnownNat n => Expr (BvSort n) -> Expr (BvSort n) -> Expr (BvSort n) 
BvLShR :: KnownNat n => Expr (BvSort n) -> Expr (BvSort n) -> Expr (BvSort n) 
BvConcat :: (KnownNat n, KnownNat m) => Expr (BvSort n) -> Expr (BvSort m) -> Expr (BvSort (n + m)) 
BvRotL :: (KnownNat n, Integral a) => a -> Expr (BvSort n) -> Expr (BvSort n) 
BvRotR :: (KnownNat n, Integral a) => a -> Expr (BvSort n) -> Expr (BvSort n) 
ArrSelect :: (KnownSMTSort k, KnownSMTSort v, Ord (HaskellType k), Ord (HaskellType v)) => Expr (ArraySort k v) -> Expr k -> Expr v 
ArrStore :: (KnownSMTSort k, KnownSMTSort v, Ord (HaskellType k)) => Expr (ArraySort k v) -> Expr k -> Expr v -> Expr (ArraySort k v) 
StrConcat :: Expr StringSort -> Expr StringSort -> Expr StringSort 
StrLength :: Expr StringSort -> Expr IntSort 
StrLT :: Expr StringSort -> Expr StringSort -> Expr BoolSort 
StrLTHE :: Expr StringSort -> Expr StringSort -> Expr BoolSort 
StrAt :: Expr StringSort -> Expr IntSort -> Expr StringSort 
StrSubstring :: Expr StringSort -> Expr IntSort -> Expr IntSort -> Expr StringSort 
StrPrefixOf :: Expr StringSort -> Expr StringSort -> Expr BoolSort 
StrSuffixOf :: Expr StringSort -> Expr StringSort -> Expr BoolSort 
StrContains :: Expr StringSort -> Expr StringSort -> Expr BoolSort 
StrIndexOf :: Expr StringSort -> Expr StringSort -> Expr IntSort -> Expr IntSort 
StrReplace :: Expr StringSort -> Expr StringSort -> Expr StringSort -> Expr StringSort 
StrReplaceAll :: Expr StringSort -> Expr StringSort -> Expr StringSort -> Expr StringSort 
ForAll :: KnownSMTSort t => Maybe (SMTVar t) -> (Expr t -> Expr BoolSort) -> Expr BoolSort

Just v if quantified var has been created already, Nothing otherwise

Exists :: KnownSMTSort t => Maybe (SMTVar t) -> (Expr t -> Expr BoolSort) -> Expr BoolSort

Just v if quantified var has been created already, Nothing otherwise

Instances

Instances details
GNFData Expr Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

grnf :: forall (a :: k). Expr a -> () #

GCompare Expr Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

gcompare :: forall (a :: k) (b :: k). Expr a -> Expr b -> GOrdering a b #

GEq Expr Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

geq :: forall (a :: k) (b :: k). Expr a -> Expr b -> Maybe (a :~: b) #

Uniplate1 Expr '[KnownSMTSort] Source #

Caution for quantified expressions: uniplate1 will only be applied if quantification has taken place already.

Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

uniplate1 :: forall m (b :: k). (Applicative m, AllC '[KnownSMTSort] b) => (forall (a :: k). AllC '[KnownSMTSort] a => Expr a -> m (Expr a)) -> Expr b -> m (Expr b) Source #

IsString (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Monoid (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Semigroup (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Bits (Expr 'BoolSort) Source #

This instance is partial for testBit and popCount, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

KnownNat n => Bits (Expr ('BvSort n)) Source #

This instance is partial for testBit and popCount, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(.&.) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

(.|.) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

xor :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

complement :: Expr ('BvSort n) -> Expr ('BvSort n) #

shift :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

rotate :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

zeroBits :: Expr ('BvSort n) #

bit :: Int -> Expr ('BvSort n) #

setBit :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

clearBit :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

complementBit :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

testBit :: Expr ('BvSort n) -> Int -> Bool #

bitSizeMaybe :: Expr ('BvSort n) -> Maybe Int #

bitSize :: Expr ('BvSort n) -> Int #

isSigned :: Expr ('BvSort n) -> Bool #

shiftL :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

unsafeShiftL :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

shiftR :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

unsafeShiftR :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

rotateL :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

rotateR :: Expr ('BvSort n) -> Int -> Expr ('BvSort n) #

popCount :: Expr ('BvSort n) -> Int #

Bounded (Expr 'BoolSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

KnownNat n => Bounded (Expr ('BvSort n)) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

minBound :: Expr ('BvSort n) #

maxBound :: Expr ('BvSort n) #

KnownNat n => Enum (Expr ('BvSort n)) Source #

This instance is partial for fromEnum, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

succ :: Expr ('BvSort n) -> Expr ('BvSort n) #

pred :: Expr ('BvSort n) -> Expr ('BvSort n) #

toEnum :: Int -> Expr ('BvSort n) #

fromEnum :: Expr ('BvSort n) -> Int #

enumFrom :: Expr ('BvSort n) -> [Expr ('BvSort n)] #

enumFromThen :: Expr ('BvSort n) -> Expr ('BvSort n) -> [Expr ('BvSort n)] #

enumFromTo :: Expr ('BvSort n) -> Expr ('BvSort n) -> [Expr ('BvSort n)] #

enumFromThenTo :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) -> [Expr ('BvSort n)] #

Enum (Expr 'IntSort) Source #

This instance is partial for fromEnum, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

Enum (Expr 'RealSort) Source #

This instance is partial for fromEnum, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

Floating (Expr 'RealSort) Source #

Not in the SMTLib2.6-standard. Solvers like CVC5 and MathSAT support it though.

Instance details

Defined in Language.Hasmtlib.Type.Expr

KnownNat n => Num (Expr ('BvSort n)) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(+) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

(-) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

(*) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

negate :: Expr ('BvSort n) -> Expr ('BvSort n) #

abs :: Expr ('BvSort n) -> Expr ('BvSort n) #

signum :: Expr ('BvSort n) -> Expr ('BvSort n) #

fromInteger :: Integer -> Expr ('BvSort n) #

Num (Expr 'IntSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Num (Expr 'RealSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Fractional (Expr 'RealSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

KnownNat n => Integral (Expr ('BvSort n)) Source #

This instance is partial for toInteger, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

quot :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

rem :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

div :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

mod :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) #

quotRem :: Expr ('BvSort n) -> Expr ('BvSort n) -> (Expr ('BvSort n), Expr ('BvSort n)) #

divMod :: Expr ('BvSort n) -> Expr ('BvSort n) -> (Expr ('BvSort n), Expr ('BvSort n)) #

toInteger :: Expr ('BvSort n) -> Integer #

Integral (Expr 'IntSort) Source #

This instance is partial for toInteger, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

KnownNat n => Real (Expr ('BvSort n)) Source #

This instance is partial for toRational, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

toRational :: Expr ('BvSort n) -> Rational #

Real (Expr 'IntSort) Source #

This instance is partial for toRational, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

Real (Expr 'RealSort) Source #

This instance is partial for toRational, it's only intended for use with constants (Constant).

Instance details

Defined in Language.Hasmtlib.Type.Expr

KnownSMTSort t => Show (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

showsPrec :: Int -> Expr t -> ShowS #

show :: Expr t -> String #

showList :: [Expr t] -> ShowS #

Eq (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(==) :: Expr t -> Expr t -> Bool #

(/=) :: Expr t -> Expr t -> Bool #

Ord (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

compare :: Expr t -> Expr t -> Ordering #

(<) :: Expr t -> Expr t -> Bool #

(<=) :: Expr t -> Expr t -> Bool #

(>) :: Expr t -> Expr t -> Bool #

(>=) :: Expr t -> Expr t -> Bool #

max :: Expr t -> Expr t -> Expr t #

min :: Expr t -> Expr t -> Expr t #

Boolean (Expr 'BoolSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

KnownNat n => Boolean (Expr ('BvSort n)) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

bool :: Bool -> Expr ('BvSort n) Source #

true :: Expr ('BvSort n) Source #

false :: Expr ('BvSort n) Source #

(&&) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) Source #

(||) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) Source #

(==>) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) Source #

(<==) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) Source #

(<==>) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) Source #

not :: Expr ('BvSort n) -> Expr ('BvSort n) Source #

xor :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr ('BvSort n) Source #

KnownSMTSort t => Codec (Expr t) Source #

Decode and evaluate expressions

Instance details

Defined in Language.Hasmtlib.Codec

Associated Types

type Decoded (Expr t) Source #

Methods

decode :: Solution -> Expr t -> Maybe (Decoded (Expr t)) Source #

encode :: Decoded (Expr t) -> Expr t Source #

KnownSMTSort t => Render (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

render :: Expr t -> Builder Source #

(KnownSMTSort t, Eq (HaskellType t)) => Equatable (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: Expr t -> Expr t -> Expr 'BoolSort Source #

(/==) :: Expr t -> Expr t -> Expr 'BoolSort Source #

KnownNat n => Orderable (Expr ('BvSort n)) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr 'BoolSort Source #

(>=?) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr 'BoolSort Source #

(<?) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr 'BoolSort Source #

(>?) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr 'BoolSort Source #

Orderable (Expr 'IntSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable (Expr 'RealSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable (Expr 'StringSort) Source #

Lexicographic ordering for (<?) and reflexive closure of lexicographic ordering for Orderable

Instance details

Defined in Language.Hasmtlib.Type.Expr

KnownSMTSort t => Variable (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Variable

Methods

variable :: MonadSMT s m => m (Expr t) Source #

(KnownSMTSort k, KnownSMTSort v, Ord (HaskellType k), Ord (HaskellType v)) => Ixed (Expr ('ArraySort k v)) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ix :: Index (Expr ('ArraySort k v)) -> Traversal' (Expr ('ArraySort k v)) (IxValue (Expr ('ArraySort k v))) #

Ixed (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

AsEmpty (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

_Empty :: Prism' (Expr 'StringSort) () #

KnownSMTSort t => Plated (Expr t) Source #

Caution for quantified expressions: plate will only be applied if quantification has taken place already.

Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

plate :: Traversal' (Expr t) (Expr t) #

Prefixed (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Suffixed (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Iteable (Expr 'BoolSort) () Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> () -> () -> () Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Identity a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Identity a -> Identity a -> Identity a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (First a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> First a -> First a -> First a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Last a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Last a -> Last a -> Last a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Dual a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Dual a -> Dual a -> Dual a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Product a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Product a -> Product a -> Product a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Sum a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Sum a -> Sum a -> Sum a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Seq a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Seq a -> Seq a -> Seq a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Tree a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Tree a -> Tree a -> Tree a Source #

Iteable (Expr 'BoolSort) (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Expr t -> Expr t -> Expr t Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Maybe a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Maybe a -> Maybe a -> Maybe a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) [a] Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> [a] -> [a] -> [a] Source #

Cons (Expr 'StringSort) (Expr 'StringSort) (Expr 'StringSort) (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Snoc (Expr 'StringSort) (Expr 'StringSort) (Expr 'StringSort) (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b) => Iteable (Expr 'BoolSort) (a, b) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b) -> (a, b) -> (a, b) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c) => Iteable (Expr 'BoolSort) (a, b, c) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c) -> (a, b, c) -> (a, b, c) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d) => Iteable (Expr 'BoolSort) (a, b, c, d) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d, Iteable (Expr 'BoolSort) e) => Iteable (Expr 'BoolSort) (a, b, c, d, e) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d, Iteable (Expr 'BoolSort) e, Iteable (Expr 'BoolSort) f) => Iteable (Expr 'BoolSort) (a, b, c, d, e, f) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d, Iteable (Expr 'BoolSort) e, Iteable (Expr 'BoolSort) f, Iteable (Expr 'BoolSort) g) => Iteable (Expr 'BoolSort) (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d, Iteable (Expr 'BoolSort) e, Iteable (Expr 'BoolSort) f, Iteable (Expr 'BoolSort) g, Iteable (Expr 'BoolSort) h) => Iteable (Expr 'BoolSort) (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #

type Decoded (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Codec

type Decoded (Expr t) = HaskellType t
type Index (Expr ('ArraySort k v)) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

type Index (Expr ('ArraySort k v)) = Expr k
type Index (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

type IxValue (Expr ('ArraySort k v)) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

type IxValue (Expr ('ArraySort k v)) = Expr v
type IxValue (Expr 'StringSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

class Iteable b a where Source #

If condition (p :: b) then (t :: a) else (f :: a)

>>> ite true "1" "2"
    "1"
>>> ite false 100 42
    42

Minimal complete definition

Nothing

Methods

ite :: b -> a -> a -> a Source #

default ite :: (Iteable b c, Applicative f, f c ~ a) => b -> a -> a -> a Source #

Instances

Instances details
Iteable Bool a Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Bool -> a -> a -> a Source #

Iteable (Expr 'BoolSort) () Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> () -> () -> () Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Identity a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Identity a -> Identity a -> Identity a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (First a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> First a -> First a -> First a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Last a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Last a -> Last a -> Last a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Dual a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Dual a -> Dual a -> Dual a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Product a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Product a -> Product a -> Product a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Sum a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Sum a -> Sum a -> Sum a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Seq a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Seq a -> Seq a -> Seq a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Tree a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Tree a -> Tree a -> Tree a Source #

Iteable (Expr 'BoolSort) (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Expr t -> Expr t -> Expr t Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) (Maybe a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> Maybe a -> Maybe a -> Maybe a Source #

Iteable (Expr 'BoolSort) a => Iteable (Expr 'BoolSort) [a] Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> [a] -> [a] -> [a] Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b) => Iteable (Expr 'BoolSort) (a, b) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b) -> (a, b) -> (a, b) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c) => Iteable (Expr 'BoolSort) (a, b, c) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c) -> (a, b, c) -> (a, b, c) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d) => Iteable (Expr 'BoolSort) (a, b, c, d) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d, Iteable (Expr 'BoolSort) e) => Iteable (Expr 'BoolSort) (a, b, c, d, e) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d, Iteable (Expr 'BoolSort) e, Iteable (Expr 'BoolSort) f) => Iteable (Expr 'BoolSort) (a, b, c, d, e, f) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d, Iteable (Expr 'BoolSort) e, Iteable (Expr 'BoolSort) f, Iteable (Expr 'BoolSort) g) => Iteable (Expr 'BoolSort) (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

(Iteable (Expr 'BoolSort) a, Iteable (Expr 'BoolSort) b, Iteable (Expr 'BoolSort) c, Iteable (Expr 'BoolSort) d, Iteable (Expr 'BoolSort) e, Iteable (Expr 'BoolSort) f, Iteable (Expr 'BoolSort) g, Iteable (Expr 'BoolSort) h) => Iteable (Expr 'BoolSort) (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

ite :: Expr 'BoolSort -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #

class Equatable a where Source #

Test two as on equality as SMT-Expression.

You can derive an instance of this class if your type is Generic.

    x <- var @RealType
    y <- var
    assert $ y === x && not (y /== x)

Minimal complete definition

Nothing

Methods

(===) :: a -> a -> Expr BoolSort infix 4 Source #

Test whether two values are equal in the SMT-Problem.

default (===) :: (Generic a, GEquatable (Rep a)) => a -> a -> Expr BoolSort Source #

(/==) :: a -> a -> Expr BoolSort infix 4 Source #

Test whether two values are not equal in the SMT-Problem.

Instances

Instances details
Equatable Void Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Int16 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Int32 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Int64 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Int8 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Word16 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Word32 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Word64 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Word8 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Ordering Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Integer Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Natural Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable () Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: () -> () -> Expr 'BoolSort Source #

(/==) :: () -> () -> Expr 'BoolSort Source #

Equatable Bool Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Char Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Double Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Float Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Int Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Equatable Word Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

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

Defined in Language.Hasmtlib.Type.Expr

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: First a -> First a -> Expr 'BoolSort Source #

(/==) :: First a -> First a -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: Last a -> Last a -> Expr 'BoolSort Source #

(/==) :: Last a -> Last a -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: Dual a -> Dual a -> Expr 'BoolSort Source #

(/==) :: Dual a -> Dual a -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: Sum a -> Sum a -> Expr 'BoolSort Source #

(/==) :: Sum a -> Sum a -> Expr 'BoolSort Source #

Equatable a => Equatable (Tree a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: Tree a -> Tree a -> Expr 'BoolSort Source #

(/==) :: Tree a -> Tree a -> Expr 'BoolSort Source #

(KnownSMTSort t, Eq (HaskellType t)) => Equatable (Expr t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: Expr t -> Expr t -> Expr 'BoolSort Source #

(/==) :: Expr t -> Expr t -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: Maybe a -> Maybe a -> Expr 'BoolSort Source #

(/==) :: Maybe a -> Maybe a -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: [a] -> [a] -> Expr 'BoolSort Source #

(/==) :: [a] -> [a] -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: Either a b -> Either a b -> Expr 'BoolSort Source #

(/==) :: Either a b -> Either a b -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: (a, b) -> (a, b) -> Expr 'BoolSort Source #

(/==) :: (a, b) -> (a, b) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: (a, b, c) -> (a, b, c) -> Expr 'BoolSort Source #

(/==) :: (a, b, c) -> (a, b, c) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: (a, b, c, d) -> (a, b, c, d) -> Expr 'BoolSort Source #

(/==) :: (a, b, c, d) -> (a, b, c, d) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Expr 'BoolSort Source #

(/==) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Expr 'BoolSort Source #

(/==) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Expr 'BoolSort Source #

(/==) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(===) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Expr 'BoolSort Source #

(/==) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Expr 'BoolSort Source #

class Equatable a => Orderable a where Source #

Compare two as as SMT-Expression.

You can derive an instance of this class if your type is Generic.

x <- var @RealSort
y <- var
assert $ x >? y
assert $ x === min' 42 100

Minimal complete definition

Nothing

Methods

(<=?) :: a -> a -> Expr BoolSort infix 4 Source #

default (<=?) :: (Generic a, GOrderable (Rep a)) => a -> a -> Expr BoolSort Source #

(>=?) :: a -> a -> Expr BoolSort infix 4 Source #

(<?) :: a -> a -> Expr BoolSort infix 4 Source #

(>?) :: a -> a -> Expr BoolSort infix 4 Source #

Instances

Instances details
Orderable Void Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Int16 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Int32 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Int64 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Int8 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Word16 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Word32 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Word64 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Word8 Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Ordering Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Integer Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Natural Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable () Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: () -> () -> Expr 'BoolSort Source #

(>=?) :: () -> () -> Expr 'BoolSort Source #

(<?) :: () -> () -> Expr 'BoolSort Source #

(>?) :: () -> () -> Expr 'BoolSort Source #

Orderable Bool Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Char Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Double Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Float Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Int Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable Word Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

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

Defined in Language.Hasmtlib.Type.Expr

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

Defined in Language.Hasmtlib.Type.Expr

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: Last a -> Last a -> Expr 'BoolSort Source #

(>=?) :: Last a -> Last a -> Expr 'BoolSort Source #

(<?) :: Last a -> Last a -> Expr 'BoolSort Source #

(>?) :: Last a -> Last a -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: Dual a -> Dual a -> Expr 'BoolSort Source #

(>=?) :: Dual a -> Dual a -> Expr 'BoolSort Source #

(<?) :: Dual a -> Dual a -> Expr 'BoolSort Source #

(>?) :: Dual a -> Dual a -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: Sum a -> Sum a -> Expr 'BoolSort Source #

(>=?) :: Sum a -> Sum a -> Expr 'BoolSort Source #

(<?) :: Sum a -> Sum a -> Expr 'BoolSort Source #

(>?) :: Sum a -> Sum a -> Expr 'BoolSort Source #

Orderable a => Orderable (Tree a) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: Tree a -> Tree a -> Expr 'BoolSort Source #

(>=?) :: Tree a -> Tree a -> Expr 'BoolSort Source #

(<?) :: Tree a -> Tree a -> Expr 'BoolSort Source #

(>?) :: Tree a -> Tree a -> Expr 'BoolSort Source #

KnownNat n => Orderable (Expr ('BvSort n)) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr 'BoolSort Source #

(>=?) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr 'BoolSort Source #

(<?) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr 'BoolSort Source #

(>?) :: Expr ('BvSort n) -> Expr ('BvSort n) -> Expr 'BoolSort Source #

Orderable (Expr 'IntSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable (Expr 'RealSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Expr

Orderable (Expr 'StringSort) Source #

Lexicographic ordering for (<?) and reflexive closure of lexicographic ordering for Orderable

Instance details

Defined in Language.Hasmtlib.Type.Expr

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

Defined in Language.Hasmtlib.Type.Expr

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: [a] -> [a] -> Expr 'BoolSort Source #

(>=?) :: [a] -> [a] -> Expr 'BoolSort Source #

(<?) :: [a] -> [a] -> Expr 'BoolSort Source #

(>?) :: [a] -> [a] -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: Either a b -> Either a b -> Expr 'BoolSort Source #

(>=?) :: Either a b -> Either a b -> Expr 'BoolSort Source #

(<?) :: Either a b -> Either a b -> Expr 'BoolSort Source #

(>?) :: Either a b -> Either a b -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: (a, b) -> (a, b) -> Expr 'BoolSort Source #

(>=?) :: (a, b) -> (a, b) -> Expr 'BoolSort Source #

(<?) :: (a, b) -> (a, b) -> Expr 'BoolSort Source #

(>?) :: (a, b) -> (a, b) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: (a, b, c) -> (a, b, c) -> Expr 'BoolSort Source #

(>=?) :: (a, b, c) -> (a, b, c) -> Expr 'BoolSort Source #

(<?) :: (a, b, c) -> (a, b, c) -> Expr 'BoolSort Source #

(>?) :: (a, b, c) -> (a, b, c) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: (a, b, c, d) -> (a, b, c, d) -> Expr 'BoolSort Source #

(>=?) :: (a, b, c, d) -> (a, b, c, d) -> Expr 'BoolSort Source #

(<?) :: (a, b, c, d) -> (a, b, c, d) -> Expr 'BoolSort Source #

(>?) :: (a, b, c, d) -> (a, b, c, d) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Expr 'BoolSort Source #

(>=?) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Expr 'BoolSort Source #

(<?) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Expr 'BoolSort Source #

(>?) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Expr 'BoolSort Source #

(>=?) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Expr 'BoolSort Source #

(<?) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Expr 'BoolSort Source #

(>?) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Expr 'BoolSort Source #

(>=?) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Expr 'BoolSort Source #

(<?) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Expr 'BoolSort Source #

(>?) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Expr 'BoolSort Source #

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

Defined in Language.Hasmtlib.Type.Expr

Methods

(<=?) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Expr 'BoolSort Source #

(>=?) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Expr 'BoolSort Source #

(<?) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Expr 'BoolSort Source #

(>?) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Expr 'BoolSort Source #

min' :: (Orderable a, Iteable (Expr BoolSort) a) => a -> a -> a Source #

Minimum of two as SMT-Expression.

max' :: (Orderable a, Iteable (Expr BoolSort) a) => a -> a -> a Source #

Maximum of two as SMT-Expression.

equal :: (Eq (HaskellType t), KnownSMTSort t, Foldable f) => f (Expr t) -> Expr BoolSort Source #

Test multiple expressions on equality within in the SMT-Problem.

distinct :: (Eq (HaskellType t), KnownSMTSort t, Foldable f) => f (Expr t) -> Expr BoolSort Source #

Test multiple expressions on distinctness within in the SMT-Problem.

for_all :: forall t. KnownSMTSort t => (Expr t -> Expr BoolSort) -> Expr BoolSort Source #

A universal quantification for any specific SMTSort. If the type cannot be inferred, apply a type-annotation. Nested quantifiers are also supported.

Usage:

  assert $
     for_all @IntSort $ x ->
        x + 0 === x && 0 + x === x
  

The lambdas x is all-quantified here. It will only be scoped for the lambdas body.

exists :: forall t. KnownSMTSort t => (Expr t -> Expr BoolSort) -> Expr BoolSort Source #

An existential quantification for any specific SMTSort If the type cannot be inferred, apply a type-annotation. Nested quantifiers are also supported.

Usage:

  assert $
     for_all @(BvSort 8) $ x ->
         exists $ y ->
           x - y === 0
  

The lambdas y is existentially quantified here. It will only be scoped for the lambdas body.

select :: (KnownSMTSort k, KnownSMTSort v, Ord (HaskellType k), Ord (HaskellType v)) => Expr (ArraySort k v) -> Expr k -> Expr v Source #

Select a value from an array.

store :: (KnownSMTSort k, KnownSMTSort v, Ord (HaskellType k)) => Expr (ArraySort k v) -> Expr k -> Expr v -> Expr (ArraySort k v) Source #

Store a value in an array.

bvShL :: KnownNat n => Expr (BvSort n) -> Expr (BvSort n) -> Expr (BvSort n) Source #

Bitvector shift left

bvLShR :: KnownNat n => Expr (BvSort n) -> Expr (BvSort n) -> Expr (BvSort n) Source #

Bitvector logical shift right

bvConcat :: (KnownNat n, KnownNat m) => Expr (BvSort n) -> Expr (BvSort m) -> Expr (BvSort (n + m)) Source #

Concat two bitvectors

toRealSort :: Expr IntSort -> Expr RealSort Source #

Converts an expression of type IntSort to type RealSort.

toIntSort :: Expr RealSort -> Expr IntSort Source #

Converts an expression of type RealSort to type IntSort.

isIntSort :: Expr RealSort -> Expr BoolSort Source #

Checks whether an expression of type RealSort may be safely converted to type IntSort.

strLength :: Expr StringSort -> Expr IntSort Source #

Length of a string.

strAt :: Expr StringSort -> Expr IntSort -> Expr StringSort Source #

Singleton string containing a character at given position or empty string when position is out of range. The leftmost position is 0.

strSubstring :: Expr StringSort -> Expr IntSort -> Expr IntSort -> Expr StringSort Source #

(strSubstring s i n) evaluates to the longest (unscattered) substring of s of length at most n starting at position i. It evaluates to the empty string if n is negative or i is not in the interval [0,l-1] where l is the length of s.

strPrefixOf :: Expr StringSort -> Expr StringSort -> Expr BoolSort Source #

First string is a prefix of second one. (str.prefixof s t) is true iff s is a prefix of t.

strSuffixOf :: Expr StringSort -> Expr StringSort -> Expr BoolSort Source #

First string is a suffix of second one. (str.suffixof s t) is true iff s is a suffix of t.

strContains :: Expr StringSort -> Expr StringSort -> Expr BoolSort Source #

First string contains second one (str.contains s t) iff s contains t.

strIndexOf :: Expr StringSort -> Expr StringSort -> Expr IntSort -> Expr IntSort Source #

Index of first occurrence of second string in first one starting at the position specified by the third argument. (str.indexof s t i), with 0 <= i <= |s| is the position of the first occurrence of t in s at or after position i, if any. Otherwise, it is -1. Note that the result is i whenever i is within the range [0, |s|] and t is empty.

strReplace :: Expr StringSort -> Expr StringSort -> Expr StringSort -> Expr StringSort Source #

(str.replace s t t') is the string obtained by replacing the first occurrence of t in s, if any, by t'. Note that if t is empty, the result is to prepend t' to s; also, if t does not occur in s then the result is s.

strReplaceAll :: Expr StringSort -> Expr StringSort -> Expr StringSort -> Expr StringSort Source #

(str.replace_all s t t’) is s if t is the empty string. Otherwise, it is the string obtained from s by replacing all occurrences of t in s by t’, starting with the first occurrence and proceeding in left-to-right order.

Orphan instances

Show (Value t) Source # 
Instance details

Methods

showsPrec :: Int -> Value t -> ShowS #

show :: Value t -> String #

showList :: [Value t] -> ShowS #

Render (Value t) Source # 
Instance details

Methods

render :: Value t -> Builder Source #