smt2-parser-0.1.0.1: A Haskell parser for SMT-LIB version 2.6
Safe HaskellSafe
LanguageHaskell2010

Language.SMT2.Syntax

Description

  • Module : Language.SMT2.Syntax
  • Description : SMT language parser
  • Maintainer : ubikium@gmail.com
  • Stability : experimental
Synopsis

Lexicons (Sec. 3.1)

type Numeral = Text Source #

type Decimal = Text Source #

type Hexadecimal = Text Source #

type Binary = Text Source #

type StringLiteral = Text Source #

type ReservedWord = Text Source #

type Symbol = Text Source #

type Keyword = Text Source #

S-expressions (Sec. 3.2)

data SpecConstant Source #

Instances

Instances details
Eq SpecConstant Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: SpecConstant -> SpecConstant -> Bool

(/=) :: SpecConstant -> SpecConstant -> Bool

Show SpecConstant Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> SpecConstant -> ShowS

show :: SpecConstant -> String

showList :: [SpecConstant] -> ShowS

data SExpr Source #

Instances

Instances details
Eq SExpr Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: SExpr -> SExpr -> Bool

(/=) :: SExpr -> SExpr -> Bool

Show SExpr Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> SExpr -> ShowS

show :: SExpr -> String

showList :: [SExpr] -> ShowS

SpecificSuccessRes SExpr Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st SExpr Source #

type SList = [SExpr] Source #

Identifiers (Sec 3.3)

data Index Source #

Instances

Instances details
Eq Index Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: Index -> Index -> Bool

(/=) :: Index -> Index -> Bool

Show Index Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> Index -> ShowS

show :: Index -> String

showList :: [Index] -> ShowS

data Identifier Source #

Constructors

IdSymbol Symbol 
IdIndexed Symbol (NonEmpty Index) 

Instances

Instances details
Eq Identifier Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: Identifier -> Identifier -> Bool

(/=) :: Identifier -> Identifier -> Bool

Show Identifier Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> Identifier -> ShowS

show :: Identifier -> String

showList :: [Identifier] -> ShowS

Attributes (Sec. 3.4)

data AttributeValue Source #

Instances

Instances details
Eq AttributeValue Source # 
Instance details

Defined in Language.SMT2.Syntax

Show AttributeValue Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> AttributeValue -> ShowS

show :: AttributeValue -> String

showList :: [AttributeValue] -> ShowS

SpecificSuccessRes AttributeValue Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st AttributeValue Source #

data Attribute Source #

Instances

Instances details
Eq Attribute Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: Attribute -> Attribute -> Bool

(/=) :: Attribute -> Attribute -> Bool

Show Attribute Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> Attribute -> ShowS

show :: Attribute -> String

showList :: [Attribute] -> ShowS

Sorts (Sec 3.5)

data Sort Source #

Instances

Instances details
Eq Sort Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: Sort -> Sort -> Bool

(/=) :: Sort -> Sort -> Bool

Show Sort Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> Sort -> ShowS

show :: Sort -> String

showList :: [Sort] -> ShowS

Terms and Formulas (Sec 3.6)

data QualIdentifier Source #

Instances

Instances details
Eq QualIdentifier Source # 
Instance details

Defined in Language.SMT2.Syntax

Show QualIdentifier Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> QualIdentifier -> ShowS

show :: QualIdentifier -> String

showList :: [QualIdentifier] -> ShowS

data VarBinding Source #

Constructors

VarBinding Symbol Term 

Instances

Instances details
Eq VarBinding Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: VarBinding -> VarBinding -> Bool

(/=) :: VarBinding -> VarBinding -> Bool

Show VarBinding Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> VarBinding -> ShowS

show :: VarBinding -> String

showList :: [VarBinding] -> ShowS

data SortedVar Source #

Constructors

SortedVar Symbol Sort 

Instances

Instances details
Eq SortedVar Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: SortedVar -> SortedVar -> Bool

(/=) :: SortedVar -> SortedVar -> Bool

Show SortedVar Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> SortedVar -> ShowS

show :: SortedVar -> String

showList :: [SortedVar] -> ShowS

data MatchPattern Source #

Constructors

MPVariable Symbol 
MPConstructor Symbol (NonEmpty Symbol) 

Instances

Instances details
Eq MatchPattern Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: MatchPattern -> MatchPattern -> Bool

(/=) :: MatchPattern -> MatchPattern -> Bool

Show MatchPattern Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> MatchPattern -> ShowS

show :: MatchPattern -> String

showList :: [MatchPattern] -> ShowS

data MatchCase Source #

Instances

Instances details
Eq MatchCase Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: MatchCase -> MatchCase -> Bool

(/=) :: MatchCase -> MatchCase -> Bool

Show MatchCase Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> MatchCase -> ShowS

show :: MatchCase -> String

showList :: [MatchCase] -> ShowS

data Term Source #

Instances

Instances details
Eq Term Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: Term -> Term -> Bool

(/=) :: Term -> Term -> Bool

Show Term Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> Term -> ShowS

show :: Term -> String

showList :: [Term] -> ShowS

SpecificSuccessRes [Term] Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st [Term] Source #

SpecificSuccessRes (NonEmpty ValuationPair) Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st (NonEmpty ValuationPair) Source #

Theory declarations (Sec 3.7)

data SortSymbolDecl Source #

Instances

Instances details
Eq SortSymbolDecl Source # 
Instance details

Defined in Language.SMT2.Syntax

Show SortSymbolDecl Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> SortSymbolDecl -> ShowS

show :: SortSymbolDecl -> String

showList :: [SortSymbolDecl] -> ShowS

data MetaSpecConstant Source #

Instances

Instances details
Eq MetaSpecConstant Source # 
Instance details

Defined in Language.SMT2.Syntax

Show MetaSpecConstant Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> MetaSpecConstant -> ShowS

show :: MetaSpecConstant -> String

showList :: [MetaSpecConstant] -> ShowS

data FunSymbolDecl Source #

Instances

Instances details
Eq FunSymbolDecl Source # 
Instance details

Defined in Language.SMT2.Syntax

Show FunSymbolDecl Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> FunSymbolDecl -> ShowS

show :: FunSymbolDecl -> String

showList :: [FunSymbolDecl] -> ShowS

data ParFunSymbolDecl Source #

Constructors

NonPar FunSymbolDecl

non-parametric

Par (NonEmpty Symbol) Identifier (NonEmpty Sort) [Attribute]

parametric

Instances

Instances details
Eq ParFunSymbolDecl Source # 
Instance details

Defined in Language.SMT2.Syntax

Show ParFunSymbolDecl Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> ParFunSymbolDecl -> ShowS

show :: ParFunSymbolDecl -> String

showList :: [ParFunSymbolDecl] -> ShowS

data TheoryDecl Source #

Constructors

TheoryDecl Symbol (NonEmpty TheoryAttribute) 

Instances

Instances details
Eq TheoryDecl Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: TheoryDecl -> TheoryDecl -> Bool

(/=) :: TheoryDecl -> TheoryDecl -> Bool

Show TheoryDecl Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> TheoryDecl -> ShowS

show :: TheoryDecl -> String

showList :: [TheoryDecl] -> ShowS

Logic Declarations (Sec 3.8)

data LogicAttribute Source #

Instances

Instances details
Eq LogicAttribute Source # 
Instance details

Defined in Language.SMT2.Syntax

Show LogicAttribute Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> LogicAttribute -> ShowS

show :: LogicAttribute -> String

showList :: [LogicAttribute] -> ShowS

data Logic Source #

Constructors

Logic Symbol (NonEmpty LogicAttribute) 

Instances

Instances details
Eq Logic Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: Logic -> Logic -> Bool

(/=) :: Logic -> Logic -> Bool

Show Logic Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> Logic -> ShowS

show :: Logic -> String

showList :: [Logic] -> ShowS

Scripts (Sec 3.9)

data SortDec Source #

Constructors

SortDec Symbol Numeral 

Instances

Instances details
Eq SortDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: SortDec -> SortDec -> Bool

(/=) :: SortDec -> SortDec -> Bool

Show SortDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> SortDec -> ShowS

show :: SortDec -> String

showList :: [SortDec] -> ShowS

data SelectorDec Source #

Constructors

SelectorDec Symbol Sort 

Instances

Instances details
Eq SelectorDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: SelectorDec -> SelectorDec -> Bool

(/=) :: SelectorDec -> SelectorDec -> Bool

Show SelectorDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> SelectorDec -> ShowS

show :: SelectorDec -> String

showList :: [SelectorDec] -> ShowS

data ConstructorDec Source #

Instances

Instances details
Eq ConstructorDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Show ConstructorDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> ConstructorDec -> ShowS

show :: ConstructorDec -> String

showList :: [ConstructorDec] -> ShowS

data DatatypeDec Source #

Constructors

DDNonparametric (NonEmpty ConstructorDec) 
DDParametric (NonEmpty Symbol) (NonEmpty ConstructorDec) 

Instances

Instances details
Eq DatatypeDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: DatatypeDec -> DatatypeDec -> Bool

(/=) :: DatatypeDec -> DatatypeDec -> Bool

Show DatatypeDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> DatatypeDec -> ShowS

show :: DatatypeDec -> String

showList :: [DatatypeDec] -> ShowS

data FunctionDec Source #

Instances

Instances details
Eq FunctionDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: FunctionDec -> FunctionDec -> Bool

(/=) :: FunctionDec -> FunctionDec -> Bool

Show FunctionDec Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> FunctionDec -> ShowS

show :: FunctionDec -> String

