Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
This module provides the wrapper Value
for embedding Haskell-Values into the SMT-Context.
The Direction Haskell-Value => SMT-Value
is the creation of a constant in the SMT-Problem.
The other way around SMT-Value => Haskell-Value
is mainly used when decoding a solvers solutions for variables.
Synopsis
- data Value (t :: SMTSort) where
- IntValue :: HaskellType IntSort -> Value IntSort
- RealValue :: HaskellType RealSort -> Value RealSort
- BoolValue :: HaskellType BoolSort -> Value BoolSort
- BvValue :: (KnownBvEnc enc, KnownNat n) => HaskellType (BvSort enc n) -> Value (BvSort enc n)
- ArrayValue :: (KnownSMTSort k, KnownSMTSort v, Ord (HaskellType k), Ord (HaskellType v)) => HaskellType (ArraySort k v) -> Value (ArraySort k v)
- StringValue :: HaskellType StringSort -> Value StringSort
- wrapValue :: forall t. KnownSMTSort t => HaskellType t -> Value t
- unwrapValue :: Value t -> HaskellType t
Type
data Value (t :: SMTSort) where Source #
A wrapper for values of SMTSort
s.
This wraps a Haskell-value into the SMT-Context.
IntValue :: HaskellType IntSort -> Value IntSort | |
RealValue :: HaskellType RealSort -> Value RealSort | |
BoolValue :: HaskellType BoolSort -> Value BoolSort | |
BvValue :: (KnownBvEnc enc, KnownNat n) => HaskellType (BvSort enc n) -> Value (BvSort enc n) | |
ArrayValue :: (KnownSMTSort k, KnownSMTSort v, Ord (HaskellType k), Ord (HaskellType v)) => HaskellType (ArraySort k v) -> Value (ArraySort k v) | |
StringValue :: HaskellType StringSort -> Value StringSort |
Instances
GCompare Value Source # | |
GEq Value Source # | |
(KnownSMTSort t, Num (HaskellType t)) => Num (Value t) Source # | |
Fractional (Value 'RealSort) Source # | |
Show (Value t) Source # | |
Eq (HaskellType t) => Eq (Value t) Source # | |
Ord (HaskellType t) => Ord (Value t) Source # | |
Defined in Language.Hasmtlib.Type.Value | |
Boolean (Value 'BoolSort) Source # | |
Defined in Language.Hasmtlib.Type.Value bool :: Bool -> Value 'BoolSort Source # true :: Value 'BoolSort Source # false :: Value 'BoolSort Source # (&&) :: Value 'BoolSort -> Value 'BoolSort -> Value 'BoolSort Source # (||) :: Value 'BoolSort -> Value 'BoolSort -> Value 'BoolSort Source # (==>) :: Value 'BoolSort -> Value 'BoolSort -> Value 'BoolSort Source # (<==) :: Value 'BoolSort -> Value 'BoolSort -> Value 'BoolSort Source # (<==>) :: Value 'BoolSort -> Value 'BoolSort -> Value 'BoolSort Source # not :: Value 'BoolSort -> Value 'BoolSort Source # xor :: Value 'BoolSort -> Value 'BoolSort -> Value 'BoolSort Source # | |
Render (Value t) Source # | |
Conversion
wrapValue :: forall t. KnownSMTSort t => HaskellType t -> Value t Source #
Wraps a Haskell-value into the SMT-Context-Value
.
unwrapValue :: Value t -> HaskellType t Source #
Unwraps a Haskell-value from the SMT-Context-Value
.