@@ -86,7 +86,7 @@ void elim_unconstrained::eliminate() {
86
86
continue ;
87
87
}
88
88
if (m_heap.contains (root (e))) {
89
- IF_VERBOSE ( 11 , verbose_stream () << " already in heap " << mk_bounded_pp (e, m) << " \n " );
89
+ TRACE ( " elim_unconstrained " , tout << " already in heap " << mk_bounded_pp (e, m) << " \n " );
90
90
continue ;
91
91
}
92
92
app* t = to_app (e);
@@ -111,9 +111,9 @@ void elim_unconstrained::eliminate() {
111
111
continue ;
112
112
}
113
113
114
- IF_VERBOSE (11 , verbose_stream () << " replace " << mk_pp (t, m) << " : " << rr << " -> " << r << " \n " );
114
+ IF_VERBOSE (11 , verbose_stream () << " replace " << mk_pp (t, m) << " / " << rr << " -> " << r << " \n " );
115
115
116
- TRACE (" elim_unconstrained" , tout << mk_pp (t, m) << " : " << rr << " -> " << r << " \n " );
116
+ TRACE (" elim_unconstrained" , tout << mk_pp (t, m) << " / " << rr << " -> " << r << " \n " );
117
117
SASSERT (r->get_sort () == t->get_sort ());
118
118
m_stats.m_num_eliminated ++;
119
119
m_trail.push_back (r);
@@ -147,10 +147,10 @@ expr* elim_unconstrained::get_parent(unsigned n) const {
147
147
}
148
148
149
149
void elim_unconstrained::invalidate_parents (expr* e) {
150
- ptr_vector <expr> todo;
150
+ ptr_buffer <expr> todo;
151
151
do {
152
152
node& n = get_node (e);
153
- if (!n.m_dirty ) {
153
+ if (!n.m_dirty && e == n. m_term ) {
154
154
n.m_dirty = true ;
155
155
for (expr* e : n.m_parents )
156
156
todo.push_back (e);
@@ -299,7 +299,7 @@ expr_ref elim_unconstrained::reconstruct_term(node& n0) {
299
299
return expr_ref (t, m);
300
300
if (!is_node (t))
301
301
return expr_ref (t, m);
302
- ptr_vector <expr> todo;
302
+ ptr_buffer <expr> todo;
303
303
todo.push_back (t);
304
304
while (!todo.empty ()) {
305
305
t = todo.back ();
@@ -310,6 +310,7 @@ expr_ref elim_unconstrained::reconstruct_term(node& n0) {
310
310
unsigned sz0 = todo.size ();
311
311
if (is_app (t)) {
312
312
if (n.m_term != t) {
313
+ n.m_dirty = false ;
313
314
todo.pop_back ();
314
315
continue ;
315
316
}
0 commit comments