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:
parent
439e8e6b04
commit
2d8325ed43
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue