mirror of
https://github.com/Z3Prover/z3
synced 2025-10-04 23:13:57 +00:00
debug benchmarks, theory_pb
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
cff0e0fc6c
commit
26237a3727
5 changed files with 108 additions and 30 deletions
|
@ -27,6 +27,7 @@ Notes:
|
|||
#include "tactic.h"
|
||||
#include "lia2card_tactic.h"
|
||||
#include "elim01_tactic.h"
|
||||
#include "simplify_tactic.h"
|
||||
#include "tactical.h"
|
||||
#include "model_smt2_pp.h"
|
||||
|
||||
|
@ -189,9 +190,10 @@ namespace opt {
|
|||
for (unsigned i = 0; i < fmls.size(); ++i) {
|
||||
g->assert_expr(fmls[i].get());
|
||||
}
|
||||
tactic_ref tac0 = mk_simplify_tactic(m);
|
||||
tactic_ref tac1 = mk_elim01_tactic(m);
|
||||
tactic_ref tac2 = mk_lia2card_tactic(m);
|
||||
tactic_ref tac = and_then(tac1.get(), tac2.get());
|
||||
tactic_ref tac = and_then(tac0.get(), tac1.get(), tac2.get());
|
||||
proof_converter_ref pc;
|
||||
expr_dependency_ref core(m);
|
||||
goal_ref_buffer result;
|
||||
|
|
|
@ -253,7 +253,7 @@ namespace smt {
|
|||
disj.push_back(m.mk_not(m_min_cost_atom));
|
||||
}
|
||||
if (is_optimal()) {
|
||||
IF_VERBOSE(1, verbose_stream() << "(wmaxsat with lower bound: " << weight << "\n";);
|
||||
IF_VERBOSE(1, verbose_stream() << "(wmaxsat with lower bound: " << weight << ")\n";);
|
||||
m_min_cost = weight;
|
||||
m_cost_save.reset();
|
||||
m_cost_save.append(m_costs);
|
||||
|
@ -363,9 +363,10 @@ namespace opt {
|
|||
rational m_upper;
|
||||
rational m_lower;
|
||||
model_ref m_model;
|
||||
volatile bool m_cancel;
|
||||
|
||||
imp(ast_manager& m, opt_solver& s, expr_ref_vector& soft_constraints, vector<rational> const& weights):
|
||||
m(m), s(s), m_soft(soft_constraints), m_weights(weights)
|
||||
m(m), s(s), m_soft(soft_constraints), m_weights(weights), m_cancel(false)
|
||||
{
|
||||
m_assignment.resize(m_soft.size(), false);
|
||||
}
|
||||
|
@ -413,6 +414,9 @@ namespace opt {
|
|||
}
|
||||
while (l_true == is_sat) {
|
||||
is_sat = s.check_sat_core(0,0);
|
||||
if (m_cancel) {
|
||||
is_sat = l_undef;
|
||||
}
|
||||
if (is_sat == l_true) {
|
||||
if (wth.is_optimal()) {
|
||||
s.get_model(m_model);
|
||||
|
@ -473,7 +477,7 @@ namespace opt {
|
|||
return m_imp->m_assignment[idx];
|
||||
}
|
||||
void wmaxsmt::set_cancel(bool f) {
|
||||
// no-op
|
||||
m_imp->m_cancel = f;
|
||||
}
|
||||
void wmaxsmt::collect_statistics(statistics& st) const {
|
||||
// no-op
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue