Exemplo n.º 1
0
 void flush_assertions() const {
     if (m_assertions.empty()) return;
     m_rewriter.updt_params(get_params());
     proof_ref proof(m);
     expr_ref fml1(m), fml(m);
     expr_ref_vector fmls(m);
     for (expr* a : m_assertions) {
         m_th_rewriter(a, fml1, proof);
         m_rewriter(false, fml1, fml, proof);
         m_solver->assert_expr(fml);
     }
     m_rewriter.flush_side_constraints(fmls);
     m_solver->assert_expr(fmls);
     m_assertions.reset();
 }
Exemplo n.º 2
0
 void pop(unsigned num_scopes) {
     SASSERT(m_bounds.empty()); // bounds must be flushed before pop.
     if (num_scopes > 0) {
         SASSERT(num_scopes <= m_enum_consts_lim.size());
         unsigned new_sz = m_enum_consts_lim.size() - num_scopes;
         unsigned lim = m_enum_consts_lim[new_sz];
         for (unsigned i = m_enum_consts.size(); i > lim; ) {
             --i;
             func_decl* f = m_enum_consts[i].get();
             func_decl* f_fresh = m_enum2bv.find(f);
             m_bv2enum.erase(f_fresh);
             m_enum2bv.erase(f);
             m_enum2def.erase(f);
         }
         m_enum_consts_lim.resize(new_sz);
         m_enum_consts.resize(lim);
         m_enum_defs.resize(lim);
         m_enum_bvs.resize(lim);
     }
     m_rw.reset();
 }