mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 02:42:02 +00:00
Fix bit-blasting discrepancy. #690
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
cf48eb5f72
commit
6559fd817d
1 changed files with 4 additions and 0 deletions
|
@ -312,6 +312,7 @@ namespace smt {
|
||||||
SASSERT(v != null_theory_var);
|
SASSERT(v != null_theory_var);
|
||||||
unsigned sz = bits.size();
|
unsigned sz = bits.size();
|
||||||
SASSERT(get_bv_size(n) == sz);
|
SASSERT(get_bv_size(n) == sz);
|
||||||
|
m_bits[v].reset();
|
||||||
for (unsigned i = 0; i < sz; i++) {
|
for (unsigned i = 0; i < sz; i++) {
|
||||||
expr * bit = bits.get(i);
|
expr * bit = bits.get(i);
|
||||||
expr_ref s_bit(m);
|
expr_ref s_bit(m);
|
||||||
|
@ -809,6 +810,7 @@ namespace smt {
|
||||||
theory_var v = e->get_th_var(get_id());
|
theory_var v = e->get_th_var(get_id());
|
||||||
unsigned num_args = n->get_num_args();
|
unsigned num_args = n->get_num_args();
|
||||||
unsigned i = num_args;
|
unsigned i = num_args;
|
||||||
|
m_bits[v].reset();
|
||||||
while (i > 0) {
|
while (i > 0) {
|
||||||
i--;
|
i--;
|
||||||
theory_var arg = get_arg_var(e, i);
|
theory_var arg = get_arg_var(e, i);
|
||||||
|
@ -830,6 +832,7 @@ namespace smt {
|
||||||
unsigned end = n->get_decl()->get_parameter(0).get_int();
|
unsigned end = n->get_decl()->get_parameter(0).get_int();
|
||||||
SASSERT(start <= end);
|
SASSERT(start <= end);
|
||||||
literal_vector & arg_bits = m_bits[arg];
|
literal_vector & arg_bits = m_bits[arg];
|
||||||
|
m_bits[v].reset();
|
||||||
for (unsigned i = start; i <= end; ++i)
|
for (unsigned i = start; i <= end; ++i)
|
||||||
add_bit(v, arg_bits[i]);
|
add_bit(v, arg_bits[i]);
|
||||||
find_wpos(v);
|
find_wpos(v);
|
||||||
|
@ -1533,6 +1536,7 @@ namespace smt {
|
||||||
}
|
}
|
||||||
|
|
||||||
void theory_bv::unmerge_eh(theory_var v1, theory_var v2) {
|
void theory_bv::unmerge_eh(theory_var v1, theory_var v2) {
|
||||||
|
|
||||||
// v1 was the root of the equivalence class
|
// v1 was the root of the equivalence class
|
||||||
// I must remove the zero_one_bits that are from v2.
|
// I must remove the zero_one_bits that are from v2.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue