Skip to main content

Module parser

Module parser 

Source

Structs§

Cvc5InputParser
Cvc5SymbolManager
cvc5_cmd_t

Functions§

cvc5_cmd_get_name
Get the name for a given command, e.g., “assert”. @param cmd The command to invoke. @return The name of the command. @note The returned char* pointer is only valid until the next call to this function.
cvc5_cmd_invoke
Invoke a given command on the solver and symbol manager sm and return any resulting output as a string. @param cmd The command to invoke. @param cvc5 The solver to invoke the command on. @param sm The symbol manager to invoke the command on. @return The output of invoking the command. @note The returned char* pointer is only valid until the next call to this function.
cvc5_cmd_to_string
Get a string representation of this command. @param cmd The command to invoke. @return The string representation. @note The returned char* pointer is only valid until the next call to this function.
cvc5_parser_append_inc_str_input
Append string to the input being parsed by this parser. Should be called after calling cvc5_parser_set_inc_str_input(). @param parser The input parser instance. @param input The input string.
cvc5_parser_delete
Delete a cvc5 input parser instance. @param parser The input parser instance.
cvc5_parser_done
Is this parser done reading input? @param parser The input parser instance. @return True if parser is done reading input.
cvc5_parser_get_sm
Get the associated symbol manager of a given parser. @param parser The parser instance. @return The symbol manager.
cvc5_parser_get_solver
Get the associated solver instance of a given parser. @param parser The parser instance. @return The solver.
cvc5_parser_new
Construct a new instance of a cvc5 input parser. @param cvc5 The associated solver instance. @param sm The associated symbol manager instance, contains a symbol table that maps symbols to terms and sorts. Must have a logic that is compatible with the solver. May be NULL to start with and initially empty symbol manager. @return The cvc5 symbol manager instance.
cvc5_parser_next_command
Parse and return the next command. Will initialize the logic to “ALL” or the forced logic if no logic is set prior to this point and a command is read that requires initializing the logic.
cvc5_parser_next_term
Parse and return the next term. Requires setting the logic prior to this point. @param parser The input parser instance. @param error_msg Output parameter for the error message in case of a parse error, NULL if no error occurred. @return The parsed term. NULL if no term was read.
cvc5_parser_release
Release all objects managed by the parser.
cvc5_parser_set_file_input
Configure given file as input to a given input parser. @param parser The input parser instance. @param lang the input language (e.g., #CVC5_INPUT_LANGUAGE_SMT_LIB_2_6) @param filename The name of the file to configure.
cvc5_parser_set_inc_str_input
Configure that we will be feeding strings to a given input parser via cvc5_parser_append_inc_str_input() below. @param parser The input parser instance. @param lang The input language of the input string. @param name The name to use as input stream name for error messages.
cvc5_parser_set_str_input
Configure a given concrete input string as the input to a given input parser. @param parser The input parser instance. @param lang The input language of the input string. @param input The input string. @param name The name to use as input stream name for error messages.
cvc5_sm_get_declared_sorts
Get the list of sorts that have been declared via declare-sort commands. These are the sorts that are printed as part of a response to a get-model command.
cvc5_sm_get_declared_terms
Get the list of terms that have been declared via declare-fun and declare-const. These are the terms that are printed in response to a get-model command.
cvc5_sm_get_logic
Get the logic configured for a given symbol manager. @note Asserts cvc5_sm_is_logic_set(). @param sm The symbol manager instance. @return The configured logic. @note The returned char* pointer is only valid until the next call to this function.
cvc5_sm_get_named_terms
Get the named terms that have been given to them via the :named attribute.
cvc5_sm_is_logic_set
Determine if the logic of a given symbol manager has been set. @param sm The symbol manager instance. @return True if the logic has been set.
cvc5_symbol_manager_delete
Delete a cvc5 symbol manager instance. @param sm The symbol manager instance.
cvc5_symbol_manager_new
Construct a new instance of a cvc5 symbol manager. @param tm The associated term manager instance. @return The cvc5 symbol manager instance.

Type Aliases§

Cvc5Command
Encapsulation of a command.