3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-03 22:43:56 +00:00

#7468 - add option (get-info :parameters) to display solver parameters that were updated globally and distinct from defaults

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2025-02-10 11:57:14 -08:00
parent 62126fd6e2
commit c2b7b58c78
8 changed files with 62 additions and 6 deletions

View file

@ -412,7 +412,7 @@ public:
}
}
std::string get_value(params_ref const & ps, std::string const & p) {
std::string get_value(params_ref const& ps, std::string const& p) {
symbol sp(p.c_str());
std::ostringstream buffer;
ps.display(buffer, sp);
@ -430,6 +430,19 @@ public:
return r;
}
void display_updated_parameters(std::ostream& out, params_ref const& p) {
param_descrs* d = nullptr;
for (auto const& [k, v] : m_module_params) {
if (!get_module_param_descr(k, d))
continue;
params_ref* ps = nullptr;
if (!m_module_params.find(k, ps))
continue;
ps->display_smt2(out, k, *d);
p.display_smt2(out, k, *d);
}
}
std::string get_value(char const * name) {
std::string m, p;
normalize(name, m, p);
@ -691,3 +704,7 @@ std::string& gparams::g_buffer() {
SASSERT(g_imp);
return g_imp->m_buffer;
}
void gparams::display_updated_parameters(std::ostream& out, params_ref const& p) {
g_imp->display_updated_parameters(out, p);
}