summaryrefslogtreecommitdiff
path: root/test/regress
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-08-06 22:39:21 -0500
committerGitHub <noreply@github.com>2018-08-06 22:39:21 -0500
commit562ee7da1637353a73884af6c9869cd21554b534 (patch)
treeb5856bcd26ac63e14cfbd557bdf5303397125f7c /test/regress
parentf539a525ca5081f0613a756b8bc3e28f35e13239 (diff)
Add RegLan to smt2/sygus parsers. (#2276)
Diffstat (limited to 'test/regress')
-rw-r--r--test/regress/Makefile.tests1
-rw-r--r--test/regress/regress1/sygus/simple-regexp.sy37
2 files changed, 38 insertions, 0 deletions
diff --git a/test/regress/Makefile.tests b/test/regress/Makefile.tests
index 34855e81d..aec72993c 100644
--- a/test/regress/Makefile.tests
+++ b/test/regress/Makefile.tests
@@ -1544,6 +1544,7 @@ REG1_TESTS = \
regress1/sygus/process-10-vars.sy \
regress1/sygus/qe.sy \
regress1/sygus/real-grammar.sy \
+ regress1/sygus/simple-regexp.sy \
regress1/sygus/stopwatch-bt.sy \
regress1/sygus/strings-concat-3-args.sy \
regress1/sygus/strings-double-rec.sy \
diff --git a/test/regress/regress1/sygus/simple-regexp.sy b/test/regress/regress1/sygus/simple-regexp.sy
new file mode 100644
index 000000000..b4c248de9
--- /dev/null
+++ b/test/regress/regress1/sygus/simple-regexp.sy
@@ -0,0 +1,37 @@
+; EXPECT: unsat
+; COMMAND-LINE: --sygus-out=status
+(set-logic SLIA)
+(synth-fun P ((x String)) Bool (
+(Start Bool (
+ (str.in.re StartStr StartRL)
+ ))
+(StartStr String (
+ x
+ (str.++ StartStr StartStr)
+ ))
+(StartStrC String (
+ "A" "B" ""
+ (str.++ StartStrC StartStrC)))
+(StartRL RegLan (
+(re.++ StartRLi StartRLi)
+(re.inter StartRL StartRL)
+(re.union StartRL StartRL)
+(re.* StartRLi)
+))
+(StartRLi RegLan (
+(str.to.re StartStrC)
+(re.inter StartRLi StartRLi)
+(re.union StartRLi StartRLi)
+(re.++ StartRLi StartRLi)
+(re.* StartRLi)
+))
+))
+
+(constraint (P "AAAAA"))
+(constraint (P "AAA"))
+(constraint (P "AA"))
+(constraint (not (P "AB")))
+(constraint (not (P "B")))
+
+; (str.in.re x (re.* (str.to.re "A"))) is a solution
+(check-synth)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback