Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Oct 19, 2021
1 parent fc3a701 commit f9dde2e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/opt/maxlex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ namespace opt {
if (mdl) {
TRACE("opt", tout << *mdl << "\n";);
for (auto & soft : m_soft) {
if (!mdl->is_true(soft.s))
break;
if (!mdl->is_true(soft.s)) {
update_bounds();
return;
}
soft.set_value(l_true);
assert_value(soft);
}
Expand All @@ -151,9 +153,8 @@ namespace opt {
unsigned sz = m_soft.size();
for (unsigned i = 0; i < sz; ++i) {
auto& soft = m_soft[i];
if (soft.value != l_undef) {
if (soft.value != l_undef)
continue;
}
expr_ref_vector asms(m);
asms.push_back(soft.s);
lbool is_sat = s().check_sat(asms);
Expand Down
3 changes: 2 additions & 1 deletion src/opt/opt_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Module Name:
#include "ast/pb_decl_plugin.h"
#include "ast/ast_smt_pp.h"
#include "ast/ast_pp_util.h"
#include "ast/ast_ll_pp.h"
#include "ast/display_dimacs.h"
#include "model/model_smt2_pp.h"
#include "tactic/goal.h"
Expand Down Expand Up @@ -1200,7 +1201,7 @@ namespace opt {

app* context::purify(generic_model_converter_ref& fm, expr* term) {
std::ostringstream out;
out << mk_pp(term, m);
out << mk_bounded_pp(term, m, 3);
app* q = m.mk_fresh_const(out.str(), term->get_sort());
if (!fm) fm = alloc(generic_model_converter, m, "opt");
if (m_arith.is_int_real(term)) {
Expand Down
4 changes: 4 additions & 0 deletions src/sat/smt/euf_relevancy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace euf {
return;
for (; m_auto_relevant_scopes > 0; --m_auto_relevant_scopes)
m_auto_relevant_lim.push_back(m_auto_relevant.size());
std::cout << "add-auto " << e->get_id() << " " << mk_bounded_pp(e, m) << "\n";
m_auto_relevant.push_back(e);
}

Expand Down Expand Up @@ -109,6 +110,9 @@ namespace euf {
if (e)
todo.push_back(e);
}
std::cout << "init-relevant\n";
for (expr* e : m_auto_relevant)
std::cout << "auto-relevant " << e->get_id() << " " << mk_bounded_pp(e, m) << "\n";
todo.append(m_auto_relevant);
for (unsigned i = 0; i < todo.size(); ++i) {
expr* e = todo[i];
Expand Down

0 comments on commit f9dde2e

Please sign in to comment.