Skip to content

Commit

Permalink
ensure lengths are registered for disequality fixe #4613
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <[email protected]>
  • Loading branch information
NikolajBjorner committed Aug 2, 2020
1 parent b82dff5 commit 7eb05dd
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/smt/seq_ne_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,20 @@ bool theory_seq::branch_nqs() {
}

lbool theory_seq::branch_nq(ne const& n) {

literal eq_len = mk_eq(mk_len(n.l()), mk_len(n.r()), false);
expr_ref len_l(mk_len(n.l()), m);
expr_ref len_r(mk_len(n.r()), m);
if (!has_length(n.l())) {
enque_axiom(len_l);
add_length(n.l(), len_l);
return l_undef;
}
if (!has_length(n.r())) {
enque_axiom(len_r);
add_length(n.r(), len_r);
return l_undef;
}

literal eq_len = mk_eq(len_l, len_r, false);
ctx.mark_as_relevant(eq_len);
switch (ctx.get_assignment(eq_len)) {
case l_false:
Expand Down

0 comments on commit 7eb05dd

Please sign in to comment.