![]() |
HAL
|
#include <types.h>
Public Member Functions | |
Model (const std::map< std::string, std::tuple< u64, u16 >> &model={}) | |
bool | operator== (const Model &other) const |
bool | operator!= (const Model &other) const |
Result< BooleanFunction > | evaluate (const BooleanFunction &bf) const |
Static Public Member Functions | |
static Result< Model > | parse (const std::string &model_str, const SolverType &solver) |
Public Attributes | |
std::map< std::string, std::tuple< u64, u16 > > | model |
maps variable identifiers to a (1) value and (2) its bit-size. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Model &model) |
Represents a list of assignments for variable nodes that yield a satisfiable assignment for a given list of constraints.
Result< BooleanFunction > hal::SMT::Model::evaluate | ( | const BooleanFunction & | bf | ) | const |
Evaluates the given Boolean function by replacing all variables contained in the model with their corresponding value and simplifying the result.
[in] | bf | - The Boolean function to evaluate. |
Definition at line 261 of file types.cpp.
References hal::BooleanFunction::build(), hal::BooleanFunction::Const(), ERR_APPEND, hal::BooleanFunction::get_nodes(), model, and OK.
bool hal::SMT::Model::operator!= | ( | const Model & | other | ) | const |
bool hal::SMT::Model::operator== | ( | const Model & | other | ) | const |
|
static |
Parses an SMT-Lib model from a string output by a solver of the given type.
[in] | model_str | - The SMT-Lib model string. |
[in] | solver | - The solver that computed the model. |
Definition at line 220 of file types.cpp.
References hal::SMT::Bitwuzla, hal::SMT::Boolector, hal::SMT::ModelParser::BOOLECTOR_MODEL_GRAMMAR, ERR, model, Model(), OK, hal::SMT::ModelParser::parser_context, type, hal::SMT::Z3, and hal::SMT::ModelParser::Z3_MODEL_GRAMMAR.
Referenced by hal::smt_init().
|
friend |
maps variable identifiers to a (1) value and (2) its bit-size.
Definition at line 233 of file types.h.
Referenced by evaluate(), operator==(), parse(), and hal::smt_init().