Skip to content

Commit

Permalink
reset model converter between rounds to elim-unconstrained.
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Dec 19, 2023
1 parent 0daa05a commit 13be3c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/ast/converters/generic_model_converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class generic_model_converter : public model_converter {
void get_units(obj_map<expr, bool>& units) override;

vector<entry> const& entries() const { return m_entries; }

void reset() { m_entries.reset(); }
};

typedef ref<generic_model_converter> generic_model_converter_ref;
Expand Down
1 change: 0 additions & 1 deletion src/ast/rewriter/bv_rewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ br_status bv_rewriter::mk_leq_core(bool is_signed, expr * a, expr * b, expr_ref
result = m.mk_and(result, m_util.mk_ule(m_util.mk_numeral(r1-r2, sz), a2));
else if (r1 < r2)
result = m.mk_or(result, m_util.mk_ule(m_util.mk_numeral(r1-r2, sz), a2));
verbose_stream() << result << "\n";
return BR_REWRITE2;
}

Expand Down
3 changes: 2 additions & 1 deletion src/ast/simplifiers/elim_unconstrained.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,15 @@ void elim_unconstrained::reduce() {
generic_model_converter_ref mc = alloc(generic_model_converter, m, "elim-unconstrained");
m_inverter.set_model_converter(mc.get());
m_created_compound = true;
for (unsigned rounds = 0; m_created_compound && rounds < 1; ++rounds) {
for (unsigned rounds = 0; m_created_compound && rounds < 3; ++rounds) {
m_created_compound = false;
init_nodes();
eliminate();
reconstruct_terms();
vector<dependent_expr> old_fmls;
assert_normalized(old_fmls);
update_model_trail(*mc, old_fmls);
mc->reset();
}

}

0 comments on commit 13be3c3

Please sign in to comment.