3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

change default output to print objective value

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-04-20 17:11:46 +01:00
parent e3c35840bb
commit d9f3625f93
3 changed files with 31 additions and 29 deletions

View file

@ -859,7 +859,7 @@ public:
pb_util pb(m);
expr_ref am(pb.mk_at_most_k(es, bound), m);
expr* r = nullptr;
if (m_at_mostk.find(am, r))
if (m_at_mostk.find(am, r))
return r;
r = mk_fresh_bool("r");
m_trail.push_back(am);
@ -877,6 +877,7 @@ public:
void max_resolve_rc2(exprs const& core, rational weight) {
expr_ref_vector ncore(m);
for (expr* f : core) {
ncore.push_back(mk_not(m, f));
bound_info b;
if (!m_bounds.find(f, b))
continue;
@ -886,7 +887,6 @@ public:
expr_ref_vector es(m, b.es.size(), b.es.data());
expr* amk = mk_atmost(es, b.k + 1, b.weight);
new_assumption(amk, b.weight);
ncore.push_back(mk_not(m, f));
m_unfold_upper -= b.weight;
}
if (core.size() > 1) {

View file

@ -703,25 +703,25 @@ namespace opt {
void context::update_solver() {
sat_params p(m_params);
if (p.euf())
if (!p.euf() && (!m_enable_sat || !probe_fd()))
return;
if (m_maxsat_engine != symbol("maxres") &&
m_maxsat_engine != symbol("rc2") &&
m_maxsat_engine != symbol("maxres-bin") &&
m_maxsat_engine != symbol("maxres-bin-delay") &&
m_maxsat_engine != symbol("pd-maxres") &&
m_maxsat_engine != symbol("bcd2") &&
m_maxsat_engine != symbol("sls")) {
return;
if (!p.euf()) {
if (!m_enable_sat || !probe_fd()) {
return;
}
if (m_maxsat_engine != symbol("maxres") &&
m_maxsat_engine != symbol("pd-maxres") &&
m_maxsat_engine != symbol("bcd2") &&
m_maxsat_engine != symbol("sls")) {
return;
}
if (opt_params(m_params).priority() == symbol("pareto")) {
return;
}
if (m.proofs_enabled()) {
return;
}
}
if (opt_params(m_params).priority() == symbol("pareto"))
return;
if (m.proofs_enabled())
return;
m_params.set_bool("minimize_core_partial", true);
m_params.set_bool("minimize_core", true);
m_sat_solver = mk_inc_sat_solver(m, m_params);