3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-15 07:15:26 +00:00

add trail to avoid stale references in expr2var

This commit is contained in:
Nikolaj Bjorner 2023-01-24 04:15:52 -08:00
parent 3f1b7866ca
commit 15d853dc04
2 changed files with 7 additions and 0 deletions

View file

@ -40,6 +40,7 @@ class bound_simplifier : public dependent_expr_simplifier {
dep_intervals m_interval;
ptr_vector<expr> m_var2expr;
unsigned_vector m_expr2var;
expr_ref_vector m_trail;
mpq_buffer m_num_buffer;
var_buffer m_var_buffer;
unsigned m_num_reduced = 0;
@ -71,6 +72,7 @@ class bound_simplifier : public dependent_expr_simplifier {
if (e != core_e)
m_expr2var.setx(core_e->get_id(), v, UINT_MAX);
m_var2expr.push_back(core_e);
m_trail.push_back(e);
}
return v;
}
@ -100,6 +102,7 @@ public:
m_rewriter(m),
bp(nm, m_alloc, p),
m_interval(m.limit()),
m_trail(m),
m_num_buffer(nm) {
updt_params(p);
}