}
}
- if (s.getKind() == STRING_REV)
+ if (s.getKind() == STRING_REV && d_stringsEntail.checkLengthOne(x))
{
+ // str.update(str.rev(s), n, t) --->
+ // str.rev(str.update(s, len(s) - (n + 1), t))
NodeManager* nm = NodeManager::currentNM();
Node idx = nm->mkNode(MINUS,
nm->mkNode(STRING_LENGTH, s),
nm->mkNode(PLUS, i, nm->mkConstInt(Rational(1))));
- Node ret = nm->mkNode(STRING_REV, nm->mkNode(STRING_UPDATE, s, idx, x));
+ Node ret = nm->mkNode(STRING_REV, nm->mkNode(STRING_UPDATE, s[0], idx, x));
return returnRewrite(node, ret, Rewrite::UPD_REV);
}
regress0/strings/norn-simp-rew.smt2
regress0/strings/parser-syms.cvc.smt2
regress0/strings/proj-issue316-regexp-ite.smt2
+ regress0/strings/proj-issue390-update-rev-rewrite.smt2
regress0/strings/re_diff.smt2
regress0/strings/re-in-rewrite.smt2
regress0/strings/re-syntax.smt2
--- /dev/null
+(set-logic QF_BVSLIRA)
+(declare-const _x3 String)
+(declare-const _x5 Real)
+(assert (=
+ (str.rev _x3)
+ (str.at
+ (str.update (str.rev _x3) (bv2nat #b000000000000000000000000000000000001) (str.rev _x3))
+ (bv2nat #b000000000000000000000000000000000001))))
+(set-info :status sat)
+(check-sat)