mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
Add BDD utilities; use them for narrowing/propagation of linear equality constraints (#5192)
* Add a few helper methods for encoding sets of integers as BDDs * Use BDD functions in solver * Add bdd::find_int * Use bdd::find_int in solver * Add narrowing for linear equality constraints * Simplify code for linear propagation * Add test for later * Narrowing can only handle linear constraints with a single variable * Need to push_cjust
This commit is contained in:
parent
e970fe5034
commit
f72e30e539
10 changed files with 208 additions and 104 deletions
|
@ -130,7 +130,7 @@ bool rational::limit_denominator(rational &num, rational const& limit) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool rational::mult_inverse(unsigned num_bits, rational & result) {
|
||||
bool rational::mult_inverse(unsigned num_bits, rational & result) const {
|
||||
rational const& n = *this;
|
||||
if (n.is_one()) {
|
||||
result = n;
|
||||
|
|
|
@ -343,7 +343,7 @@ public:
|
|||
return m().is_power_of_two(m_val, shift);
|
||||
}
|
||||
|
||||
bool mult_inverse(unsigned num_bits, rational & result);
|
||||
bool mult_inverse(unsigned num_bits, rational & result) const;
|
||||
|
||||
static rational const & zero() {
|
||||
return m_zero;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue