QF_S solution soundness bug with str.++
muchang opened this issue · comments
Chengyu Zhang commented
[538] % z3release small.smt2
unsat
[539] % cvc4 -q --strings-exp small.smt2
unsat
[540] % ostrich +quiet small.smt2
sat
[541] %
[541] % cat small.smt2
(declare-fun a () String)
(assert (not (= (str.++ (str.++ a a) "A") (str.++ a (str.++ a "A")))))
(check-sat)
[542] %
Or
[548] % z3release small.smt2
unsat
[549] % cvc4 -q --strings-exp small.smt2
unsat
[550] % ostrich +quiet small.smt2
sat
[551] %
[551] % cat small.smt2
(declare-fun a () String)
(assert (not (= a (str.++ a ""))))
(check-sat)
[552] %
Commit: 2f3ea5c
Chengyu Zhang commented
Another case:
[650] % z3release small.smt2
unsat
[651] % cvc4 -q --strings-exp small.smt2
unsat
[652] % ostrich +quiet small.smt2
sat
[653] %
[653] % cat small.smt2
(declare-fun a () String)
(declare-fun b () String)
(declare-fun c () String)
(assert (= "A" (str.++ a b) (str.++ a c)))
(assert (distinct b c ""))
(check-sat)
[654] %
Commit: 2f3ea5c
Philipp Ruemmer commented
Thanks; those are again inputs outside of the handled fragment, but now (in the latest master) a proper error message should be produced.
Chengyu Zhang commented
Thanks! Ostrich now can produce proper error messages and correct answers.