uuverifiers / ostrich

An SMT Solver for string constraints

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QF_S solution soundness bug with str.++

muchang opened this issue · comments

[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

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

Thanks; those are again inputs outside of the handled fragment, but now (in the latest master) a proper error message should be produced.

Thanks! Ostrich now can produce proper error messages and correct answers.