Fixes #6142.
{
// str.contains( z, w ) ----> false implies
// str.replace( x, w, str.replace( z, x, y ) ) ---> str.replace( x, w, z )
- Node cmp_con2 = d_stringsEntail.checkContains(node[1], node[2][0]);
+ Node cmp_con2 = d_stringsEntail.checkContains(node[2][0], node[1]);
if (!cmp_con2.isNull() && !cmp_con2.getConst<bool>())
{
Node res =
regress1/strings/issue5940-skc-len-conc.smt2
regress1/strings/issue5940-2-skc-len-conc.smt2
regress1/strings/issue6075-repl-len-one-rr.smt2
+ regress1/strings/issue6142-repl-inv-rew.smt2
regress1/strings/kaluza-fl.smt2
regress1/strings/loop002.smt2
regress1/strings/loop003.smt2
--- /dev/null
+; COMMAND-LINE: --strings-exp
+; EXPECT: sat
+(set-logic ALL)
+(declare-fun x () String)
+(declare-fun y () String)
+(assert (= (str.++ "A" y) (str.replace x (str.++ "A" y) (str.replace (str.++ "A" (str.replace y "" "A")) x "A"))))
+(check-sat)