3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-02 17:30:23 +00:00

fingers starting on xor_gaussian.cpp

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-11-10 13:08:31 -08:00
parent 12be80524d
commit 0ad2b54404

View file

@ -66,33 +66,34 @@ void PackedRow::get_reason(
PackedRow& tmp_col2, PackedRow& tmp_col2,
literal prop) { literal prop) {
tmp_col2.set_and(*this, cols_vals); tmp_col2.set_and(*this, cols_vals);
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++) {
if (mp[i]) { if (!mp[i])
int64_t tmp = mp[i]; continue;
unsigned long at; int64_t tmp = mp[i];
at = scan_fwd_64b(tmp); unsigned long at;
int extra = 0; at = scan_fwd_64b(tmp);
while (at != 0) { int extra = 0;
unsigned col = extra + at - 1 + i * 64; while (at != 0) {
SASSERT(operator[](col) == 1); unsigned col = extra + at - 1 + i * 64;
const unsigned var = col_to_var[col]; SASSERT(operator[](col) == 1);
if (var == prop.var()) { const unsigned var = col_to_var[col];
tmp_clause.push_back(prop); if (var == prop.var()) {
std::swap(tmp_clause[0], tmp_clause.back()); tmp_clause.push_back(prop);
} std::swap(tmp_clause[0], tmp_clause.back());
else {
bool val_bool = tmp_col2[col]; // NSB: double check if z3 use of sign is compatible
tmp_clause.push_back(sat::literal(var, val_bool));
}
extra += at;
if (extra == 64)
break;
tmp >>= at;
at = scan_fwd_64b(tmp);
} }
else {
bool val_bool = tmp_col2[col]; // NSB: double check if z3 use of sign is compatible
tmp_clause.push_back(sat::literal(var, val_bool));
}
extra += at;
if (extra == 64)
break;
tmp >>= at;
at = scan_fwd_64b(tmp);
} }
}
} }
gret PackedRow::propGause( gret PackedRow::propGause(