summaryrefslogtreecommitdiff
path: root/test/regress/regress0/strings
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-03-30 16:29:23 -0500
committerGitHub <noreply@github.com>2020-03-30 16:29:23 -0500
commit6838885b1250e0abbb1b8d56e6b400a5d7f3ca95 (patch)
tree3c1a7417d471aeea531a36024a460d605cb5d5f1 /test/regress/regress0/strings
parent3ff70d61c111b70d5bf770669b0aa3f1d47a502e (diff)
Support indexed operators re.loop and re.^ (#4167)
Towards support for the strings standard. This modifies our interface so that we accept the SMT-LIB standard versions of re.loop and re.^. This means re.loop no longer accepts 3 arguments but 1 (with 2 indices). This means we no longer accept re.loop with only a lower bound and no upper bound on the number of repetitions. Also fixes #4161.
Diffstat (limited to 'test/regress/regress0/strings')
-rw-r--r--test/regress/regress0/strings/bug002.smt22
-rw-r--r--test/regress/regress0/strings/loop-wrong-sem.smt24
2 files changed, 5 insertions, 1 deletions
diff --git a/test/regress/regress0/strings/bug002.smt2 b/test/regress/regress0/strings/bug002.smt2
index fd60089fd..5bf21ebb9 100644
--- a/test/regress/regress0/strings/bug002.smt2
+++ b/test/regress/regress0/strings/bug002.smt2
@@ -4,7 +4,7 @@
(set-info :status sat)
; regex = [\*-,\t\*-\|](.{6,}()?)+
-(define-fun strinre ((?s String)) Bool (str.in.re ?s (re.union re.nostr (re.++ (str.to.re "") (str.to.re "") (re.union re.nostr (re.range "*" ",") (str.to.re "\t") (re.range "*" "|") ) (re.+ (re.union re.nostr (re.++ (str.to.re "") (str.to.re "") (re.loop re.allchar 6 ) (re.opt (re.union re.nostr (re.++ (str.to.re "") (str.to.re "") ) ) ) ) ) ) ) ) ) )
+(define-fun strinre ((?s String)) Bool (str.in.re ?s (re.union re.nostr (re.++ (str.to.re "") (str.to.re "") (re.union re.nostr (re.range "*" ",") (str.to.re "\t") (re.range "*" "|") ) (re.+ (re.union re.nostr (re.++ (str.to.re "") (str.to.re "") ((_ re.^ 6) re.allchar) (re.opt (re.union re.nostr (re.++ (str.to.re "") (str.to.re "") ) ) ) ) ) ) ) ) ) )
(assert (not (strinre "6O\1\127\n?")))
(check-sat)
diff --git a/test/regress/regress0/strings/loop-wrong-sem.smt2 b/test/regress/regress0/strings/loop-wrong-sem.smt2
new file mode 100644
index 000000000..d0dd3fcb2
--- /dev/null
+++ b/test/regress/regress0/strings/loop-wrong-sem.smt2
@@ -0,0 +1,4 @@
+(set-logic ALL)
+(set-info :status unsat)
+(assert (str.in.re "" ((_ re.loop 1 0) (str.to.re ""))))
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback