mirror of
https://github.com/Z3Prover/z3
synced 2025-06-19 12:23:38 +00:00
#6340 again - reduce new assertions in fresh iteration
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a6a5985f8e
commit
34969b71ee
1 changed files with 25 additions and 17 deletions
|
@ -3202,26 +3202,34 @@ namespace smt {
|
||||||
flet<bool> _internalizing(m_internalizing_assertions, true);
|
flet<bool> _internalizing(m_internalizing_assertions, true);
|
||||||
TRACE("internalize_assertions", tout << "internalize_assertions()...\n";);
|
TRACE("internalize_assertions", tout << "internalize_assertions()...\n";);
|
||||||
timeit tt(get_verbosity_level() >= 100, "smt.preprocessing");
|
timeit tt(get_verbosity_level() >= 100, "smt.preprocessing");
|
||||||
reduce_assertions();
|
unsigned qhead = 0;
|
||||||
if (get_cancel_flag()) return;
|
do {
|
||||||
if (!m_asserted_formulas.inconsistent()) {
|
reduce_assertions();
|
||||||
unsigned qhead = m_asserted_formulas.get_qhead();
|
if (get_cancel_flag())
|
||||||
while (qhead < m_asserted_formulas.get_num_formulas()) {
|
return;
|
||||||
if (get_cancel_flag()) {
|
qhead = m_asserted_formulas.get_qhead();
|
||||||
m_asserted_formulas.commit(qhead);
|
if (!m_asserted_formulas.inconsistent()) {
|
||||||
return;
|
unsigned sz = m_asserted_formulas.get_num_formulas();
|
||||||
|
while (qhead < sz) {
|
||||||
|
if (get_cancel_flag()) {
|
||||||
|
m_asserted_formulas.commit(qhead);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
expr * f = m_asserted_formulas.get_formula(qhead);
|
||||||
|
proof * pr = m_asserted_formulas.get_formula_proof(qhead);
|
||||||
|
SASSERT(!pr || f == m.get_fact(pr));
|
||||||
|
internalize_assertion(f, pr, 0);
|
||||||
|
qhead++;
|
||||||
}
|
}
|
||||||
expr * f = m_asserted_formulas.get_formula(qhead);
|
m_asserted_formulas.commit();
|
||||||
proof * pr = m_asserted_formulas.get_formula_proof(qhead);
|
}
|
||||||
SASSERT(!pr || f == m.get_fact(pr));
|
if (m_asserted_formulas.inconsistent() && !inconsistent()) {
|
||||||
internalize_assertion(f, pr, 0);
|
asserted_inconsistent();
|
||||||
qhead++;
|
break;
|
||||||
}
|
}
|
||||||
m_asserted_formulas.commit();
|
|
||||||
}
|
|
||||||
if (m_asserted_formulas.inconsistent() && !inconsistent()) {
|
|
||||||
asserted_inconsistent();
|
|
||||||
}
|
}
|
||||||
|
while (qhead < m_asserted_formulas.get_num_formulas());
|
||||||
|
|
||||||
TRACE("internalize_assertions", tout << "after internalize_assertions()...\n";
|
TRACE("internalize_assertions", tout << "after internalize_assertions()...\n";
|
||||||
tout << "inconsistent: " << inconsistent() << "\n";);
|
tout << "inconsistent: " << inconsistent() << "\n";);
|
||||||
TRACE("after_internalize_assertions", display(tout););
|
TRACE("after_internalize_assertions", display(tout););
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue