mirror of
https://github.com/Z3Prover/z3
synced 2025-06-22 22:03:39 +00:00
fix 2808
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
6ad55cc8f6
commit
1f9aff04df
5 changed files with 48 additions and 69 deletions
|
@ -366,7 +366,7 @@ namespace dd {
|
|||
// since x is the maximal variable, it does not occur in t or v.
|
||||
// thus, both a and b are linear in x
|
||||
bool pdd_manager::spoly_is_invertible(pdd const& a, pdd const& b) {
|
||||
return a.is_var() && b.is_var() && a.hi().is_val() && b.hi().is_val() && a.var() == b.var();
|
||||
return !a.is_val() && !b.is_val() && a.hi().is_val() && b.hi().is_val() && a.var() == b.var();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -617,22 +617,8 @@ namespace dd {
|
|||
}
|
||||
|
||||
unsigned_vector const& pdd_manager::free_vars(pdd const& p) {
|
||||
return free_vars_except(p, zero());
|
||||
}
|
||||
|
||||
unsigned_vector const& pdd_manager::free_vars_except(pdd const& p, pdd const& q) {
|
||||
init_mark();
|
||||
m_free_vars.reset();
|
||||
m_todo.push_back(q.root);
|
||||
while (!m_todo.empty()) {
|
||||
PDD r = m_todo.back();
|
||||
m_todo.pop_back();
|
||||
if (is_val(r) || is_marked(r)) continue;
|
||||
set_mark(r);
|
||||
set_mark(m_var2pdd[var(r)]);
|
||||
if (!is_marked(lo(r))) m_todo.push_back(lo(r));
|
||||
if (!is_marked(hi(r))) m_todo.push_back(hi(r));
|
||||
}
|
||||
m_todo.push_back(p.root);
|
||||
while (!m_todo.empty()) {
|
||||
PDD r = m_todo.back();
|
||||
|
|
|
@ -246,7 +246,6 @@ namespace dd {
|
|||
double tree_size(pdd const& p);
|
||||
|
||||
unsigned_vector const& free_vars(pdd const& p);
|
||||
unsigned_vector const& free_vars_except(pdd const& p, pdd const& q);
|
||||
|
||||
std::ostream& display(std::ostream& out);
|
||||
std::ostream& display(std::ostream& out, pdd const& b);
|
||||
|
@ -269,7 +268,6 @@ namespace dd {
|
|||
pdd hi() const { return pdd(m->hi(root), m); }
|
||||
unsigned var() const { return m->var(root); }
|
||||
rational const& val() const { SASSERT(is_val()); return m->val(root); }
|
||||
bool is_var() const { return !m->is_val(root); }
|
||||
bool is_val() const { return m->is_val(root); }
|
||||
bool is_zero() const { return m->is_zero(root); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue