diff options
Diffstat (limited to 'test/regress/regress1/strings')
-rw-r--r-- | test/regress/regress1/strings/cmu-5042-0707-2.smt2 | 15 | ||||
-rw-r--r-- | test/regress/regress1/strings/cmu-dis-0707-3.smt2 | 24 |
2 files changed, 39 insertions, 0 deletions
diff --git a/test/regress/regress1/strings/cmu-5042-0707-2.smt2 b/test/regress/regress1/strings/cmu-5042-0707-2.smt2 new file mode 100644 index 000000000..637142dfb --- /dev/null +++ b/test/regress/regress1/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/regress1/strings/cmu-dis-0707-3.smt2 b/test/regress/regress1/strings/cmu-dis-0707-3.smt2 new file mode 100644 index 000000000..209cbb3f9 --- /dev/null +++ b/test/regress/regress1/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) |