Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- Module : Language.SMT2.Syntax
- Description : SMT language parser
- Maintainer : ubikium@gmail.com
- Stability : experimental
Synopsis
- type Numeral = Text
- type Decimal = Text
- type Hexadecimal = Text
- type Binary = Text
- type StringLiteral = Text
- type ReservedWord = Text
- type Symbol = Text
- type Keyword = Text
- data SpecConstant
- data SExpr
- type SList = [SExpr]
- data Index
- data Identifier
- data AttributeValue
- data Attribute
- data Sort
- data QualIdentifier
- data VarBinding = VarBinding Symbol Term
- data SortedVar = SortedVar Symbol Sort
- data MatchPattern
- data MatchCase = MatchCase MatchPattern Term
- data Term
- = TermSpecConstant SpecConstant
- | TermQualIdentifier QualIdentifier
- | TermApplication QualIdentifier (NonEmpty Term)
- | TermLet (NonEmpty VarBinding) Term
- | TermForall (NonEmpty SortedVar) Term
- | TermExists (NonEmpty SortedVar) Term
- | TermMatch Term (NonEmpty MatchCase)
- | TermAnnotation Term (NonEmpty Attribute)
- data SortSymbolDecl = SortSymbolDecl Identifier Numeral [Attribute]
- data MetaSpecConstant
- data FunSymbolDecl
- data ParFunSymbolDecl
- = NonPar FunSymbolDecl
- | Par (NonEmpty Symbol) Identifier (NonEmpty Sort) [Attribute]
- data TheoryAttribute
- data TheoryDecl = TheoryDecl Symbol (NonEmpty TheoryAttribute)
- data LogicAttribute
- data Logic = Logic Symbol (NonEmpty LogicAttribute)
- data SortDec = SortDec Symbol Numeral
- data SelectorDec = SelectorDec Symbol Sort
- data ConstructorDec = ConstructorDec Symbol [SelectorDec]
- data DatatypeDec
- data FunctionDec = FunctionDec Symbol [SortedVar] Sort
- data FunctionDef = FunctionDef Symbol [SortedVar] Sort Term
- data PropLiteral
- data Command
- = Assert Term
- | CheckSat
- | CheckSatAssuming [PropLiteral]
- | DeclareConst Symbol Sort
- | DeclareDatatype Symbol DatatypeDec
- | DeclareDatatypes (NonEmpty SortDec) (NonEmpty DatatypeDec)
- | DeclareFun Symbol [Sort] Sort
- | DeclareSort Symbol Numeral
- | DefineFun FunctionDef
- | DefineFunRec FunctionDef
- | DefineFunsRec (NonEmpty FunctionDec) (NonEmpty Term)
- | DefineSort Symbol [Symbol] Sort
- | Echo StringLiteral
- | Exit
- | GetAssertions
- | GetAssignment
- | GetInfo InfoFlag
- | GetModel
- | GetOption Keyword
- | GetProof
- | GetUnsatAssumptions
- | GetUnsatCore
- | GetValue (NonEmpty Term)
- | Pop Numeral
- | Push Numeral
- | Reset
- | ResetAssertions
- | SetInfo Attribute
- | SetLogic Symbol
- | SetOption ScriptOption
- type Script = [Command]
- data BValue
- data ScriptOption
- = DiagnosticOutputChannel StringLiteral
- | GlobalDeclarations BValue
- | InteractiveMode BValue
- | PrintSuccess BValue
- | ProduceAssertions BValue
- | ProduceAssignments BValue
- | ProduceModels BValue
- | ProduceProofs BValue
- | ProduceUnsatAssumptions BValue
- | ProduceUnsatCores BValue
- | RandomSeed Numeral
- | RegularOutputChannel StringLiteral
- | ReproducibleResourceLimit Numeral
- | Verbosity Numeral
- | OptionAttr Attribute
- data InfoFlag
- data ResErrorBehavior
- data ResReasonUnknown
- data ResModel
- data ResInfo
- type ValuationPair = (Term, Term)
- type TValuationPair = (Symbol, BValue)
- data ResCheckSat
- type CheckSatRes = GeneralRes ResCheckSat
- type EchoRes = GeneralRes StringLiteral
- type GetAssertionsRes = GeneralRes [Term]
- type GetAssignmentRes = GeneralRes [TValuationPair]
- type GetInfoRes = GeneralRes (NonEmpty ResInfo)
- type GetModelRes = GeneralRes ResModel
- type GetOptionRes = GeneralRes AttributeValue
- type GetProofRes = GeneralRes SExpr
- type GetUnsatAssumpRes = GeneralRes [Symbol]
- type GetUnsatCoreRes = GeneralRes [Symbol]
- type GetValueRes = GeneralRes (NonEmpty ValuationPair)
- data GeneralRes res
- class SpecificSuccessRes s where
- specificSuccessRes :: GenParser st s
Lexicons (Sec. 3.1)
type Hexadecimal = Text Source #
type StringLiteral = Text Source #
type ReservedWord = Text Source #
S-expressions (Sec. 3.2)
data SpecConstant Source #
SCNumeral Numeral | |
SCDecimal Decimal | |
SCHexadecimal Hexadecimal | |
SCBinary Binary | |
SCString StringLiteral |
Instances
Show SpecConstant Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> SpecConstant -> ShowS # show :: SpecConstant -> String # showList :: [SpecConstant] -> ShowS # | |
Eq SpecConstant Source # | |
Defined in Language.SMT2.Syntax (==) :: SpecConstant -> SpecConstant -> Bool # (/=) :: SpecConstant -> SpecConstant -> Bool # |
Identifiers (Sec 3.3)
data Identifier Source #
Instances
Show Identifier Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> Identifier -> ShowS # show :: Identifier -> String # showList :: [Identifier] -> ShowS # | |
Eq Identifier Source # | |
Defined in Language.SMT2.Syntax (==) :: Identifier -> Identifier -> Bool # (/=) :: Identifier -> Identifier -> Bool # |
Attributes (Sec. 3.4)
data AttributeValue Source #
Instances
Show AttributeValue Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> AttributeValue -> ShowS # show :: AttributeValue -> String # showList :: [AttributeValue] -> ShowS # | |
Eq AttributeValue Source # | |
Defined in Language.SMT2.Syntax (==) :: AttributeValue -> AttributeValue -> Bool # (/=) :: AttributeValue -> AttributeValue -> Bool # | |
SpecificSuccessRes AttributeValue Source # | |
Defined in Language.SMT2.Parser |
Instances
Sorts (Sec 3.5)
Terms and Formulas (Sec 3.6)
data QualIdentifier Source #
Instances
Show QualIdentifier Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> QualIdentifier -> ShowS # show :: QualIdentifier -> String # showList :: [QualIdentifier] -> ShowS # | |
Eq QualIdentifier Source # | |
Defined in Language.SMT2.Syntax (==) :: QualIdentifier -> QualIdentifier -> Bool # (/=) :: QualIdentifier -> QualIdentifier -> Bool # |
data VarBinding Source #
Instances
Show VarBinding Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> VarBinding -> ShowS # show :: VarBinding -> String # showList :: [VarBinding] -> ShowS # | |
Eq VarBinding Source # | |
Defined in Language.SMT2.Syntax (==) :: VarBinding -> VarBinding -> Bool # (/=) :: VarBinding -> VarBinding -> Bool # |
Instances
data MatchPattern Source #
Instances
Show MatchPattern Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> MatchPattern -> ShowS # show :: MatchPattern -> String # showList :: [MatchPattern] -> ShowS # | |
Eq MatchPattern Source # | |
Defined in Language.SMT2.Syntax (==) :: MatchPattern -> MatchPattern -> Bool # (/=) :: MatchPattern -> MatchPattern -> Bool # |
Instances
Instances
Show Term Source # | |
Eq Term Source # | |
SpecificSuccessRes (NonEmpty ValuationPair) Source # | |
Defined in Language.SMT2.Parser | |
SpecificSuccessRes [Term] Source # | |
Defined in Language.SMT2.Parser specificSuccessRes :: GenParser st [Term] Source # |
Theory declarations (Sec 3.7)
data SortSymbolDecl Source #
Instances
Show SortSymbolDecl Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> SortSymbolDecl -> ShowS # show :: SortSymbolDecl -> String # showList :: [SortSymbolDecl] -> ShowS # | |
Eq SortSymbolDecl Source # | |
Defined in Language.SMT2.Syntax (==) :: SortSymbolDecl -> SortSymbolDecl -> Bool # (/=) :: SortSymbolDecl -> SortSymbolDecl -> Bool # |
data MetaSpecConstant Source #
Instances
Show MetaSpecConstant Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> MetaSpecConstant -> ShowS # show :: MetaSpecConstant -> String # showList :: [MetaSpecConstant] -> ShowS # | |
Eq MetaSpecConstant Source # | |
Defined in Language.SMT2.Syntax (==) :: MetaSpecConstant -> MetaSpecConstant -> Bool # (/=) :: MetaSpecConstant -> MetaSpecConstant -> Bool # |
data FunSymbolDecl Source #
FunConstant SpecConstant Sort [Attribute] | |
FunMeta MetaSpecConstant Sort [Attribute] | |
FunIdentifier Identifier (NonEmpty Sort) [Attribute] | potentially overloaded |
Instances
Show FunSymbolDecl Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> FunSymbolDecl -> ShowS # show :: FunSymbolDecl -> String # showList :: [FunSymbolDecl] -> ShowS # | |
Eq FunSymbolDecl Source # | |
Defined in Language.SMT2.Syntax (==) :: FunSymbolDecl -> FunSymbolDecl -> Bool # (/=) :: FunSymbolDecl -> FunSymbolDecl -> Bool # |
data ParFunSymbolDecl Source #
NonPar FunSymbolDecl | non-parametric |
Par (NonEmpty Symbol) Identifier (NonEmpty Sort) [Attribute] | parametric |
Instances
Show ParFunSymbolDecl Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> ParFunSymbolDecl -> ShowS # show :: ParFunSymbolDecl -> String # showList :: [ParFunSymbolDecl] -> ShowS # | |
Eq ParFunSymbolDecl Source # | |
Defined in Language.SMT2.Syntax (==) :: ParFunSymbolDecl -> ParFunSymbolDecl -> Bool # (/=) :: ParFunSymbolDecl -> ParFunSymbolDecl -> Bool # |
data TheoryAttribute Source #
Instances
Show TheoryAttribute Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> TheoryAttribute -> ShowS # show :: TheoryAttribute -> String # showList :: [TheoryAttribute] -> ShowS # | |
Eq TheoryAttribute Source # | |
Defined in Language.SMT2.Syntax (==) :: TheoryAttribute -> TheoryAttribute -> Bool # (/=) :: TheoryAttribute -> TheoryAttribute -> Bool # |
data TheoryDecl Source #
Instances
Show TheoryDecl Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> TheoryDecl -> ShowS # show :: TheoryDecl -> String # showList :: [TheoryDecl] -> ShowS # | |
Eq TheoryDecl Source # | |
Defined in Language.SMT2.Syntax (==) :: TheoryDecl -> TheoryDecl -> Bool # (/=) :: TheoryDecl -> TheoryDecl -> Bool # |
Logic Declarations (Sec 3.8)
data LogicAttribute Source #
LATheories (NonEmpty Symbol) | |
LALanguage StringLiteral | |
LAExtensions StringLiteral | |
LAValues StringLiteral | |
LANotes StringLiteral | |
LAAttr Attribute |
Instances
Show LogicAttribute Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> LogicAttribute -> ShowS # show :: LogicAttribute -> String # showList :: [LogicAttribute] -> ShowS # | |
Eq LogicAttribute Source # | |
Defined in Language.SMT2.Syntax (==) :: LogicAttribute -> LogicAttribute -> Bool # (/=) :: LogicAttribute -> LogicAttribute -> Bool # |
Scripts (Sec 3.9)
data SelectorDec Source #
Instances
Show SelectorDec Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> SelectorDec -> ShowS # show :: SelectorDec -> String # showList :: [SelectorDec] -> ShowS # | |
Eq SelectorDec Source # | |
Defined in Language.SMT2.Syntax (==) :: SelectorDec -> SelectorDec -> Bool # (/=) :: SelectorDec -> SelectorDec -> Bool # |
data ConstructorDec Source #
Instances
Show ConstructorDec Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> ConstructorDec -> ShowS # show :: ConstructorDec -> String # showList :: [ConstructorDec] -> ShowS # | |
Eq ConstructorDec Source # | |
Defined in Language.SMT2.Syntax (==) :: ConstructorDec -> ConstructorDec -> Bool # (/=) :: ConstructorDec -> ConstructorDec -> Bool # |
data DatatypeDec Source #
Instances
Show DatatypeDec Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> DatatypeDec -> ShowS # show :: DatatypeDec -> String # showList :: [DatatypeDec] -> ShowS # | |
Eq DatatypeDec Source # | |
Defined in Language.SMT2.Syntax (==) :: DatatypeDec -> DatatypeDec -> Bool # (/=) :: DatatypeDec -> DatatypeDec -> Bool # |
data FunctionDec Source #
Instances
Show FunctionDec Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> FunctionDec -> ShowS # show :: FunctionDec -> String # showList :: [FunctionDec] -> ShowS # | |
Eq FunctionDec Source # | |
Defined in Language.SMT2.Syntax (==) :: FunctionDec -> FunctionDec -> Bool # (/=) :: FunctionDec -> FunctionDec -> Bool # |
data FunctionDef Source #
Instances
Show FunctionDef Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> FunctionDef -> ShowS # show :: FunctionDef -> String # showList :: [FunctionDef] -> ShowS # | |
Eq FunctionDef Source # | |
Defined in Language.SMT2.Syntax (==) :: FunctionDef -> FunctionDef -> Bool # (/=) :: FunctionDef -> FunctionDef -> Bool # |
data PropLiteral Source #
Instances
Show PropLiteral Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> PropLiteral -> ShowS # show :: PropLiteral -> String # showList :: [PropLiteral] -> ShowS # | |
Eq PropLiteral Source # | |
Defined in Language.SMT2.Syntax (==) :: PropLiteral -> PropLiteral -> Bool # (/=) :: PropLiteral -> PropLiteral -> Bool # |
Instances
Show BValue Source # | |
Eq BValue Source # | |
SpecificSuccessRes [TValuationPair] Source # | |
Defined in Language.SMT2.Parser specificSuccessRes :: GenParser st [TValuationPair] Source # |
data ScriptOption Source #
Instances
Show ScriptOption Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> ScriptOption -> ShowS # show :: ScriptOption -> String # showList :: [ScriptOption] -> ShowS # | |
Eq ScriptOption Source # | |
Defined in Language.SMT2.Syntax (==) :: ScriptOption -> ScriptOption -> Bool # (/=) :: ScriptOption -> ScriptOption -> Bool # |
Responses (Sec 3.9.1)
data ResErrorBehavior Source #
Instances
Show ResErrorBehavior Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> ResErrorBehavior -> ShowS # show :: ResErrorBehavior -> String # showList :: [ResErrorBehavior] -> ShowS # | |
Eq ResErrorBehavior Source # | |
Defined in Language.SMT2.Syntax (==) :: ResErrorBehavior -> ResErrorBehavior -> Bool # (/=) :: ResErrorBehavior -> ResErrorBehavior -> Bool # |
data ResReasonUnknown Source #
Instances
Show ResReasonUnknown Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> ResReasonUnknown -> ShowS # show :: ResReasonUnknown -> String # showList :: [ResReasonUnknown] -> ShowS # | |
Eq ResReasonUnknown Source # | |
Defined in Language.SMT2.Syntax (==) :: ResReasonUnknown -> ResReasonUnknown -> Bool # (/=) :: ResReasonUnknown -> ResReasonUnknown -> Bool # |
RMDefineFun FunctionDef | |
RMDefineFunRec FunctionDef | |
RMDefineFunsRec (NonEmpty FunctionDec) (NonEmpty Term) | same number |
Instances
SpecificSuccessRes ResModel Source # | |
Defined in Language.SMT2.Parser |
IRErrorBehaviour ResErrorBehavior | |
IRName StringLiteral | |
IRAuthours StringLiteral | |
IRVersion StringLiteral | |
IRReasonUnknown ResReasonUnknown | |
IRAttr Attribute |
type ValuationPair = (Term, Term) Source #
type TValuationPair = (Symbol, BValue) Source #
data ResCheckSat Source #
Instances
Show ResCheckSat Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> ResCheckSat -> ShowS # show :: ResCheckSat -> String # showList :: [ResCheckSat] -> ShowS # | |
Eq ResCheckSat Source # | |
Defined in Language.SMT2.Syntax (==) :: ResCheckSat -> ResCheckSat -> Bool # (/=) :: ResCheckSat -> ResCheckSat -> Bool # | |
SpecificSuccessRes ResCheckSat Source # | |
Defined in Language.SMT2.Parser |
instances
type CheckSatRes = GeneralRes ResCheckSat Source #
type EchoRes = GeneralRes StringLiteral Source #
type GetAssertionsRes = GeneralRes [Term] Source #
type GetAssignmentRes = GeneralRes [TValuationPair] Source #
type GetInfoRes = GeneralRes (NonEmpty ResInfo) Source #
type GetModelRes = GeneralRes ResModel Source #
type GetOptionRes = GeneralRes AttributeValue Source #
type GetProofRes = GeneralRes SExpr Source #
type GetUnsatAssumpRes = GeneralRes [Symbol] Source #
type GetUnsatCoreRes = GeneralRes [Symbol] Source #
type GetValueRes = GeneralRes (NonEmpty ValuationPair) Source #
data GeneralRes res Source #
Instances
Show res => Show (GeneralRes res) Source # | |
Defined in Language.SMT2.Syntax showsPrec :: Int -> GeneralRes res -> ShowS # show :: GeneralRes res -> String # showList :: [GeneralRes res] -> ShowS # | |
Eq res => Eq (GeneralRes res) Source # | |
Defined in Language.SMT2.Syntax (==) :: GeneralRes res -> GeneralRes res -> Bool # (/=) :: GeneralRes res -> GeneralRes res -> Bool # |
class SpecificSuccessRes s where Source #
specificSuccessRes :: GenParser st s Source #
Instances
SpecificSuccessRes AttributeValue Source # | |
Defined in Language.SMT2.Parser | |
SpecificSuccessRes ResCheckSat Source # | |
Defined in Language.SMT2.Parser | |
SpecificSuccessRes ResModel Source # | |
Defined in Language.SMT2.Parser | |
SpecificSuccessRes SExpr Source # | |
Defined in Language.SMT2.Parser specificSuccessRes :: GenParser st SExpr Source # | |
SpecificSuccessRes StringLiteral Source # | |
Defined in Language.SMT2.Parser | |
SpecificSuccessRes (NonEmpty ResInfo) Source # | |
Defined in Language.SMT2.Parser | |
SpecificSuccessRes (NonEmpty ValuationPair) Source # | |
Defined in Language.SMT2.Parser | |
SpecificSuccessRes [Symbol] Source # | |
Defined in Language.SMT2.Parser specificSuccessRes :: GenParser st [Symbol] Source # | |
SpecificSuccessRes [TValuationPair] Source # | |
Defined in Language.SMT2.Parser specificSuccessRes :: GenParser st [TValuationPair] Source # | |
SpecificSuccessRes [Term] Source # | |
Defined in Language.SMT2.Parser specificSuccessRes :: GenParser st [Term] Source # |