3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-09 01:11:55 +00:00

fix bug in activate node!

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2025-09-08 19:14:25 -07:00
parent 96bb3caa9e
commit e916065f7c

View file

@ -221,28 +221,29 @@ namespace search_tree {
auto res = activate_from_root(n);
if (res)
return res;
while (n) {
if (n->left() && n->left()->get_status() == status::closed &&
n->right() && n->right()->get_status() == status::closed) {
n->set_status(status::closed);
n = n->parent();
auto p = n->parent();
while (p) {
if (p->left() && p->left()->get_status() == status::closed &&
p->right() && p->right()->get_status() == status::closed) {
p->set_status(status::closed);
n = p;
p = n->parent();
continue;
}
auto p = n->parent();
if (!p)
return nullptr;
if (n == p->left()) {
res = activate_from_root(p->right());
if (res)
return res;
}
else {
SASSERT(n == p->right());
VERIFY(n == p->right());
res = activate_from_root(p->left());
if (res)
return res;
}
n = p;
p = n->parent();
}
return nullptr;
}