3
0
Fork 0
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:
Jakob Rath 2021-04-16 17:44:18 +02:00 committed by GitHub
parent e970fe5034
commit f72e30e539
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 208 additions and 104 deletions

View file

@ -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;

View file

@ -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;