summaryrefslogtreecommitdiff
path: root/test/regress/regress1/strings/issue3357.smt2
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2019-10-06 02:33:25 -0500
committerAndres Noetzli <andres.noetzli@gmail.com>2019-10-06 00:33:25 -0700
commit51f9809788e4d26a423d9812ceab0f6720550c1b (patch)
tree59c233fd8b18afa6ae3f2e6797f405de7417de5b /test/regress/regress1/strings/issue3357.smt2
parent472c5a592c78e4757b3201f9e20908a4c645921b (diff)
Fix str to int reduction (#3358)
This fixes a corner case of the str-to-int reduction for the case where the argument is the empty string. This fixes #3357.
Diffstat (limited to 'test/regress/regress1/strings/issue3357.smt2')
-rw-r--r--test/regress/regress1/strings/issue3357.smt218
1 files changed, 18 insertions, 0 deletions
diff --git a/test/regress/regress1/strings/issue3357.smt2 b/test/regress/regress1/strings/issue3357.smt2
new file mode 100644
index 000000000..940245c08
--- /dev/null
+++ b/test/regress/regress1/strings/issue3357.smt2
@@ -0,0 +1,18 @@
+(set-logic ALL_SUPPORTED)
+(set-option :strings-exp true)
+(set-info :status unsat)
+(declare-fun a () String)
+(declare-fun b () String)
+(declare-const c String)
+(declare-const d String)
+(declare-const g String)
+(declare-const e String)
+(declare-const f String)
+(assert (or
+ (and (= d (str.++ e g)) (str.in.re e (re.* (str.to.re "HG4"))) (> 0 (str.to.int g)) (= 1 (str.len e)) (= 2 (str.len (str.substr b 0 (str.len d)))))
+ (and
+ (str.in.re (str.replace (str.replace a c "") "T" "") (re.* (re.union (str.to.re "a") (str.to.re ""))))
+ (= 0 (str.to.int (str.replace (str.replace a c "") "T" "")))))
+)
+(assert (= b (str.++ d f)))
+(check-sat
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback