3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-04 06:15:46 +00:00

fix bugs found while running sample from #1112 in debug mode

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-02-28 22:35:41 +09:00
parent 30de514a88
commit 00c3f4fdcd
5 changed files with 15 additions and 9 deletions

View file

@ -719,6 +719,7 @@ void cmd_context::init_manager_core(bool new_manager) {
m_dt_eh = alloc(dt_eh, *this);
m_pmanager->set_new_datatype_eh(m_dt_eh.get());
if (!has_logic()) {
TRACE("cmd_context", tout << "init manager\n";);
// add list type only if the logic is not specified.
// it prevents clashes with builtin types.
insert(pm().mk_plist_decl());
@ -1408,7 +1409,8 @@ void cmd_context::restore_assertions(unsigned old_sz) {
SASSERT(m_assertions.empty());
return;
}
SASSERT(old_sz <= m_assertions.size());
if (old_sz == m_assertions.size()) return;
SASSERT(old_sz < m_assertions.size());
SASSERT(!m_interactive_mode || m_assertions.size() == m_assertion_strings.size());
restore(m(), m_assertions, old_sz);
if (produce_unsat_cores())