showList :: [FunctionDec] -> ShowS

data FunctionDef Source #

Instances

Instances details
Eq FunctionDef Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: FunctionDef -> FunctionDef -> Bool

(/=) :: FunctionDef -> FunctionDef -> Bool

Show FunctionDef Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> FunctionDef -> ShowS

show :: FunctionDef -> String

showList :: [FunctionDef] -> ShowS

data PropLiteral Source #

Instances

Instances details
Eq PropLiteral Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: PropLiteral -> PropLiteral -> Bool

(/=) :: PropLiteral -> PropLiteral -> Bool

Show PropLiteral Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> PropLiteral -> ShowS

show :: PropLiteral -> String

showList :: [PropLiteral] -> ShowS

data BValue Source #

Constructors

BTrue 
BFalse 

Instances

Instances details
Eq BValue Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: BValue -> BValue -> Bool

(/=) :: BValue -> BValue -> Bool

Show BValue Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> BValue -> ShowS

show :: BValue -> String

showList :: [BValue] -> ShowS

SpecificSuccessRes [TValuationPair] Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st [TValuationPair] Source #

data InfoFlag Source #

Instances

Instances details
Eq InfoFlag Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: InfoFlag -> InfoFlag -> Bool

(/=) :: InfoFlag -> InfoFlag -> Bool

Show InfoFlag Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> InfoFlag -> ShowS

show :: InfoFlag -> String

showList :: [InfoFlag] -> ShowS

Responses (Sec 3.9.1)

data ResErrorBehavior Source #

Instances

Instances details
Eq ResErrorBehavior Source # 
Instance details

Defined in Language.SMT2.Syntax

Show ResErrorBehavior Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> ResErrorBehavior -> ShowS

show :: ResErrorBehavior -> String

showList :: [ResErrorBehavior] -> ShowS

data ResReasonUnknown Source #

Instances

Instances details
Eq ResReasonUnknown Source # 
Instance details

Defined in Language.SMT2.Syntax

Show ResReasonUnknown Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> ResReasonUnknown -> ShowS

show :: ResReasonUnknown -> String

showList :: [ResReasonUnknown] -> ShowS

data ResModel Source #

Constructors

RMDefineFun FunctionDef 
RMDefineFunRec FunctionDef 
RMDefineFunsRec (NonEmpty FunctionDec) (NonEmpty Term)

same number

Instances

Instances details
SpecificSuccessRes ResModel Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st ResModel Source #

data ResInfo Source #

Instances

Instances details
Eq ResInfo Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: ResInfo -> ResInfo -> Bool

(/=) :: ResInfo -> ResInfo -> Bool

Show ResInfo Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> ResInfo -> ShowS

show :: ResInfo -> String

showList :: [ResInfo] -> ShowS

SpecificSuccessRes (NonEmpty ResInfo) Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st (NonEmpty ResInfo) Source #

data ResCheckSat Source #

Constructors

Sat 
Unsat 
Unknown 

Instances

Instances details
Eq ResCheckSat Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: ResCheckSat -> ResCheckSat -> Bool

(/=) :: ResCheckSat -> ResCheckSat -> Bool

Show ResCheckSat Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> ResCheckSat -> ShowS

show :: ResCheckSat -> String

showList :: [ResCheckSat] -> ShowS

SpecificSuccessRes ResCheckSat Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st ResCheckSat Source #

instances

data GeneralRes res Source #

Instances

Instances details
Eq res => Eq (GeneralRes res) Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

(==) :: GeneralRes res -> GeneralRes res -> Bool

(/=) :: GeneralRes res -> GeneralRes res -> Bool

Show res => Show (GeneralRes res) Source # 
Instance details

Defined in Language.SMT2.Syntax

Methods

showsPrec :: Int -> GeneralRes res -> ShowS

show :: GeneralRes res -> String

showList :: [GeneralRes res] -> ShowS

class SpecificSuccessRes s where Source #

Methods

specificSuccessRes :: GenParser st s Source #

Instances

Instances details
SpecificSuccessRes ResCheckSat Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st ResCheckSat Source #

SpecificSuccessRes ResModel Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st ResModel Source #

SpecificSuccessRes AttributeValue Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st AttributeValue Source #

SpecificSuccessRes SExpr Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st SExpr Source #

SpecificSuccessRes StringLiteral Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st StringLiteral Source #

SpecificSuccessRes [TValuationPair] Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st [TValuationPair] Source #

SpecificSuccessRes [Term] Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st [Term] Source #

SpecificSuccessRes [Symbol] Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st [Symbol] Source #

SpecificSuccessRes (NonEmpty ValuationPair) Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st (NonEmpty ValuationPair) Source #

SpecificSuccessRes (NonEmpty ResInfo) Source # 
Instance details

Defined in Language.SMT2.Parser

Methods

specificSuccessRes :: GenParser st (NonEmpty ResInfo) Source #