summaryrefslogtreecommitdiff
path: root/test/regress/regress2
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-09-10 06:54:11 -0700
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-09-10 08:54:11 -0500
commit9e269b18ef27c190b8cde7ea4cdb8bbb51d3c7e8 (patch)
tree32376cb35a481c2701003c1ed2b501d8d3996ee9 /test/regress/regress2
parent564f61f602b407e0598be762923853042a0e4aab (diff)
Add (str.replace (str.replace y w y) y z) rewrite (#2441)
Diffstat (limited to 'test/regress/regress2')
-rw-r--r--test/regress/regress2/strings/repl-repl.smt237
1 files changed, 37 insertions, 0 deletions
diff --git a/test/regress/regress2/strings/repl-repl.smt2 b/test/regress/regress2/strings/repl-repl.smt2
new file mode 100644
index 000000000..baa4a31d7
--- /dev/null
+++ b/test/regress/regress2/strings/repl-repl.smt2
@@ -0,0 +1,37 @@
+; COMMAND-LINE: --strings-exp --strings-fmf --incremental
+; EXPECT: sat
+; EXPECT: unsat
+; EXPECT: sat
+; EXPECT: sat
+; EXPECT: sat
+(set-logic SLIA)
+(declare-const x String)
+(declare-const y String)
+(declare-const z String)
+
+(push 1)
+(assert (not (= (str.replace (str.replace x "B" x) x "AB") (str.replace (str.replace x "B" "AB") x "AB"))))
+(check-sat)
+(pop 1)
+
+(push 1)
+(assert (not (= (str.replace (str.replace x "B" x) x "A") (str.replace (str.replace x "B" "A") x "A"))))
+(check-sat)
+(pop 1)
+
+(push 1)
+(assert (not (= (str.replace (str.replace x z x) x y) (str.replace (str.replace x z y) x y))))
+(check-sat)
+(pop 1)
+
+(push 1)
+(assert (not (= (str.replace (str.replace x z x) x y) (str.replace (str.replace x z y) x y))))
+(assert (<= (str.len y) (str.len z)))
+(check-sat)
+(pop 1)
+
+(push 1)
+(assert (not (= (str.replace (str.replace x z x) x y) (str.replace (str.replace x z y) x y))))
+(assert (not (= y z)))
+(check-sat)
+(pop 1)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback