summaryrefslogtreecommitdiff
path: root/test/regress/regress2
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-07-13 00:43:45 -0500
committerGitHub <noreply@github.com>2020-07-12 22:43:45 -0700
commitc7ec792a2086c5b92c4a96d18f7cedb293712dfd (patch)
treec88ebf889cb2f6aa6678154e1984bbe60a5b92b9 /test/regress/regress2
parent090d8bc3c31404140856e51d2cc5a5aa1335b3b3 (diff)
Add support for string/sequence update (#4725)
This adds basic support for string/sequence updating, which has a semantics that is length preserving.
Diffstat (limited to 'test/regress/regress2')
-rw-r--r--test/regress/regress2/strings/update-ex3.smt213
-rw-r--r--test/regress/regress2/strings/update-ex4-seq.smt211
2 files changed, 24 insertions, 0 deletions
diff --git a/test/regress/regress2/strings/update-ex3.smt2 b/test/regress/regress2/strings/update-ex3.smt2
new file mode 100644
index 000000000..e21a2f445
--- /dev/null
+++ b/test/regress/regress2/strings/update-ex3.smt2
@@ -0,0 +1,13 @@
+(set-logic QF_SLIA)
+(set-option :strings-exp true)
+(set-info :status sat)
+(declare-fun s () String)
+(declare-fun x () Int)
+(declare-fun y () Int)
+
+(assert (= s (str.update (str.update "ABCDEFG" x "ZZZ") y "X")))
+(assert (not (str.contains s "B")))
+(assert (not (str.contains s "D")))
+(assert (not (str.contains s "G")))
+
+(check-sat)
diff --git a/test/regress/regress2/strings/update-ex4-seq.smt2 b/test/regress/regress2/strings/update-ex4-seq.smt2
new file mode 100644
index 000000000..d28df8534
--- /dev/null
+++ b/test/regress/regress2/strings/update-ex4-seq.smt2
@@ -0,0 +1,11 @@
+(set-logic QF_SLIA)
+(set-option :strings-exp true)
+(set-info :status sat)
+(declare-fun s () (Seq Int))
+(declare-fun x () Int)
+
+(assert (= s (seq.++ (seq.unit 0) (seq.unit 1) (seq.unit 7) (seq.unit 3) (seq.unit 4) (seq.unit 5))))
+
+(assert (not (= s (seq.update s x (seq.unit x)))))
+
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback