3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-14 11:14:43 +00:00

better behavior on disequality and branch selection (#4605)

* better behavior on disequality and branch selection

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix loop

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-07-31 01:14:11 -07:00 committed by GitHub
parent e0d4669116
commit 3f862cb2ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 80 deletions

View file

@ -53,6 +53,7 @@ bool theory_seq::check_ne_literals(unsigned idx, unsigned& num_undef_lits) {
TRACE("seq", display_disequation(tout << "has false literal\n", n);
ctx.display_literal_verbose(tout, lit);
tout << "\n" << lit << " " << ctx.is_relevant(lit) << "\n";
display(tout);
);
return false;
case l_true:
@ -132,6 +133,13 @@ bool theory_seq::propagate_ne2eq(unsigned idx) {
bool theory_seq::propagate_ne2eq(unsigned idx, expr_ref_vector const& es) {
if (es.empty())
return false;
for (expr* e : es) {
expr_ref len_e = mk_len(e);
rational lo;
if (lower_bound(len_e, lo) && lo > 0) {
return true;
}
}
ne const& n = m_nqs[idx];
expr_ref e(m), head(m), tail(m);
e = mk_concat(es, m.get_sort(es[0]));
@ -220,10 +228,8 @@ bool theory_seq::reduce_ne(unsigned idx) {
}
}
TRACE("seq", display_disequation(tout << "updated: " << updated << "\n", n););
if (updated) {
TRACE("seq", display_disequation(tout, n););
m_nqs.set(idx, ne(n.l(), n.r(), new_eqs, new_lits, new_deps));
TRACE("seq", display_disequation(tout << "updated:\n", m_nqs[idx]););
}