sbv-13.1: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.
Copyright(c) Levent Erkok
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Documentation.SBV.Examples.Uninterpreted.Sort

Description

Demonstrates uninterpreted sorts, together with axioms.

Synopsis

Documentation

data Q Source #

A new data-type that we expect to use in an uninterpreted fashion in the backend SMT solver.

Instances

Instances details
Arbitrary Q Source # 
Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.Sort

Methods

arbitrary :: Gen Q #

shrink :: Q -> [Q] #

SymVal Q Source # 
Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.Sort

HasKind Q Source # 
Instance details

Defined in Documentation.SBV.Examples.Uninterpreted.Sort

cv2Q :: String -> [CV] -> Q Source #

Conversion from SMT values to Q values.

_undefiner_Q :: a Source #

Autogenerated definition to avoid unused-variable warnings from GHC.

type SQ = SBV Q Source #

Symbolic version of the type Q.

f :: SQ -> SQ Source #

Declare an uninterpreted function that works over Q's

t1 :: IO SatResult Source #

A satisfiable example, stating that there is an element of the domain Q such that f returns a different element. Note that this is valid only when the domain Q has at least two elements. We have:

>>> t1
Satisfiable. Model:
  x = Q_0 :: Q

  f :: Q -> Q
  f _ = Q_1

t2 :: IO SatResult Source #

This is a variant on the first example, except we also add an axiom for the sort, stating that the domain Q has only one element. In this case the problem naturally becomes unsat. We have:

>>> t2
Unsatisfiable