Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- Module : Language.SMT2.Parser
- Description : SMT language parser
- Maintainer : ubikium@gmail.com
- Stability : experimental
Synopsis
- parseString :: Parser a -> Text -> Either ParseError a
- parseStringEof :: Parser a -> Text -> Either ParseError a
- parseFileMsg :: Parser a -> Text -> Either Text a
- parseCommentFreeFileMsg :: Parser a -> Text -> Either Text a
- stripSpaces :: GenParser st a -> GenParser st a
- removeComment :: Text -> Text
- numeral :: GenParser st Numeral
- decimal :: GenParser st Decimal
- hexadecimal :: GenParser st Hexadecimal
- binary :: GenParser st Binary
- stringLiteral :: GenParser st StringLiteral
- reservedWord :: GenParser st ReservedWord
- symbol :: GenParser st Symbol
- keyword :: GenParser st Keyword
- slist :: GenParser st SList
- specConstant :: GenParser st SpecConstant
- sexpr :: GenParser st SExpr
- index :: GenParser st Index
- identifier :: GenParser st Identifier
- attributeValue :: GenParser st AttributeValue
- attribute :: GenParser st Attribute
- sort :: GenParser st Sort
- qualIdentifier :: GenParser st QualIdentifier
- varBinding :: GenParser st VarBinding
- sortedVar :: GenParser st SortedVar
- matchPattern :: GenParser st MatchPattern
- matchCase :: GenParser st MatchCase
- term :: GenParser st Term
- sortSymbolDecl :: GenParser st SortSymbolDecl
- metaSpecConstant :: GenParser st MetaSpecConstant
- funSymbolDecl :: GenParser st FunSymbolDecl
- parFunSymbolDecl :: GenParser st ParFunSymbolDecl
- theoryAttribute :: GenParser st TheoryAttribute
- theoryDecl :: GenParser st TheoryDecl
- logicAttribute :: GenParser st LogicAttribute
- logic :: GenParser st Logic
- sortDec :: GenParser st SortDec
- selectorDec :: GenParser st SelectorDec
- constructorDec :: GenParser st ConstructorDec
- datatypeDec :: GenParser st DatatypeDec
- functionDec :: GenParser st FunctionDec
- functionDef :: GenParser st FunctionDef
- propLiteral :: GenParser st PropLiteral
- command :: GenParser st Command
- script :: GenParser st Script
- bValue :: GenParser st BValue
- scriptOption :: GenParser st ScriptOption
- infoFlag :: GenParser st InfoFlag
- resErrorBehaviour :: GenParser st ResErrorBehavior
- resReasonUnknown :: GenParser st ResReasonUnknown
- resModel :: GenParser st ResModel
- resInfo :: GenParser st ResInfo
- valuationPair :: GenParser st ValuationPair
- tValuationPair :: GenParser st TValuationPair
- resCheckSat :: GenParser st ResCheckSat
- checkSatRes :: GenParser st CheckSatRes
- echoRes :: GenParser st EchoRes
- getAssertionsRes :: GenParser st GetAssertionsRes
- getAssignmentRes :: GenParser st GetAssignmentRes
- getInfoRes :: GenParser st GetInfoRes
- getModelRes :: GenParser st GetModelRes
- getOptionRes :: GenParser st GetOptionRes
- getProofRes :: GenParser st GetProofRes
- getUnsatAssumpRes :: GenParser st GetUnsatAssumpRes
- getUnsatCoreRes :: GenParser st GetUnsatCoreRes
- getValueRes :: GenParser st GetValueRes
Utils
commonly used combinators
parseString :: Parser a -> Text -> Either ParseError a Source #
parseStringEof :: Parser a -> Text -> Either ParseError a Source #
parseFileMsg :: Parser a -> Text -> Either Text a Source #
parse from a file string, may have leading & trailing spaces and comments
parseCommentFreeFileMsg :: Parser a -> Text -> Either Text a Source #
parse from a comment-free file string
stripSpaces :: GenParser st a -> GenParser st a Source #
strip away the leading and trailing spaces
removeComment :: Text -> Text Source #
remove comments
Lexicons (Sec. 3.1)
Parsers for lexicons.
For a numeral, a decimal, or a string literal, the parsed result is the same.
For a hexadecimal or a binary, the result is stripped with marks (#x
and #b
).
hexadecimal :: GenParser st Hexadecimal Source #
reservedWord :: GenParser st ReservedWord Source #
accept all reserved words, the exact content should be checked later in the parsing procedure
symbol :: GenParser st Symbol Source #
enclosing a simple symbol in vertical bars does not produce a
new symbol, e.g. abc
and |abc|
are the same symbol
this is guaranteed by removing the bars
S-expressions (Sec. 3.2)
specConstant :: GenParser st SpecConstant Source #
a constant must be followed by a space to delimit the end
Identifiers (Sec 3.3)
identifier :: GenParser st Identifier Source #
Attributes (Sec. 3.4)
Sorts (Sec 3.5)
Terms and Formulas (Sec 3.6)
varBinding :: GenParser st VarBinding Source #
matchPattern :: GenParser st MatchPattern Source #
Theory declarations (Sec 3.7)
theoryDecl :: GenParser st TheoryDecl Source #
Logic Declarations (Sec 3.8)
Scripts (Sec 3.9)
selectorDec :: GenParser st SelectorDec Source #
datatypeDec :: GenParser st DatatypeDec Source #
functionDec :: GenParser st FunctionDec Source #
functionDef :: GenParser st FunctionDef Source #
propLiteral :: GenParser st PropLiteral Source #
scriptOption :: GenParser st ScriptOption Source #
Responses (Sec 3.9.1)
values
resCheckSat :: GenParser st ResCheckSat Source #
instances
checkSatRes :: GenParser st CheckSatRes Source #
getInfoRes :: GenParser st GetInfoRes Source #
getModelRes :: GenParser st GetModelRes Source #
getOptionRes :: GenParser st GetOptionRes Source #
getProofRes :: GenParser st GetProofRes Source #
getValueRes :: GenParser st GetValueRes Source #