mirror of
https://github.com/Z3Prover/z3
synced 2025-11-20 12:46:39 +00:00
na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0e5b504c30
commit
58474df438
4 changed files with 170 additions and 55 deletions
|
|
@ -186,8 +186,15 @@ namespace bv {
|
|||
bool get_at_most(bvect const& src, bvect& dst) const;
|
||||
bool get_at_least(bvect const& src, bvect& dst) const;
|
||||
|
||||
bool set_random_at_most(bvect const& src, bvect& tmp, random_gen& r);
|
||||
bool set_random_at_least(bvect const& src, bvect& tmp, random_gen& r);
|
||||
|
||||
bool set_repair(bool try_down, bvect& dst);
|
||||
|
||||
|
||||
static digit_t random_bits(random_gen& r);
|
||||
void get_variant(bvect& dst, random_gen& r) const;
|
||||
|
||||
bool try_set(bvect const& src) {
|
||||
if (!can_set(src))
|
||||
return false;
|
||||
|
|
@ -237,6 +244,15 @@ namespace bv {
|
|||
dst.set(i, b);
|
||||
}
|
||||
|
||||
bool try_set_range(bvect& dst, unsigned lo, unsigned hi, bool b) {
|
||||
for (unsigned i = lo; i < hi; ++i)
|
||||
if (fixed.get(i) && get_bit(i) != b)
|
||||
return false;
|
||||
for (unsigned i = lo; i < hi; ++i)
|
||||
dst.set(i, b);
|
||||
return true;
|
||||
}
|
||||
|
||||
void set(bvect& dst, unsigned v) const {
|
||||
dst[0] = v;
|
||||
for (unsigned i = 1; i < nw; ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue