mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
BDD vectors: add subtract and quot_rem, move finite domain abstraction out of bdd_manager (#5201)
* Coding style * Simplify bddv class * mk_eq: run loop from below * Add unit test for bddv unsigned comparison * Add test that shows contains_num/find_num fail after reordering * Add BDD vector subtraction * Call apply_rec in mk_ite_rec instead of apply * Question about mk_quant * Implement quot_rem over BDD vectors * Move shl/shr to bddv * Make unit test smaller * Add class dd::fdd to manage association between BDDs and numbers * Remove contains_num/find_num from bdd_manager
This commit is contained in:
parent
bc695a5a97
commit
77350d97da
10 changed files with 494 additions and 301 deletions
|
@ -57,13 +57,13 @@ namespace polysat {
|
|||
if (try_narrow_with(q, s)) {
|
||||
rational val;
|
||||
switch (s.find_viable(other_var, val)) {
|
||||
case dd::find_result::empty:
|
||||
case dd::find_t::empty:
|
||||
s.set_conflict(*this);
|
||||
return false;
|
||||
case dd::find_result::singleton:
|
||||
case dd::find_t::singleton:
|
||||
s.propagate(other_var, val, *this);
|
||||
return false;
|
||||
case dd::find_result::multiple:
|
||||
case dd::find_t::multiple:
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ namespace polysat {
|
|||
pvar v = q.var();
|
||||
rational a = q.hi().val();
|
||||
rational b = q.lo().val();
|
||||
bddv const& x = s.m_bdd.mk_var(s.sz2bits(s.size(v)));
|
||||
bddv const& x = s.sz2bits(s.size(v)).var();
|
||||
bdd xs = (a * x + b == rational(0));
|
||||
s.intersect_viable(v, xs);
|
||||
s.push_cjust(v, this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue