mirror of
https://github.com/Z3Prover/z3
synced 2026-04-04 02:39:02 +00:00
add filter for avoiding creating redundant disequality axioms
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1d928663de
commit
0f4126f665
4 changed files with 20 additions and 3 deletions
|
|
@ -1357,8 +1357,14 @@ namespace seq {
|
|||
expr_ref vp = m_sk.mk("diseq.v'", u, v);
|
||||
expr_ref up_len(mk_len(up), m);
|
||||
expr_ref vp_len(mk_len(vp), m);
|
||||
expr_ref u_eq(mk_eq(u, mk_concat(w, seq.str.mk_unit(a), up)), m);
|
||||
expr_ref v_eq(mk_eq(v, mk_concat(w, seq.str.mk_unit(b), vp)), m);
|
||||
expr_ref wau(mk_concat(w, seq.str.mk_unit(a), up), m);
|
||||
expr_ref wbv(mk_concat(w, seq.str.mk_unit(b), vp), m);
|
||||
expr_ref u_eq(mk_eq(u, wau), m);
|
||||
expr_ref v_eq(mk_eq(v, wbv), m);
|
||||
if (m_mark_no_diseq) {
|
||||
m_mark_no_diseq(wau);
|
||||
m_mark_no_diseq(wbv);
|
||||
}
|
||||
add_clause(eq_uv, ~len_eq, u_eq);
|
||||
add_clause(eq_uv, ~len_eq, v_eq);
|
||||
add_clause(eq_uv, ~len_eq, ~mk_eq(a, b));
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ namespace seq {
|
|||
std::function<void(expr_ref_vector const&)> m_add_clause;
|
||||
std::function<void(expr*)> m_set_phase;
|
||||
std::function<void(void)> m_ensure_digits;
|
||||
std::function<void(expr *)> m_mark_no_diseq;
|
||||
|
||||
expr_ref mk_len(expr* s);
|
||||
expr_ref mk_sub(expr* x, expr* y);
|
||||
|
|
@ -81,6 +82,9 @@ namespace seq {
|
|||
void set_add_clause(std::function<void(expr_ref_vector const&)>& ac) { m_add_clause = ac; }
|
||||
void set_phase(std::function<void(expr*)>& sp) { m_set_phase = sp; }
|
||||
void set_ensure_digits(std::function<void(void)>& ed) { m_ensure_digits = ed; }
|
||||
void set_mark_no_diseq(std::function<void(expr *)> &f) {
|
||||
m_mark_no_diseq = f;
|
||||
}
|
||||
|
||||
void suffix_axiom(expr* n);
|
||||
void prefix_axiom(expr* n);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue