Copyright | (c) Sirui Lu 2021-2023 |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | siruilu@cs.washington.edu |
Stability | Experimental |
Portability | GHC only |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Solvable type interface
class IsString t => Solvable c t | t -> c where Source #
The class defines the creation and pattern matching of solvable type values.
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
Generate simply-named symbolic constants.
Two symbolic constants with the same name 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 :: String -> Int -> t Source #
Generate indexed symbolic constants.
Two symbolic constants with the same name but different indices are not the same symbolic constants.
>>>
isym "a" 1 :: SymBool
a@1
sinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> a -> t Source #
Generate simply-named symbolic constants with some extra information for disambiguation.
Two symbolic constants with the same name but different extra information (including info with different types) are considered to be different.
>>>
sinfosym "a" "someInfo" :: SymInteger
a:"someInfo"
iinfosym :: (Typeable a, Ord a, Lift a, NFData a, Show a, Hashable a) => String -> Int -> a -> t Source #
Generate indexed symbolic constants with some extra information for disambiguation.
Two symbolic constants with the same name and index but different extra information (including info with different types) are considered to be different.
>>>
iinfosym "a" 1 "someInfo" :: SymInteger
a@1:"someInfo"