Skip to content

Commit

Permalink
keep track of qhead
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Nov 25, 2022
1 parent 5af6e1a commit 8184e7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/ast/simplifiers/card2bv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void card2bv::reduce() {

expr_ref new_f1(m), new_f2(m);
proof_ref new_pr(m);
for (unsigned idx = 0; !m_fmls.inconsistent() && idx < m_fmls.size(); idx++) {
for (unsigned idx = m_qhead; !m_fmls.inconsistent() && idx < m_fmls.size(); idx++) {
auto [f, d] = m_fmls[idx]();
rw1(f, new_f1);
rw2(false, new_f1, new_f2, new_pr);
Expand All @@ -48,6 +48,8 @@ void card2bv::reduce() {
func_decl_ref_vector const& fns = rw2.fresh_constants();
for (func_decl* f : fns)
m_fmls.model_trail().hide(f);

advance_qhead(m_fmls.size());
}

void card2bv::collect_statistics(statistics& st) const {
Expand Down
3 changes: 2 additions & 1 deletion src/ast/simplifiers/max_bv_sharing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,15 @@ class max_bv_sharing : public dependent_expr_simplifier {
void reduce() override {
expr_ref new_curr(m);
proof_ref new_pr(m);
for (unsigned idx = 0; idx < m_fmls.size() && !m_fmls.inconsistent(); idx++) {
for (unsigned idx = m_qhead; idx < m_fmls.size() && !m_fmls.inconsistent(); idx++) {
auto [curr, d] = m_fmls[idx]();
m_rw(curr, new_curr, new_pr);
// Proof reconstruction: new_pr = m.mk_modus_ponens(old_pr, new_pr);
m_num_steps += m_rw.get_num_steps();
m_fmls.update(idx, dependent_expr(m, new_curr, d));
}
m_rw.cfg().cleanup();
advance_qhead(m_fmls.size());
}
};

Expand Down

0 comments on commit 8184e7f

Please sign in to comment.