Module Language.SMTLIB.Types

This module provides an abstract representation of the SMT-LIB language. The implementation is based on the SMT-LIB Standard 2.6 (http://smtlib.cs.uiowa.edu/papers/smt-lib-reference-v2.6-r2017-07-18.pdf) and covers most parts of the language description.

Author: Jan Tikovsky

Version: December 2017

Summary of exported operations:

Exported datatypes:


SMTLib

Representation of an SMT-LIB script

Constructors:


Symbol

Type synonym: Symbol = String


Ident

Type synonym: Ident = String


Numeral

Type synonym: Numeral = Int


Keyword

Constructors:


SpecConstant

S-expressions

Constructors:

  • Num :: Numeral -> SpecConstant
  • Dec :: Float -> SpecConstant
  • Str :: String -> SpecConstant

SExpr

Constructors:


Sort

Sorts

Constructors:


AttrValue

Attributes

Constructors:


Attribute

Constructors:


QIdent

Terms

Constructors:


SortedVar

Constructors:


Pattern

Constructors:


Term

Constructors:


SortSymDecl

Theories

Constructors:


MetaSpecConstant

Constructors:

  • NUMERAL :: MetaSpecConstant
  • DECIMAL :: MetaSpecConstant
  • STRING :: MetaSpecConstant

FunSymDecl

Constructors:


ParFunSymDecl

Constructors:


TheoryAttr

Constructors:

  • TASorts :: [SortSymDecl] -> TheoryAttr
  • TAFuns :: [ParFunSymDecl] -> TheoryAttr
  • TASortsDesc :: String -> TheoryAttr
  • TAFunsDesc :: String -> TheoryAttr
  • TADefinition :: String -> TheoryAttr
  • TAValues :: String -> TheoryAttr
  • TANotes :: String -> TheoryAttr
  • TA :: Attribute -> TheoryAttr

Theory

Constructors:


InfoFlag

Info flags

Constructors:

  • AllStatistics :: InfoFlag
  • AssertionStackLevels :: InfoFlag
  • Authors :: InfoFlag
  • ErrorBehavior :: InfoFlag
  • Name :: InfoFlag
  • ReasonUnknown :: InfoFlag
  • Version :: InfoFlag
  • IFKW :: Keyword -> InfoFlag

Option

Command options

Constructors:

  • DiagnosticOutput :: String -> Option
  • GlobalDecls :: Bool -> Option
  • Interactive :: Bool -> Option
  • PrintSuccess :: Bool -> Option
  • ProduceAssertions :: Bool -> Option
  • ProduceAssign :: Bool -> Option
  • ProduceModels :: Bool -> Option
  • ProduceProofs :: Bool -> Option
  • ProduceUnsatAssump :: Bool -> Option
  • ProduceUnsatCores :: Bool -> Option
  • RandomSeed :: Numeral -> Option
  • RegularOutput :: String -> Option
  • ReproducibleResLimit :: Numeral -> Option
  • Verbosity :: Numeral -> Option
  • OptAttr :: Attribute -> Option

FunDec

Commands

Constructors:


FunDef

Constructors:


PropLit

Constructors:


SortDecl

sort declaration for datatypes

Constructors:


DTDecl

datatype declaration

Constructors:


ConsDecl

Constructors:


Command

Constructors:

  • Assert :: Term -> Command
  • CheckSat :: Command
  • CheckSatAssuming :: [PropLit] -> Command
  • DeclareConst :: Symbol -> Sort -> Command
  • DeclareDatatype :: Symbol -> DTDecl -> Command
  • DeclareDatatypes :: [(SortDecl,DTDecl)] -> Command
  • DeclareFun :: Symbol -> [Sort] -> Sort -> Command
  • DeclareSort :: Symbol -> Numeral -> Command
  • DefineFun :: FunDef -> Command
  • DefineFunRec :: FunDef -> Command
  • DefineFunsRec :: [(FunDec,Term)] -> Command
  • DefineSort :: Symbol -> [Symbol] -> Sort -> Command
  • Echo :: String -> Command
  • Exit :: Command
  • GetAssertions :: Command
  • GetAssignment :: Command
  • GetInfo :: InfoFlag -> Command
  • GetModel :: Command
  • GetOption :: Option -> Command
  • GetProof :: Command
  • GetUnsatAssumptions :: Command
  • GetUnsatCore :: Command
  • GetValue :: [Term] -> Command
  • Pop :: Numeral -> Command
  • Push :: Numeral -> Command
  • Reset :: Command
  • ResetAssertions :: Command
  • SetInfo :: Attribute -> Command
  • SetLogic :: Logic -> Command
  • SetOption :: Option -> Command
  • Comment :: String -> Command

Logic

Logics provided by the SMT-LIB Standard

Explanation of the naming conventions:

  • QF: restriction to quantifier free formulas
  • A or AX: theory of ArraysEx
  • BV: theory FixedSizeBitVectors
  • FP: theory FloatingPoint
  • IA: theory Ints (Integer Arithmetic)
  • RA: theory Reals (Real Arithmetic)
  • IRA: theory Reals_Ints (mixed Integer Real Arithmetic)
  • IDL: Integer Difference Logic
  • RDL: Rational Difference Logic
  • L before IA, RA or IRA: linear fragment of those arithmetics
  • N before IA, RA or IRA: non-linear fragment of those arithmetics
  • UF extension allowing free sort and function symbols

see http://smtlib.cs.uiowa.edu/logics.shtml for more details

Constructors:

  • ALL :: Logic
  • AUFLIA :: Logic
  • AUFLIRA :: Logic
  • AUFNIRA :: Logic
  • LIA :: Logic
  • LRA :: Logic
  • QFABV :: Logic
  • QFAUFBV :: Logic
  • QFAUFLIA :: Logic
  • QFAX :: Logic
  • QFBV :: Logic
  • QFIDL :: Logic
  • QFLIA :: Logic
  • QFLRA :: Logic
  • QFNIA :: Logic
  • QFNRA :: Logic
  • QFRDL :: Logic
  • QFUF :: Logic
  • QFUFBV :: Logic
  • QFUFIDL :: Logic
  • QFUFLIA :: Logic
  • QFUFLRA :: Logic
  • QFUFNRA :: Logic
  • UFLRA :: Logic
  • UFNIA :: Logic

ErrorBehavior

Command responses

Constructors:

  • ImmediateExit :: ErrorBehavior
  • ContinuedExecution :: ErrorBehavior

ReasonUnknown

Constructors:

  • Memout :: ReasonUnknown
  • Incomplete :: ReasonUnknown
  • SEReason :: SExpr -> ReasonUnknown

ModelRsp

Constructors:


InfoRsp

Constructors:

  • AssertionStackLevelsRsp :: Numeral -> InfoRsp
  • AuthorsRsp :: String -> InfoRsp
  • ErrorBehaviorRsp :: ErrorBehavior -> InfoRsp
  • NameRsp :: String -> InfoRsp
  • ReasonUnknownRsp :: ReasonUnknown -> InfoRsp
  • VersionRsp :: String -> InfoRsp
  • AttrRsp :: Attribute -> InfoRsp

ValuationPair

Type synonym: ValuationPair = (Term,Term)


TValuationPair

Type synonym: TValuationPair = (Symbol,Bool)


CmdResponse

Constructors:

  • SuccessRsp :: CmdResponse
  • UnsupportedRsp :: CmdResponse
  • ErrorRsp :: String -> CmdResponse
  • CheckSatRsp :: CheckSat -> CmdResponse
  • EchoRsp :: String -> CmdResponse
  • GetAssertionsRsp :: [Term] -> CmdResponse
  • GetAssignmentRsp :: [TValuationPair] -> CmdResponse
  • GetInfoRsp :: [InfoRsp] -> CmdResponse
  • GetModelRsp :: [ModelRsp] -> CmdResponse
  • GetOptionRsp :: AttrValue -> CmdResponse
  • GetProofRsp :: SExpr -> CmdResponse
  • GetUnsatAssumptionsRsp :: [Symbol] -> CmdResponse
  • GetUnsatCoreRsp :: [Symbol] -> CmdResponse
  • GetValueRsp :: [ValuationPair] -> CmdResponse

CheckSat

Constructors:

  • Sat :: CheckSat
  • Unsat :: CheckSat
  • Unknown :: CheckSat

Exported operations: