smtlib2-1.0: A type-safe interface to communicate with an SMT solver.

Safe HaskellNone
LanguageHaskell98

Language.SMTLib2.Internals.TH

Synopsis

Documentation

natLength :: [a] -> Nat Source

data THExpression Source

Constructors

THExpr 

expr :: QuasiQuoter Source

This quasiquoter can be used to generate SMTLib2 expressions or pattern matches. For example, to assert the fact that variable x is equal to variable y we can use

[expr| (= x y) |] >>= assert

To perform pattern matching against an expression e, we can use:

analyze e >>= \re -> case re of
  [expr| (+ x y) |] -> ...

Types can also be generated using for example:

myExpr :: Backend b => SMT b (Expr b [expr| (Array Int Bool) |])
myExpr = [expr| ((as const (Array Int Bool)) False) |]

entypeExpr :: Proxy (t :: Type) -> e t -> e t Source

enforceTypes :: Proxy tps -> (List e tps -> a) -> List e tps -> a Source

asSig :: Proxy sig -> (List e sig -> a) -> List e sig -> a Source

distinct' :: Embed m e => [e t] -> m (e BoolType) Source

arith' :: (Embed m e, SMTArith t) => ArithOp -> [e t] -> m (e t) Source

logic' :: Embed m e => LogicOp -> [e BoolType] -> m (e BoolType) Source

and' :: Embed m e => [e BoolType] -> m (e BoolType) Source

or' :: Embed m e => [e BoolType] -> m (e BoolType) Source

xor' :: Embed m e => [e BoolType] -> m (e BoolType) Source

implies' :: Embed m e => [e BoolType] -> m (e BoolType) Source

plus' :: (Embed m e, SMTArith t) => [e t] -> m (e t) Source

minus' :: (Embed m e, SMTArith t) => [e t] -> m (e t) Source

mult' :: (Embed m e, SMTArith t) => [e t] -> m (e t) Source