Skip to content

Commit

Permalink
better behavior on disequality and branch selection
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <[email protected]>
  • Loading branch information
NikolajBjorner committed Jul 31, 2020
1 parent 02084dc commit 4392c03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/smt/theory_seq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3101,7 +3101,12 @@ void theory_seq::new_diseq_eh(theory_var v1, theory_var v2) {
}

dependency* dep = m_dm.mk_leaf(assumption(~lit));
m_nqs.push_back(ne(e1, e2, dep));
expr_ref len1(m_util.str.mk_length(e1), m);
expr_ref len2(m_util.str.mk_length(e2), m);
m_rewrite(len1);
m_rewrite(len2);
literal eqlen = mk_eq(len1, len2, false);
m_nqs.push_back(ne(e1, e2, eqlen, dep));
if (ctx.get_assignment(lit) != l_undef) {
solve_nqs(m_nqs.size() - 1);
}
Expand Down
3 changes: 2 additions & 1 deletion src/smt/theory_seq.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,12 @@ namespace smt {
literal_vector m_lits;
dependency* m_dep;
public:
ne(expr_ref const& l, expr_ref const& r, dependency* dep):
ne(expr_ref const& l, expr_ref const& r, literal eqlen, dependency* dep):
m_l(l), m_r(r), m_dep(dep) {
expr_ref_vector ls(l.get_manager()); ls.push_back(l);
expr_ref_vector rs(r.get_manager()); rs.push_back(r);
m_eqs.push_back(std::make_pair(ls, rs));
m_lits.push_back(eqlen);
}

ne(expr_ref const& _l, expr_ref const& _r, vector<decomposed_eq> const& eqs, literal_vector const& lits, dependency* dep):
Expand Down

0 comments on commit 4392c03

Please sign in to comment.