3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00

enable core minimization with qsat in case it turns out to be useful

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-06-12 15:58:12 -07:00
parent 3ac4709992
commit c7ff05cc78
16 changed files with 235 additions and 132 deletions

View file

@ -545,7 +545,7 @@ public:
}
m_mus.reset();
for (unsigned i = 0; i < core.size(); ++i) {
m_mus.add_soft(core[i]);
VERIFY(i == m_mus.add_soft(core[i]));
}
unsigned_vector mus_idx;
lbool is_sat = m_mus.get_mus(mus_idx);
@ -832,12 +832,8 @@ public:
tout << m_defs;
tout << m_asms;
);
for (unsigned i = 0; i < m_defs.size(); ++i) {
s().assert_expr(m_defs[i].get());
}
for (unsigned i = 0; i < m_asms.size(); ++i) {
s().assert_expr(m_asms[i].get());
}
s().assert_expr(m_defs);
s().assert_expr(m_asms);
}
// else: there is only a single assignment to these soft constraints.
}
@ -848,9 +844,7 @@ public:
for (unsigned i = 0; i < s().get_num_assertions(); ++i) {
smt_solver->assert_expr(s().get_assertion(i));
}
for (unsigned i = 0; i < core.size(); ++i) {
smt_solver->assert_expr(core[i]);
}
smt_solver->assert_expr(core);
lbool is_sat = smt_solver->check_sat(0, 0);
if (is_sat == l_true) {
IF_VERBOSE(0, verbose_stream() << "not a core\n";);