diff options
Diffstat (limited to 'test/regress/regress0/strings')
-rw-r--r-- | test/regress/regress0/strings/Makefile.am | 14 | ||||
-rw-r--r-- | test/regress/regress0/strings/cmu-5042-0707-2.smt2 | 15 | ||||
-rw-r--r-- | test/regress/regress0/strings/cmu-dis-0707-3.smt2 | 24 | ||||
-rw-r--r-- | test/regress/regress0/strings/cmu-disagree-0707-dd.smt2 | 22 | ||||
-rw-r--r-- | test/regress/regress0/strings/cmu-inc-nlpp-071516.smt2 | 9 | ||||
-rw-r--r-- | test/regress/regress0/strings/cmu-substr-rw.smt2 | 12 | ||||
-rw-r--r-- | test/regress/regress0/strings/csp-prefix-exp-bug.smt2 | 10 | ||||
-rw-r--r-- | test/regress/regress0/strings/gm-inc-071516-2.smt2 | 10 | ||||
-rw-r--r-- | test/regress/regress0/strings/nf-ff-contains-abs.smt2 | 15 | ||||
-rw-r--r-- | test/regress/regress0/strings/norn-dis-0707-3.smt2 | 26 |
10 files changed, 155 insertions, 2 deletions
diff --git a/test/regress/regress0/strings/Makefile.am b/test/regress/regress0/strings/Makefile.am index 477d336e6..2e4fd4e1c 100644 --- a/test/regress/regress0/strings/Makefile.am +++ b/test/regress/regress0/strings/Makefile.am @@ -67,7 +67,6 @@ TESTS = \ bug612.smt2 \ bug615.smt2 \ kaluza-fl.smt2 \ - norn-ab.smt2 \ idof-rewrites.smt2 \ bug682.smt2 \ bug686dd.smt2 \ @@ -78,7 +77,15 @@ TESTS = \ norn-31.smt2 \ strings-native-simple.cvc \ cmu-2db2-extf-reg.smt2 \ - norn-nel-bug-052116.smt2 + norn-nel-bug-052116.smt2 \ + cmu-disagree-0707-dd.smt2 \ + cmu-5042-0707-2.smt2 \ + cmu-dis-0707-3.smt2 \ + nf-ff-contains-abs.smt2 \ + csp-prefix-exp-bug.smt2 \ + cmu-substr-rw.smt2 \ + gm-inc-071516-2.smt2 \ + cmu-inc-nlpp-071516.smt2 FAILING_TESTS = @@ -87,6 +94,9 @@ EXTRA_DIST = $(TESTS) # and make sure to distribute it EXTRA_DIST += +#norn-dis-0707-3.smt2 +#norn-ab.smt2 + # synonyms for "check" .PHONY: regress regress0 test regress regress0 test: check diff --git a/test/regress/regress0/strings/cmu-5042-0707-2.smt2 b/test/regress/regress0/strings/cmu-5042-0707-2.smt2 new file mode 100644 index 000000000..637142dfb --- /dev/null +++ b/test/regress/regress0/strings/cmu-5042-0707-2.smt2 @@ -0,0 +1,15 @@ +(set-logic ALL_SUPPORTED) +(set-info :status sat) +(set-option :strings-exp true) + +(declare-fun key2 () String) +(declare-fun key1 () String) + +(assert +(and +(not +(str.contains (str.++ (str.replace (str.substr key2 0 (- (+ (str.indexof key2 "X" 0) 1) 0)) "X" "x") (str.++ (str.replace (str.substr (str.substr key2 (+ (str.indexof key2 "X" 0) 1) (- (str.len key2) (+ (str.indexof key2 "X" 0) 1))) 0 (- (+ (str.indexof (str.substr key2 (+ (str.indexof key2 "X" 0) 1) (- (str.len key2) (+ (str.indexof key2 "X" 0) 1))) "X" 0) 1) 0)) "X" "x") (str.substr (str.substr key2 (+ (str.indexof key2 "X" 0) 1) (- (str.len key2) (+ (str.indexof key2 "X" 0) 1))) (+ (str.indexof (str.substr key2 (+ (str.indexof key2 "X" 0) 1) (- (str.len key2) (+ (str.indexof key2 "X" 0) 1))) "X" 0) 1) (- (str.len (str.substr key2 (+ (str.indexof key2 "X" 0) 1) (- (str.len key2) (+ (str.indexof key2 "X" 0) 1)))) (+ (str.indexof (str.substr key2 (+ (str.indexof key2 "X" 0) 1) (- (str.len key2) (+ (str.indexof key2 "X" 0) 1))) "X" 0) 1))))) "Z")) +(str.contains (str.substr key2 (+ (str.indexof key2 "X" 0) 1) (- (str.len key2) (+ (str.indexof key2 "X" 0) 1))) "X"))) + +(check-sat) + diff --git a/test/regress/regress0/strings/cmu-dis-0707-3.smt2 b/test/regress/regress0/strings/cmu-dis-0707-3.smt2 new file mode 100644 index 000000000..209cbb3f9 --- /dev/null +++ b/test/regress/regress0/strings/cmu-dis-0707-3.smt2 @@ -0,0 +1,24 @@ +(set-logic ALL_SUPPORTED) +(set-info :status sat) +(set-option :strings-exp true) +(declare-fun value () String) +(declare-fun name () String) +(assert (not (not (not (= (ite (str.contains value "?") 1 0) 0))))) +(assert (not (not (= (ite (str.contains value "#") 1 0) 0)))) +(assert (not (not (= (ite (= (str.substr value 0 (- 2 0)) "//") 1 0) 0)))) +(assert (not (not (= (ite (> (str.indexof value ":" 0) 0) 1 0) 0)))) +(assert (not (= (ite (not (= (str.len value) 0)) 1 0) 0))) +(assert (not (not (= (ite (str.contains value "'") 1 0) 0)))) +(assert (not (not (= (ite (str.contains value "\"") 1 0) 0)))) +(assert (not (not (= (ite (str.contains value ">") 1 0) 0)))) +(assert (not (not (= (ite (str.contains value "<") 1 0) 0)))) +(assert (not (not (= (ite (str.contains value "&") 1 0) 0)))) +(assert (not (not (= (ite (str.contains name "'") 1 0) 0)))) +(assert (not (not (= (ite (str.contains name "\"") 1 0) 0)))) +(assert (not (not (= (ite (str.contains name ">") 1 0) 0)))) +(assert (not (not (= (ite (str.contains name "<") 1 0) 0)))) +(assert (not (not (= (ite (str.contains name "&") 1 0) 0)))) +(assert (not (= (ite (not (= value "")) 1 0) 0))) +(assert (not (= (ite (str.contains value "javascript:alert(1);") 1 0) 0))) +(assert (not (not (= (ite (str.contains name "javascript:alert(1);") 1 0) 0)))) +(check-sat) diff --git a/test/regress/regress0/strings/cmu-disagree-0707-dd.smt2 b/test/regress/regress0/strings/cmu-disagree-0707-dd.smt2 new file mode 100644 index 000000000..c44dfa396 --- /dev/null +++ b/test/regress/regress0/strings/cmu-disagree-0707-dd.smt2 @@ -0,0 +1,22 @@ +(set-logic ALL_SUPPORTED) +(set-info :status sat) +(set-option :strings-exp true) + +(declare-fun url () String) + +(assert +(and +(and +(and +(and + +(= (str.len (str.substr (str.substr url (str.indexof url "#" 2) (- (str.len url) (str.indexof url "#" 2))) (+ (str.indexof (str.substr url (str.indexof url "#" 2) (- (str.len url) (str.indexof url "#" 2))) "#" 0) 1) (- (str.len (str.substr url (str.indexof url "#" 2) (- (str.len url) (str.indexof url "#" 2)))) (+ (str.indexof (str.substr url (str.indexof url "#" 2) (- (str.len url) (str.indexof url "#" 2))) "#" 0) 1)))) 0) + +(not (= (str.substr url 0 (- (str.indexof url ":" 0) 0)) "http"))) +(> (str.indexof url ":" 0) 0)) +(>= (- (str.indexof url "#" 2) 2) 0)) +(>= (str.indexof url ":" 0) 0)) +) + +(check-sat) + diff --git a/test/regress/regress0/strings/cmu-inc-nlpp-071516.smt2 b/test/regress/regress0/strings/cmu-inc-nlpp-071516.smt2 new file mode 100644 index 000000000..1208ca169 --- /dev/null +++ b/test/regress/regress0/strings/cmu-inc-nlpp-071516.smt2 @@ -0,0 +1,9 @@ +(set-logic ALL_SUPPORTED) +(set-info :status unsat) +(set-option :strings-exp true) + +(declare-fun url () String) + +(assert (and (and (and (and (and (and (and (and (and (and (and (and (and (and (and (not (not (= (ite (> (str.indexof url ":" 0) 0) 1 0) 0))) (not (= (ite (str.contains url "javascript:alert(1);") 1 0) 0))) (not (not (= (ite (= (str.len url) 0) 1 0) 0)))) (not (not (= (ite (= (str.at url 0) " ") 1 0) 0)))) (not (not (= (ite (= (str.at url 0) "\t") 1 0) 0)))) (not (not (= (ite (= (str.at url 0) "\n") 1 0) 0)))) (not (not (= (ite (= (str.at url 0) "\r") 1 0) 0)))) (not (not (= (ite (= (str.at url 0) "\v") 1 0) 0)))) (not (not (= (ite (= (str.at url 0) "\f") 1 0) 0)))) (not (not (= (ite (= (str.at url (- (str.len url) 1)) " ") 1 0) 0)))) (not (not (= (ite (= (str.at url (- (str.len url) 1)) "\t") 1 0) 0)))) (not (not (= (ite (= (str.at url (- (str.len url) 1)) "\n") 1 0) 0)))) (not (not (= (ite (= (str.at url (- (str.len url) 1)) "\r") 1 0) 0)))) (not (not (= (ite (= (str.at url (- (str.len url) 1)) "\v") 1 0) 0)))) (not (not (= (ite (= (str.at url (- (str.len url) 1)) "\f") 1 0) 0)))) (not (= (ite (str.prefixof "javascript:alert(1);" url) 1 0) 0)))) + +(check-sat) diff --git a/test/regress/regress0/strings/cmu-substr-rw.smt2 b/test/regress/regress0/strings/cmu-substr-rw.smt2 new file mode 100644 index 000000000..20bf979dd --- /dev/null +++ b/test/regress/regress0/strings/cmu-substr-rw.smt2 @@ -0,0 +1,12 @@ +(set-logic ALL_SUPPORTED) +(set-info :status sat) +(set-option :strings-exp true) +;(set-option :produce-models true) +;(set-option :rewrite-divk true) + +(declare-fun uri () String) + +(assert (and (and (and (and (and (and (and (and (and (and (and (and (not (not (= (ite (= (str.len (str.substr (str.substr uri (+ (str.indexof uri "%" 0) 1) (- (str.len uri) (+ (str.indexof uri "%" 0) 1))) 0 (- 2 0))) 2) 1 0) 0))) (not (not (= (ite (str.contains (str.substr uri (+ (str.indexof uri "%" 0) 1) (- (str.len uri) (+ (str.indexof uri "%" 0) 1))) "%") 1 0) 0)))) (not (not (= (ite (= (str.len (str.substr uri (+ (str.indexof uri "%" 0) 1) (- (str.len uri) (+ (str.indexof uri "%" 0) 1)))) 0) 1 0) 0)))) (not (= (ite (str.contains uri "%") 1 0) 0))) (not (not (= (ite (= (str.len uri) 0) 1 0) 0)))) (>= (+ (str.indexof uri "%" 0) 1) 0)) (>= (- (str.len uri) (+ (str.indexof uri "%" 0) 1)) 0)) (>= 0 0)) (>= (- 2 0) 0)) (>= (+ (str.indexof uri "%" 0) 1) 0)) (>= (- (str.len uri) (+ (str.indexof uri "%" 0) 1)) 0)) (>= (+ (str.indexof uri "%" 0) 1) 0)) (>= (- (str.len uri) (+ (str.indexof uri "%" 0) 1)) 0))) + +(check-sat) + diff --git a/test/regress/regress0/strings/csp-prefix-exp-bug.smt2 b/test/regress/regress0/strings/csp-prefix-exp-bug.smt2 new file mode 100644 index 000000000..c2fb4175c --- /dev/null +++ b/test/regress/regress0/strings/csp-prefix-exp-bug.smt2 @@ -0,0 +1,10 @@ +(set-logic QF_S) +(set-info :status sat) + +(declare-fun x () String) +(declare-fun y () String) +(declare-fun z () String) + +(assert (= (str.len x) 1)) +(assert (= (str.++ x y "b" z) "aaaba")) +(check-sat) diff --git a/test/regress/regress0/strings/gm-inc-071516-2.smt2 b/test/regress/regress0/strings/gm-inc-071516-2.smt2 new file mode 100644 index 000000000..1650190f8 --- /dev/null +++ b/test/regress/regress0/strings/gm-inc-071516-2.smt2 @@ -0,0 +1,10 @@ +(set-logic ALL_SUPPORTED) +(set-info :status unsat) +(set-option :strings-exp true) + +(declare-fun value2 () String) +(declare-fun key2 () String) + +(assert (and (and (and (and (and (and (not (not (= (ite (str.contains value2 "=") 1 0) 0))) (not (not (= (ite (= (str.len value2) 0) 1 0) 0)))) (not (= (ite (not (= (str.indexof value2 "=" 0) (- 1))) 1 0) 0))) (not (not (= (ite (str.contains value2 ",") 1 0) 0)))) (not (not (= (ite (= (str.len value2) 0) 1 0) 0)))) (not (= (ite (= key2 "cache-control") 1 0) 0))) (not (= (ite (= key2 "cache-control") 1 0) 0)))) + +(check-sat) diff --git a/test/regress/regress0/strings/nf-ff-contains-abs.smt2 b/test/regress/regress0/strings/nf-ff-contains-abs.smt2 new file mode 100644 index 000000000..eb6792666 --- /dev/null +++ b/test/regress/regress0/strings/nf-ff-contains-abs.smt2 @@ -0,0 +1,15 @@ +(set-logic QF_S) +(set-info :status unsat) +(declare-fun a () String) +(declare-fun b () String) +(declare-fun c () String) +(declare-fun d () String) +(declare-fun e () String) +(declare-fun f () String) +(declare-fun g () String) +(assert (= (str.++ "abc" a "def" b "gg" c) (str.++ e g f))) +(assert (or (= a "a") (= a "aaa"))) +(assert (or (= b "b") (= b "bbb"))) +(assert (or (= c "c") (= c "ccc"))) +(assert (or (= g (str.++ ";" d)) (= g (str.++ d ";")))) +(check-sat) diff --git a/test/regress/regress0/strings/norn-dis-0707-3.smt2 b/test/regress/regress0/strings/norn-dis-0707-3.smt2 new file mode 100644 index 000000000..bc0f877ad --- /dev/null +++ b/test/regress/regress0/strings/norn-dis-0707-3.smt2 @@ -0,0 +1,26 @@ +(set-logic QF_S) +(set-info :status sat) +(set-option :strings-exp true) + +(declare-fun var_0 () String) +(declare-fun var_1 () String) +(declare-fun var_2 () String) +(declare-fun var_3 () String) +(declare-fun var_4 () String) +(declare-fun var_5 () String) +(declare-fun var_6 () String) +(declare-fun var_7 () String) +(declare-fun var_8 () String) +(declare-fun var_9 () String) +(declare-fun var_10 () String) +(declare-fun var_11 () String) +(declare-fun var_12 () String) + +(assert (str.in.re (str.++ var_8 "z" var_9 ) (re.++ (re.* (re.union (str.to.re "a") (re.++ (str.to.re "b") (re.++ (re.* (re.union (str.to.re "b") (str.to.re "a"))) (str.to.re "z"))))) (re.++ (str.to.re "b") (re.* (re.union (str.to.re "b") (str.to.re "a"))))))) +(assert (str.in.re (str.++ var_8 "z" var_9 ) (re.++ (re.* (re.union (re.union (str.to.re "z") (str.to.re "a")) (re.++ (str.to.re "b") (re.++ (re.* (str.to.re "b")) (re.union (str.to.re "z") (str.to.re "a")))))) (re.++ (str.to.re "b") (re.* (str.to.re "b")))))) +(assert (str.in.re (str.++ var_8 "z" var_9 ) (re.++ (re.* (re.union (str.to.re "a") (re.++ (str.to.re "b") (re.++ (re.* (re.union (str.to.re "z") (str.to.re "a"))) (str.to.re "b"))))) (re.++ (str.to.re "b") (re.* (re.union (str.to.re "z") (str.to.re "a"))))))) +(assert (str.in.re (str.++ var_8 "z" var_9 ) (re.* (re.++ (re.union (str.to.re "b") (str.to.re "a")) (re.++ (re.* (str.to.re "a")) (re.union (str.to.re "z") (str.to.re "b"))))))) +(assert (str.in.re var_9 (re.* (re.range "a" "u")))) +(assert (str.in.re var_8 (re.* (re.range "a" "u")))) +(assert (not (str.in.re (str.++ "b" var_8 "z" "b" var_9 ) (re.++ (re.* (re.++ (str.to.re "b") (str.to.re "z"))) (str.to.re "b"))))) +(check-sat) |