mirror of
https://github.com/Z3Prover/z3
synced 2025-08-30 15:00:08 +00:00
working on udoc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a50cbef877
commit
22808a039d
17 changed files with 171 additions and 39 deletions
|
@ -191,8 +191,17 @@ bool tbv_manager::set_and(tbv& dst, tbv const& src) const {
|
|||
}
|
||||
|
||||
bool tbv_manager::is_well_formed(tbv const& dst) const {
|
||||
for (unsigned i = 0; i < num_tbits(); ++i) {
|
||||
if (dst[i] == BIT_z) return false;
|
||||
unsigned nw = m.num_words();
|
||||
unsigned w;
|
||||
for (unsigned i = 0; i + 1 < nw; ++i) {
|
||||
w = dst.get_word(i);
|
||||
w = w | (w << 1) | 0x55555555;
|
||||
if (w != 0xFFFFFFFF) return false;
|
||||
}
|
||||
if (nw > 0) {
|
||||
w = m.last_word(dst);
|
||||
w = w | (w << 1) | 0x55555555 | ~m.get_mask();
|
||||
if (w != 0xFFFFFFFF) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue