3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-04 22:35:45 +00:00

fixed bugs found in regression tests

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-11-07 07:36:40 -08:00
parent c3a0a29c4f
commit 8d6a091083
3 changed files with 21 additions and 9 deletions

View file

@ -1235,6 +1235,12 @@ static void restore(ast_manager & m, ptr_vector<expr> & c, unsigned old_sz) {
}
void cmd_context::restore_assertions(unsigned old_sz) {
if (!has_manager()) {
// restore_assertions invokes m(), so if cmd_context does not have a manager, it will try to create one.
SASSERT(old_sz == m_assertions.size());
SASSERT(m_assertions.empty());
return;
}
SASSERT(old_sz <= m_assertions.size());
SASSERT(!m_interactive_mode || m_assertions.size() == m_assertion_strings.size());
restore(m(), m_assertions, old_sz);

View file

@ -785,6 +785,7 @@ psort * pdecl_manager::mk_psort_cnst(sort * s) {
}
psort * pdecl_manager::register_psort(psort * n) {
TRACE("register_psort", tout << "registering psort...\n"; n->display(tout); tout << "\n";);
psort * r = m_table.insert_if_not_there(n);
if (r != n) {
del_decl_core(n);