3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-10 02:50:55 +00:00

Merge shared parts from polysat branch (#7063)

* sat_literal: make constants constexpr

* dlist: rename elem -> list

* tbv: use get_bit

* additional pdd and rational tests

* egraph: callback setters take functions by value

This allows to set callbacks without defining a separate variable for
the callback lambda.

(previous usage does one copy of the function, exactly as before)

* cmake: enable compiler error when non-void function does not return value
This commit is contained in:
Jakob Rath 2023-12-28 20:11:53 +01:00 committed by GitHub
parent 53c95e3627
commit ec2b8eb4ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 101 additions and 43 deletions

View file

@ -142,12 +142,8 @@ void tbv_manager::set(tbv& dst, rational const& r, unsigned hi, unsigned lo) {
set(dst, r.get_uint64(), hi, lo);
return;
}
for (unsigned i = 0; i < hi - lo + 1; ++i) {
if (bitwise_and(r, rational::power_of_two(i)).is_zero())
set(dst, lo + i, BIT_0);
else
set(dst, lo + i, BIT_1);
}
for (unsigned i = 0; i < hi - lo + 1; ++i)
set(dst, lo + i, r.get_bit(i) ? BIT_1 : BIT_0);
}
void tbv_manager::set(tbv& dst, tbv const& other, unsigned hi, unsigned lo) {