mirror of
https://github.com/Z3Prover/z3
synced 2025-10-16 12:30:28 +00:00
Merge branch 'master' of https://github.com/Z3Prover/z3
This commit is contained in:
commit
a59ed0fc2f
6 changed files with 28 additions and 24 deletions
|
@ -1045,15 +1045,13 @@ namespace smt {
|
|||
bool context::simplify_aux_clause_literals(unsigned & num_lits, literal * lits, literal_buffer & simp_lits) {
|
||||
std::sort(lits, lits + num_lits);
|
||||
literal prev = null_literal;
|
||||
unsigned i = 0;
|
||||
unsigned j = 0;
|
||||
for (; i < num_lits; i++) {
|
||||
for (unsigned i = 0; i < num_lits; i++) {
|
||||
literal curr = lits[i];
|
||||
lbool val = get_assignment(curr);
|
||||
if (val == l_false)
|
||||
simp_lits.push_back(~curr);
|
||||
switch(val) {
|
||||
case l_false:
|
||||
simp_lits.push_back(~curr);
|
||||
break; // ignore literal
|
||||
case l_undef:
|
||||
if (curr == ~prev)
|
||||
|
@ -1295,8 +1293,9 @@ namespace smt {
|
|||
SASSERT(get_assignment(simp_lits[i]) == l_true);
|
||||
}
|
||||
});
|
||||
if (old_num_lits != num_lits)
|
||||
if (!simp_lits.empty()) {
|
||||
j = mk_justification(unit_resolution_justification(m_region, j, simp_lits.size(), simp_lits.c_ptr()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CLS_AUX_LEMMA: {
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace smt {
|
|||
tout << lits[i] << " ";
|
||||
}
|
||||
tout << "\n";);
|
||||
SASSERT(m_num_literals > 0);
|
||||
}
|
||||
|
||||
unit_resolution_justification::unit_resolution_justification(justification * js,
|
||||
|
@ -68,6 +69,7 @@ namespace smt {
|
|||
tout << lits[i] << " ";
|
||||
}
|
||||
tout << "\n";);
|
||||
SASSERT(num_lits != 0);
|
||||
}
|
||||
|
||||
unit_resolution_justification::~unit_resolution_justification() {
|
||||
|
|
|
@ -312,6 +312,7 @@ namespace smt {
|
|||
SASSERT(v != null_theory_var);
|
||||
unsigned sz = bits.size();
|
||||
SASSERT(get_bv_size(n) == sz);
|
||||
m_bits[v].reset();
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
expr * bit = bits.get(i);
|
||||
expr_ref s_bit(m);
|
||||
|
@ -809,6 +810,7 @@ namespace smt {
|
|||
theory_var v = e->get_th_var(get_id());
|
||||
unsigned num_args = n->get_num_args();
|
||||
unsigned i = num_args;
|
||||
m_bits[v].reset();
|
||||
while (i > 0) {
|
||||
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();
|
||||
SASSERT(start <= end);
|
||||
literal_vector & arg_bits = m_bits[arg];
|
||||
m_bits[v].reset();
|
||||
for (unsigned i = start; i <= end; ++i)
|
||||
add_bit(v, arg_bits[i]);
|
||||
find_wpos(v);
|
||||
|
@ -1533,6 +1536,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
void theory_bv::unmerge_eh(theory_var v1, theory_var v2) {
|
||||
|
||||
// v1 was the root of the equivalence class
|
||||
// I must remove the zero_one_bits that are from v2.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue