3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-14 21:08:46 +00:00

fix axiomatization of str.replace. Fixes issue #703

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-08-20 06:05:13 -07:00
parent 439e8e6b04
commit 2d8325ed43

View file

@ -2902,9 +2902,11 @@ void theory_seq::add_replace_axiom(expr* r) {
expr_ref xty = mk_concat(x, t, y);
expr_ref xsy = mk_concat(x, s, y);
literal cnt = mk_literal(m_util.str.mk_contains(a ,s));
literal a_emp = mk_eq_empty(a);
add_axiom(~a_emp, mk_seq_eq(r, a));
add_axiom(cnt, mk_seq_eq(r, a));
add_axiom(~cnt, mk_seq_eq(a, xsy));
add_axiom(~cnt, mk_seq_eq(r, xty));
add_axiom(~cnt, a_emp, mk_seq_eq(a, xsy));
add_axiom(~cnt, a_emp, mk_seq_eq(r, xty));
tightest_prefix(s, x);
}