mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
Merge branch 'master' of https://github.com/Z3Prover/z3
This commit is contained in:
commit
ee36662435
6 changed files with 92 additions and 29 deletions
|
@ -103,6 +103,7 @@ namespace smt {
|
|||
|
||||
virtual void assert_expr(expr * t, expr * a) {
|
||||
solver_na2as::assert_expr(t, a);
|
||||
SASSERT(!m_name2assertion.contains(a));
|
||||
get_manager().inc_ref(t);
|
||||
m_name2assertion.insert(a, t);
|
||||
}
|
||||
|
@ -112,6 +113,20 @@ namespace smt {
|
|||
}
|
||||
|
||||
virtual void pop_core(unsigned n) {
|
||||
unsigned cur_sz = m_assumptions.size();
|
||||
if (n > 0 && cur_sz > 0) {
|
||||
unsigned lvl = m_scopes.size();
|
||||
SASSERT(n <= lvl);
|
||||
unsigned new_lvl = lvl - n;
|
||||
unsigned old_sz = m_scopes[new_lvl];
|
||||
for (unsigned i = cur_sz - 1; i >= old_sz; i--) {
|
||||
expr * key = m_assumptions[i].get();
|
||||
SASSERT(m_name2assertion.contains(key));
|
||||
expr * value = m_name2assertion.find(key);
|
||||
m.dec_ref(value);
|
||||
m_name2assertion.erase(key);
|
||||
}
|
||||
}
|
||||
m_context.pop(n);
|
||||
}
|
||||
|
||||
|
@ -274,6 +289,7 @@ namespace smt {
|
|||
unsigned sz = core.size();
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
expr_ref name(core[i], m);
|
||||
SASSERT(m_name2assertion.contains(name));
|
||||
expr_ref assrtn(m_name2assertion.find(name), m);
|
||||
collect_pattern_func_decls(assrtn, pattern_fds);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue