mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
Fixed potential problems with invalidated iterators.
This commit is contained in:
parent
3aa7eab3e2
commit
11997afb5d
1 changed files with 6 additions and 12 deletions
|
@ -589,10 +589,8 @@ namespace smt {
|
|||
m_dep_manager.reset();
|
||||
bool propagated = false;
|
||||
context & ctx = get_context();
|
||||
svector<theory_var>::const_iterator it = m_nl_monomials.begin();
|
||||
svector<theory_var>::const_iterator end = m_nl_monomials.end();
|
||||
for (; it != end; ++it) {
|
||||
theory_var v = *it;
|
||||
for (unsigned i = 0; i < m_nl_monomials.size(); i++) {
|
||||
theory_var v = m_nl_monomials.size();
|
||||
expr * m = var2expr(v);
|
||||
if (!ctx.is_relevant(m))
|
||||
continue;
|
||||
|
@ -706,10 +704,8 @@ namespace smt {
|
|||
bool bounded = false;
|
||||
unsigned n = 0;
|
||||
numeral range;
|
||||
svector<theory_var>::const_iterator it = m_nl_monomials.begin();
|
||||
svector<theory_var>::const_iterator end = m_nl_monomials.end();
|
||||
for (; it != end; ++it) {
|
||||
theory_var v = *it;
|
||||
for (unsigned i = 0; i < m_nl_monomials.size(); i++) {
|
||||
theory_var v = m_nl_monomials.size();
|
||||
if (is_real(v))
|
||||
continue;
|
||||
bool computed_epsilon = false;
|
||||
|
@ -2340,10 +2336,8 @@ namespace smt {
|
|||
bool theory_arith<Ext>::max_min_nl_vars() {
|
||||
var_set already_found;
|
||||
svector<theory_var> vars;
|
||||
svector<theory_var>::const_iterator it = m_nl_monomials.begin();
|
||||
svector<theory_var>::const_iterator end = m_nl_monomials.end();
|
||||
for (; it != end; ++it) {
|
||||
theory_var v = *it;
|
||||
for (unsigned i = 0; i < m_nl_monomials.size(); i++) {
|
||||
theory_var v = m_nl_monomials.size();
|
||||
mark_var(v, vars, already_found);
|
||||
expr * n = var2expr(v);
|
||||
SASSERT(is_pure_monomial(n));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue