mirror of
https://github.com/Z3Prover/z3
synced 2025-06-22 22:03:39 +00:00
fix bug in unsat core extraction in sat solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1c56d6ee95
commit
a47f3df703
14 changed files with 70 additions and 53 deletions
|
@ -84,11 +84,13 @@ namespace opt {
|
|||
lbool operator()() {
|
||||
TRACE("opt", tout << "weighted maxsat\n";);
|
||||
scoped_ensure_theory wth(*this);
|
||||
solver::scoped_push _s1(s());
|
||||
lbool is_sat = l_true;
|
||||
bool was_sat = false;
|
||||
for (unsigned i = 0; i < m_soft.size(); ++i) {
|
||||
wth().assert_weighted(m_soft[i].get(), m_weights[i]);
|
||||
}
|
||||
solver::scoped_push _s2(s());
|
||||
while (l_true == is_sat) {
|
||||
is_sat = s().check_sat(0,0);
|
||||
if (m_cancel) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue