3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-11-05 13:56:03 +00:00

Add method to (explicitly) re-assign the pdd manager

This commit is contained in:
Jakob Rath 2023-05-29 15:44:37 +02:00
parent 2795ac5e90
commit 129039dc52
2 changed files with 9 additions and 0 deletions

View file

@ -1825,6 +1825,14 @@ namespace dd {
return *this;
}
/* Reset pdd to 0. Allows re-assigning the pdd manager. */
void pdd::reset(pdd_manager& new_m) {
m->dec_ref(root);
root = 0;
m = &new_m;
SASSERT(is_zero());
}
rational const& pdd::leading_coefficient() const {
pdd p = *this;
while (!p.is_val())