Module Language.SMTLIB.Parser

This module provides parser functions for the SMT-LIB language. Currently there are only parsers for a subset of the language, namely command responses.

Author: Jan Tikovsky (with changes by Niels Bunkenburg)

Version: August 2021

Summary of exported operations:

parseCmdRsps :: String -> Either String [CmdResponse]  Non-deterministic 
parseResponse :: Parser Token CmdResponse  Deterministic 
parseGetAssertionsRsp :: Parser Token CmdResponse  Deterministic 
parser for get-assertions-response
parseGetAssignmentRsp :: Parser Token CmdResponse  Deterministic 
parser for get-assignment-response
parseTValPair :: Parser Token (String,Bool)  Deterministic 
parser for a t-valuation pair
parseGetInfoRsp :: Parser Token CmdResponse  Deterministic 
parser for get-info-response
parseInfoRsp :: Parser Token InfoRsp  Deterministic 
parser for an info response
parseErrorBehavior :: Parser Token ErrorBehavior  Deterministic 
parser for error behavior
parseReasonUnknown :: Parser Token ReasonUnknown  Deterministic 
parser for reason unknown
parseGetModelRsp :: Parser Token CmdResponse  Deterministic 
parser for a get-model-response
parseModelRsp :: Parser Token ModelRsp  Deterministic 
parser for a model response
parseFunDef :: Parser Token FunDef  Deterministic 
parser for a function definition
parseFunDec :: Parser Token FunDec  Deterministic 
parser for a function declaration
parseGetValueRsp :: Parser Token CmdResponse  Deterministic 
parser for a get-value-response
parseErrorRsp :: Parser Token CmdResponse  Deterministic 
parser for an error response
parseBool :: Parser Token Bool  Deterministic 
parser for a boolean value
parseNum :: Parser Token Int  Deterministic 
parser for a numeral
parseStr :: Parser Token String  Deterministic 
parser for a string
parseSym :: Parser Token String  Deterministic 
parser for a symbol
parseValPair :: Parser Token (Term,Term)  Deterministic 
parser for a valuation pair
parseTerm :: Parser Token Term  Deterministic 
parser for terms
parseParenTerm :: Parser Token Term  Deterministic 
parser for parenthesized terms
parseVarBind :: Parser Token (String,Term)  Deterministic 
parser for let bindings
parseSortedVar :: Parser Token SortedVar  Deterministic 
parser for sorted variables
parseAttribute :: Parser Token Attribute  Deterministic 
parser for attributes
parseAttrValue :: Parser Token AttrValue  Deterministic 
parser for an attribute value
parseSExpr :: Parser Token SExpr  Deterministic 
parser for SExpr
parseQIdent :: Parser Token QIdent  Deterministic 
parser for qualified identifiers
parseSort :: Parser Token Sort  Deterministic 
parser for sorts

Exported datatypes:


SMTParser

Type synonym: SMTParser a = Parser Token a


Exported operations:

parseCmdRsps :: String -> Either String [CmdResponse]  Non-deterministic 

parseGetAssertionsRsp :: Parser Token CmdResponse  Deterministic 

parser for get-assertions-response

parseGetAssignmentRsp :: Parser Token CmdResponse  Deterministic 

parser for get-assignment-response

parseTValPair :: Parser Token (String,Bool)  Deterministic 

parser for a t-valuation pair

parseGetInfoRsp :: Parser Token CmdResponse  Deterministic 

parser for get-info-response

parseInfoRsp :: Parser Token InfoRsp  Deterministic 

parser for an info response

parseErrorBehavior :: Parser Token ErrorBehavior  Deterministic 

parser for error behavior

parseReasonUnknown :: Parser Token ReasonUnknown  Deterministic 

parser for reason unknown

parseGetModelRsp :: Parser Token CmdResponse  Deterministic 

parser for a get-model-response

parseModelRsp :: Parser Token ModelRsp  Deterministic 

parser for a model response

parseFunDef :: Parser Token FunDef  Deterministic 

parser for a function definition

parseFunDec :: Parser Token FunDec  Deterministic 

parser for a function declaration

parseGetValueRsp :: Parser Token CmdResponse  Deterministic 

parser for a get-value-response

parseErrorRsp :: Parser Token CmdResponse  Deterministic 

parser for an error response

parseBool :: Parser Token Bool  Deterministic 

parser for a boolean value

parseNum :: Parser Token Int  Deterministic 

parser for a numeral

parseStr :: Parser Token String  Deterministic 

parser for a string

parseSym :: Parser Token String  Deterministic 

parser for a symbol

parseValPair :: Parser Token (Term,Term)  Deterministic 

parser for a valuation pair

parseTerm :: Parser Token Term  Deterministic 

parser for terms

parseParenTerm :: Parser Token Term  Deterministic 

parser for parenthesized terms

parseVarBind :: Parser Token (String,Term)  Deterministic 

parser for let bindings

parseSortedVar :: Parser Token SortedVar  Deterministic 

parser for sorted variables

parseAttribute :: Parser Token Attribute  Deterministic 

parser for attributes

parseAttrValue :: Parser Token AttrValue  Deterministic 

parser for an attribute value

parseSExpr :: Parser Token SExpr  Deterministic 

parser for SExpr

parseQIdent :: Parser Token QIdent  Deterministic 

parser for qualified identifiers

parseSort :: Parser Token Sort  Deterministic 

parser for sorts