3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 02:15:19 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-06-19 14:10:38 -07:00
parent 07a1aea689
commit 1204671595
5 changed files with 24 additions and 2 deletions

View file

@ -1346,6 +1346,7 @@ void cmd_context::push() {
s.m_macros_stack_lim = m_macros_stack.size();
s.m_aux_pdecls_lim = m_aux_pdecls.size();
s.m_assertions_lim = m_assertions.size();
pm().push();
unsigned timeout = m_params.m_timeout;
m().limit().push(m_params.rlimit());
cancel_eh<reslimit> eh(m().limit());
@ -1474,6 +1475,7 @@ void cmd_context::pop(unsigned n) {
restore_assertions(s.m_assertions_lim);
restore_psort_inst(s.m_psort_inst_stack_lim);
m_scopes.shrink(new_lvl);
pm().pop(n);
while (n--) {
m().limit().pop();
}

View file

@ -716,9 +716,24 @@ void pdecl_manager::notify_datatype(sort *r, psort_decl* p, unsigned n, sort* co
m.notify_new_dt(r, p);
}
m_notified.insert(r);
m_notified_trail.push_back(r);
}
}
void pdecl_manager::push() {
m_notified_lim.push_back(m_notified_trail.size());
}
void pdecl_manager::pop(unsigned n) {
SASSERT(n > 0);
unsigned new_sz = m_notified_lim[m_notified_lim.size() - n];
for (unsigned i = m_notified_trail.size(); i-- > new_sz; ) {
m_notified.erase(m_notified_trail[i]);
}
m_notified_trail.shrink(new_sz);
m_notified_lim.shrink(m_notified_lim.size() - n);
}
bool pdatatypes_decl::instantiate(pdecl_manager & m, sort * const * s) {
UNREACHABLE();
return false;

View file

@ -288,6 +288,8 @@ class pdecl_manager {
obj_map<sort, sort_info *> m_sort2info; // for pretty printing sorts
obj_hashtable<sort> m_notified;
ptr_vector<sort> m_notified_trail;
unsigned_vector m_notified_lim;
void init_list();
void del_decl_core(pdecl * p);
@ -318,6 +320,8 @@ public:
sort * instantiate_datatype(psort_decl* p, symbol const& name, unsigned n, sort * const* s);
sort * instantiate(psort * s, unsigned num, sort * const * args);
void notify_datatype(sort *r, psort_decl* p, unsigned n, sort* const* s);
void push();
void pop(unsigned n);
void lazy_dec_ref(pdecl * p) { p->dec_ref(); if (p->get_ref_count() == 0) m_to_delete.push_back(p); }
template<typename T>

View file

@ -293,7 +293,7 @@ namespace smt {
conds.push_back(lcond);
d = el;
break;
case l_undef:
case l_undef:
#if 1
ctx.mark_as_relevant(lcond);
trigger = lcond;
@ -315,6 +315,7 @@ namespace smt {
}
else {
ctx.mark_as_relevant(lcond);
trigger = lcond;
return false;
}
break;

View file

@ -2331,7 +2331,7 @@ theory_var theory_seq::mk_var(enode* n) {
}
bool theory_seq::can_propagate() {
return m_axioms_head < m_axioms.size() || !m_replay.empty() || m_new_solution || m_unicode.can_propagate();
return m_axioms_head < m_axioms.size() || !m_replay.empty() || m_new_solution || m_unicode.can_propagate() || m_regex.can_propagate();
}
bool theory_seq::canonize(expr* e, dependency*& eqs, expr_ref& result) {