// if (str.contains z w) ---> false and (str.len w) = 1
if (StringsEntail::checkLengthOne(node[1]))
{
- Node ctn = d_stringsEntail.checkContains(node[1], node[0][2]);
+ Node ctn = d_stringsEntail.checkContains(node[0][2], node[1]);
if (!ctn.isNull() && !ctn.getConst<bool>())
{
Node empty = Word::mkEmptyWord(stype);
// check if contains definitely does (or does not) hold
Node cmp_con = nm->mkNode(kind::STRING_STRCTN, node[0], node[1]);
Node cmp_conr = Rewriter::rewrite(cmp_con);
- if (!d_stringsEntail.checkContains(node[0], node[1]).isNull())
+ if (cmp_conr.isConst())
{
if (cmp_conr.getConst<bool>())
{
regress0/strings/issue5767-eager-pp.smt2
regress0/strings/issue5771-eager-pp.smt2
regress0/strings/issue5816-re-kind.smt2
+ regress0/strings/issue5915-repl-ctn-rewrite.smt2
regress0/strings/itos-entail.smt2
regress0/strings/large-model.smt2
regress0/strings/leadingzero001.smt2
--- /dev/null
+; COMMAND-LINE: --strings-exp
+; EXPECT: unsat
+(set-logic ALL)
+(set-info :status unsat)
+(declare-fun x () String)
+(declare-fun y () String)
+(declare-fun z () Int)
+(assert (= (str.replace (str.replace x "B" (str.++ "B" "B")) "B" (str.++ y "B")) (str.++ y "B")))
+(check-sat)