summaryrefslogtreecommitdiff
path: root/test/regress/regress0/strings
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-02-26 21:54:29 -0600
committerGitHub <noreply@github.com>2020-02-26 21:54:29 -0600
commit87f3741db6ed41d3a776774bc1b60fd696585391 (patch)
tree26f2498075d175ecc6c18743cb21ff3998ccc008 /test/regress/regress0/strings
parentcca153771119b70cbf01a3d05d8e2fd8d7e8636a (diff)
Add support for is_digit and regular expression difference (#3828)
Towards support for the strings standard. This adds support for str.is_digit and re.diff, which both can be eliminated eager during preprocessing.
Diffstat (limited to 'test/regress/regress0/strings')
-rw-r--r--test/regress/regress0/strings/is_digit_simple.smt211
-rw-r--r--test/regress/regress0/strings/re_diff.smt211
2 files changed, 22 insertions, 0 deletions
diff --git a/test/regress/regress0/strings/is_digit_simple.smt2 b/test/regress/regress0/strings/is_digit_simple.smt2
new file mode 100644
index 000000000..d95a22078
--- /dev/null
+++ b/test/regress/regress0/strings/is_digit_simple.smt2
@@ -0,0 +1,11 @@
+; COMMAND-LINE: --lang=smt2.6.1
+; EXPECT: sat
+(set-logic ALL)
+(set-info :status sat)
+
+(assert (str.is_digit "0"))
+(assert (str.is_digit "7"))
+(assert (not (str.is_digit "A")))
+(assert (not (str.is_digit "")))
+
+(check-sat)
diff --git a/test/regress/regress0/strings/re_diff.smt2 b/test/regress/regress0/strings/re_diff.smt2
new file mode 100644
index 000000000..d63731acb
--- /dev/null
+++ b/test/regress/regress0/strings/re_diff.smt2
@@ -0,0 +1,11 @@
+; COMMAND-LINE: --lang=smt2.6.1
+; EXPECT: unsat
+(set-logic ALL)
+(set-info :status unsat)
+(declare-fun x () String)
+(declare-fun y () String)
+
+(assert (str.in_re x (re.diff (re.* (str.to_re "A")) re.none)))
+(assert (or (not (str.in_re x (re.* (str.to_re "A")))) (str.in_re y (re.diff (re.* (str.to_re "B")) re.all))))
+
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback