├── .travis.yml
├── project
└── assembly.sbt
├── tests
├── concat-empty.smt2
├── str.to_int.smt2
├── model-bug.smt2
├── str.from_int_3.smt2
├── str.from_int_4.smt2
├── str.from_int_5.smt2
├── substring-bug.smt2
├── str-leq2.smt2
├── str-leq-reflexive.smt2
├── str-leq8.smt2
├── negated-equation-2.smt2
├── str-leq-reflexive-2.smt2
├── prefix-1.smt2
├── str-leq10.smt2
├── str.from_int_2.smt2
├── str.to_int_2.smt2
├── suffix-1.smt2
├── suffix-5.smt2
├── contains-1.smt2
├── contains-2.smt2
├── contains-3.smt2
├── str-leq9.smt2
├── str.to_int_3.smt2
├── suffix-2.smt2
├── suffix-3.smt2
├── negated-equation-1.smt2
├── str-leq.smt2
├── str-leq4.smt2
├── str-leq6.smt2
├── str-leq7.smt2
├── substring-bug3.smt2
├── parse-ecma-bug2.smt2
├── str-leq13.smt2
├── str-leq3.smt2
├── str-leq5.smt2
├── str-leq14.smt2
├── str.at.smt2
├── str.from_int.smt2
├── parse-regex-lookahead2.smt2
├── prefix-2.smt2
├── str.to_int_4.smt2
├── suffix-4.smt2
├── is-digit.smt2
├── str-leq11.smt2
├── str-leq12.smt2
├── str-lt.smt2
├── str-lt2.smt2
├── anchor-2.smt2
├── str.to_int_5.smt2
├── subsumption.smt2
├── subsumption2.smt2
├── chars2.smt2
├── parse-regex2.smt2
├── parse-regex4.smt2
├── str.at-3.smt2
├── yan-benchmarks
│ ├── concat-006.smt2
│ ├── concat-008.smt2
│ ├── concat-009.smt2
│ ├── concat-010.smt2
│ ├── concat-007.smt2
│ ├── regex-001.smt2
│ ├── regex-003.smt2
│ ├── concat-002.smt2
│ ├── equal-001.smt2
│ ├── regex-002-unsat.smt2
│ ├── regex-006.smt2
│ ├── regex-005-unsat.smt2
│ ├── concat-004-unsat.smt2
│ ├── regex-004-unsat.smt2
│ ├── concat-005-unsat.smt2
│ ├── concat-003.smt2
│ ├── replaceAll-003.smt2
│ ├── concat-001.smt2
│ ├── replaceAll-024.smt2
│ ├── replaceAll-011.smt2
│ ├── replaceAll-002.smt2
│ ├── replaceAll-014.smt2
│ ├── replaceAll-025.smt2
│ ├── replaceAll-004.smt2
│ ├── replaceAll-005.smt2
│ ├── replaceAll-021.smt2
│ ├── replaceAll-008.smt2
│ ├── replaceAll-019.smt2
│ ├── replaceAll-007.smt2
│ ├── replaceAll-016.smt2
│ ├── replaceAll-010.smt2
│ ├── replaceAll-009.smt2
│ ├── replaceAll-013.smt2
│ ├── replaceAll-001.smt2
│ ├── replaceAll-012.smt2
│ ├── replaceAll-015.smt2
│ ├── replaceAll-022.smt2
│ ├── replaceAll-023.smt2
│ ├── replaceAll-018.smt2
│ ├── replaceAll-020.smt2
│ ├── replaceAll-006.smt2
│ └── replaceAll-017.smt2
├── automata.smt2
├── parse-regex-lookahead2b.smt2
├── bug-58-replace-re.smt2
├── parse-regex-lookahead3.smt2
├── str_in_re_translation.smt2
├── test-replace-regex3.smt2
├── hu-benchmarks
│ ├── replace_empty_string.smt2
│ ├── replace_shortest_sat.smt2
│ ├── length_sat.smt2
│ ├── replace_longest_unsat.smt2
│ ├── str_to_int_sat.smt2
│ ├── bug-58-replace-re.smt2
│ ├── replace-length.smt2
│ ├── bug-56-replace-bug2.smt2
│ ├── slow-little.smt2
│ ├── replace_all-bug.smt2
│ ├── indexof_const_startpos_sat.smt2
│ ├── indexof_empty_sat.smt2
│ ├── indexof_var_sat.smt2
│ ├── indexof_const_startpos_unsat.smt2
│ ├── indexof_var_unsat.smt2
│ ├── replace-length-2.smt2
│ ├── regex_counting_unsat.smt2
│ ├── indexof_empty_sat2.smt2
│ ├── indexof_const_index_sat.smt2
│ ├── indexof_empty_unsat.smt2
│ ├── indexof_const_index_unsat.smt2
│ ├── substr_var_sat.smt2
│ ├── substr_const_len_sat.smt2
│ ├── substr_empty_sat.smt2
│ ├── substr_var_unsat.smt2
│ ├── substr_const_begin_sat.smt2
│ ├── substr_const_len_unsat.smt2
│ ├── substr_const_begin_unsat.smt2
│ ├── substr_empty_unsat.smt2
│ ├── concat_sat.smt2
│ ├── concat_unsat.smt2
│ ├── loopCountMotivation.smt2
│ └── bigSubstrIdx.smt2
├── test-replace-regex4.smt2
├── brackets-regex.smt2
├── indexof.smt2
├── str.at-2.smt2
├── simple-replace-1e.smt2
├── simple-replace.smt2
├── name-regex.smt2
├── parse-ecma-bug1.smt2
├── parse-regex-lookahead3b.smt2
├── indexof-6.smt2
├── is-digit-2.smt2
├── failedProp2.smt2
├── prefix-suffix.smt2
├── str.at-3b.smt2
├── case-insensitive-2.smt2
├── parse-regex2b.smt2
├── simple-replace-1b.smt2
├── parse-ecma-cases-3.smt2
├── parse-regex-lookahead4.smt2
├── indexof-3.smt2
├── simple-replace-1d.smt2
├── indexof-4.smt2
├── parse-regex3.smt2
├── simple-replace-1f.smt2
├── simple-replace-1g.smt2
├── indexof-5.smt2
├── replace-length.smt2
├── simple-replace-1c.smt2
├── parse-regex-lookahead.smt2
├── regex_cg_4.smt2
├── contains-4.smt2
├── monadic-length.smt2
├── contains-5.smt2
├── indexof-2.smt2
├── test-reverse.smt2
├── test-reverse2.smt2
├── contains-6.smt2
├── bug-56-replace-bug2.smt2
├── case-insensitive.smt2
├── loop2.smt2
├── parse-regex.smt2
├── nonlinear-2.smt2
├── nonlinear.smt2
├── minimize-problem.smt2
├── null-problem.smt2
├── simple-cycle.smt2
├── substring.smt2
├── replace-bug.smt2
├── simple-replace-5.smt2
├── escapeSequences-1b.smt2
├── str.from_int_6.smt2
├── str.to_int_6.smt2
├── temp-prop
│ ├── word-equation-6-copy.smt2
│ ├── word-equation-6.smt2
│ ├── noodles-unsat7.smt2
│ ├── 03_track_11.smt2
│ ├── noodles-unsat6.smt2
│ ├── noodles-unsat10.smt2
│ ├── noodles-unsat8.smt2
│ ├── noodles-unsat9.smt2
│ ├── 03_track_10.smt2
│ ├── word-equation-6-regex.smt2
│ ├── 03_track_1.smt2
│ └── nikolai-sat.smt2
├── word-equation-4.smt2
├── word-equation.smt2
├── escapeSequences-1a.smt2
├── propagation.smt2
├── simple-replace-2.smt2
├── simple-replace-2d.smt2
├── empty-concat.smt2
├── euf.smt2
├── word-equation-2.smt2
├── simple-cycle2.smt2
├── str.at-bug.smt2
├── parse-ecma-groups.smt2
├── word-equation-6.smt2
├── substring2.smt2
├── substring2b.smt2
├── test-replace2.smt2
├── chars3.smt2
├── regex_cg.smt2
├── test-replace-word.smt2
├── test-replace-word2.smt2
├── contains-8.smt2
├── email-regex.smt2
├── js-semantics.smt2
├── len-bug.smt2
├── replace-length-2.smt2
├── test-replace.smt2
├── contains-7.smt2
├── prefix3.smt2
├── extract-cg.smt2
├── extract-cg2.smt2
├── test-replace-regex.smt2
├── test-replace-regex2.smt2
├── loop-cg.smt2
├── parse-regex-incremental.smt2
├── regex_cg_2.smt2
├── concat-regex.smt2
├── simple-replace-2c.smt2
├── norn-benchmark-9k.smt2
├── concat-regex2.smt2
├── extract-cg4.smt2
├── norn-benchmark-9g.smt2
├── simple-cvc-smtlib-b.smt2
├── simple-cvc-smtlib.smt2
├── simple-replace-3b.smt2
├── str.at-3c.smt2
├── simple-replace-3.smt2
├── loop-cg2.smt2
├── prefix.smt2
├── extract-cg3.smt2
├── prefix2.smt2
├── epsilon-2.smt2
├── simple-cvc-smtlib-c.smt2
├── parse-ecma-replace.smt2
├── simple-replace-4c.smt2
├── simple-replace-2b.smt2
├── simple-replace-4.smt2
├── simple-replace-4b.smt2
├── norn-benchmark-9.smt2
├── norn-benchmark-9c.smt2
├── norn-benchmark-9e.smt2
├── norn-benchmark-9b.smt2
├── regex_cg_6.smt2
├── propagation-benchmarks
│ ├── parikh.smt2
│ ├── cyclic-xy.smt2
│ ├── noodles-unsat4.smt2
│ ├── noodles-unsat5.smt2
│ ├── noodles-unsat.smt2
│ ├── noodles-unsat2.smt2
│ ├── artur-unsat-we.smt2
│ ├── noodles-unsat3.smt2
│ ├── artur-unsat-common-prefix.smt2
│ ├── artur-unsat.smt2
│ └── nikolai-unsat.smt2
├── norn-benchmark-9h.smt2
├── automata-bwd.smt2
├── norn-benchmark-9f.smt2
├── loop-cg3.smt2
├── non-greedy-quantifiers.smt2
├── norn-benchmark-9d.smt2
├── concat-regex3.smt2
├── anchor-5.smt2
├── parikh-constraints.smt2
├── norn-benchmark-9j.smt2
├── norn-benchmark-9i.smt2
├── anchor-1.smt2
├── no-regexes.smt2
├── regex_cg_ref3.smt2
├── anchor-8.smt2
├── regex_cg_ref2.smt2
├── chars.smt2
├── empty-union.smt2
├── membership_427.smt2
├── anchor-4.smt2
├── anchor-7.smt2
├── anchor-double.smt2
├── adt.smt2
├── adt2.smt2
├── anchor-3.smt2
├── anchor-6.smt2
├── parse-ecma-cases-2.smt2
├── failedProp.smt2
├── replace-special.smt2
├── transducer2b.smt2
├── transducer2c.smt2
├── transducer2.smt2
├── transducer2d.smt2
├── replace-special-2.smt2
├── str-term-small-rw_186.smt2
├── anchor-alternate.smt2
├── replace-special-3.smt2
├── replace-special-4.smt2
├── replace-special-5.smt2
├── str-term-small-rw_164.smt2
├── cvc_replace_28.smt2
├── simple-concat.smt2
├── simple-concat-2.smt2
├── simple-concat-4.smt2
├── simple-concat-4b.smt2
├── simple-concat-5.smt2
├── simple-concat-5b.smt2
├── simple-concat-3.smt2
├── test-replace3.smt2
├── test-replace4.smt2
├── cg-star.smt2
├── regex_cg_ref.smt2
├── substring-bug2.smt2
├── epsilon-3.smt2
├── regex_cg_3.smt2
├── regex_cg_5.smt2
├── epsilon-1.smt2
├── concat-regex4.smt2
├── loop.smt2
├── priorityTransducer.smt2
├── priorityTransducer2.smt2
├── pcp-1.smt2
├── transducer1b.smt2
├── priorityTransducer3.smt2
├── priorityTransducer4.smt2
├── transducer1.smt2
├── regex_cg_ref4.smt2
├── transducer1c.smt2
├── cvc_replace_185.smt2
├── extract-1.smt2
├── extract-1b.smt2
└── extract-1c.smt2
├── ecma2020
└── ecma2020-regex-parser.jar
├── .gitignore
├── .github
└── workflows
│ └── scala.yml
├── AUTHORS
├── src
├── test
│ └── scala
│ │ └── ostrich
│ │ └── preop
│ │ ├── ConcatPreOpSpecification.scala
│ │ └── NOPPreOpSpecification.scala
└── main
│ └── scala
│ └── ostrich
│ └── cesolver
│ ├── preprocess
│ └── CEPredtoEqConverter.scala
│ ├── preop
│ └── CEPreOp.scala
│ └── util
│ └── Exception.scala
├── ostrich
└── LICENSE
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: scala
2 | scala:
3 | - 2.11.12
4 | - 2.12.10
5 |
6 |
--------------------------------------------------------------------------------
/project/assembly.sbt:
--------------------------------------------------------------------------------
1 | addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")
2 |
--------------------------------------------------------------------------------
/tests/concat-empty.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (assert (not (= a (str.++ a ""))))
3 | (check-sat)
4 |
--------------------------------------------------------------------------------
/tests/str.to_int.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w Int)
3 |
4 | (assert (= w (str.to.int "42")))
5 | (check-sat)
6 |
--------------------------------------------------------------------------------
/tests/model-bug.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const x String)
3 | (assert (not (= x "")))
4 | (check-sat)
5 | (get-model)
6 |
--------------------------------------------------------------------------------
/ecma2020/ecma2020-regex-parser.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uuverifiers/ostrich/HEAD/ecma2020/ecma2020-regex-parser.jar
--------------------------------------------------------------------------------
/tests/str.from_int_3.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w Int)
3 |
4 | (assert (= "123" (str.from_int w)))
5 |
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/str.from_int_4.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w Int)
3 |
4 | (assert (= "123a" (str.from_int w)))
5 |
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/str.from_int_5.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w Int)
3 |
4 | (assert (= "0" (str.from_int w)))
5 |
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/substring-bug.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (assert (= (str.len (str.substr a 0 (- 1))) 0))
3 | (check-sat)
4 |
--------------------------------------------------------------------------------
/tests/str-leq2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (str.<= x ""))
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/str-leq-reflexive.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (assert (str.<= "a" "b"))
4 | (assert (str.<= "a" "a"))
5 | (check-sat)
6 |
--------------------------------------------------------------------------------
/tests/str-leq8.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (str.<= "cba" "cab"))
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/negated-equation-2.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 | (assert (distinct (str.at (str.++ "A" x) 1) (str.at x 0)))
3 | (check-sat)
4 |
--------------------------------------------------------------------------------
/tests/str-leq-reflexive-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (assert (str.<= "abc" "abd"))
4 | (assert (str.<= "abc" "abc"))
5 | (check-sat)
6 |
--------------------------------------------------------------------------------
/tests/prefix-1.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (not (= (str.prefixof x x) true)))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-leq10.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 | (assert (= "abc" x))
5 | (assert (str.<= "b" x))
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/str.from_int_2.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w String)
3 |
4 | (assert (= w (int.to.str (- 42))))
5 | (assert (not (= w "")))
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/str.to_int_2.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w Int)
3 |
4 | (assert (= w (str.to.int "-42")))
5 | (assert (not (= w (- 1))))
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/suffix-1.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (not (= (str.suffixof x x) true)))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/suffix-5.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (not (= (str.suffixof "" x) true)))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/contains-1.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (not (= (str.contains "A" x) true)))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/contains-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (not (= (str.contains x "A") true)))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/contains-3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (not (= (str.contains x x) true)))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-leq9.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 | (assert (= 1 (str.len x)))
5 | (assert (str.<= "" x))
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/str.to_int_3.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w String)
3 |
4 | (assert (= 42 (str.to.int w)))
5 | (assert (= (str.len w) 5))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/suffix-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (not (= (str.suffixof x "A") true)))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/suffix-3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (not (= (str.suffixof "A" x) true)))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/negated-equation-1.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (assert (not (= (str.at a 0) (str.at "" 0))))
3 | (assert (= (str.len a) 0))
4 | (check-sat)
5 |
--------------------------------------------------------------------------------
/tests/str-leq.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (= 1 (str.len x)))
6 | (assert (str.<= x ""))
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-leq4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (= x "cbaa"))
6 | (assert (str.<= x "cba"))
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-leq6.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (= x "cab"))
6 | (assert (str.<= x "cba"))
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-leq7.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 | (assert (= 1 (str.len x)))
5 | (assert (str.<= "cba" x))
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/substring-bug3.smt2:
--------------------------------------------------------------------------------
1 | ; Problem for which OSTRICH previously incorrectly reported unsat
2 |
3 | (assert (= "" (str.substr "" 1 0)))
4 | (check-sat)
5 |
--------------------------------------------------------------------------------
/tests/parse-ecma-bug2.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w String)
3 | (assert (str.in.re w (re.from_ecma2020 '^[-a]')))
4 |
5 | (assert (= w ""))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-leq13.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 | (declare-fun y () String)
5 |
6 | (assert (str.<= x y))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/str-leq3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (= 1 (str.len x)))
6 | (assert (str.<= x "cba"))
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-leq5.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (= 4 (str.len x)))
6 | (assert (str.<= x "cba"))
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-leq14.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 | (assert (str.in.re x (str.to.re "a")))
5 | (assert (str.<= "abc" x))
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/str.at.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (= (str.at x 2) "x"))
6 | (assert (= (str.at x 3) "y"))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/str.from_int.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w String)
3 |
4 | (assert (= w (int.to.str 42)))
5 | (assert (str.in_re w (re.* (re.range "2" "4"))))
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/parse-regex-lookahead2.smt2:
--------------------------------------------------------------------------------
1 | (declare-const w String)
2 |
3 | (assert (str.in.re w (re.from.str "^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$")))
4 |
5 | (check-sat)
--------------------------------------------------------------------------------
/tests/prefix-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (not (= (str.prefixof x y) true)))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/str.to_int_4.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w String)
3 |
4 | (assert (= (- 1) (str.to.int w)))
5 | (assert (str.in_re w (re.+ (re.range "0" "9"))))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/suffix-4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (not (= (str.suffixof x y) true)))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/is-digit.smt2:
--------------------------------------------------------------------------------
1 |
2 | (set-logic QF_S)
3 |
4 | (declare-fun x () String)
5 |
6 | (assert (str.is_digit x))
7 |
8 | (check-sat)
9 | (get-model)
10 |
11 |
--------------------------------------------------------------------------------
/tests/str-leq11.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 | (assert (= 1 (str.len x)))
5 | (assert (str.<= "a" x))
6 | (assert (str.<= x "c"))
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-leq12.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 | (assert (= 1 (str.len x)))
5 | (assert (str.<= "a" x))
6 | (assert (str.<= x "b"))
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/str-lt.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (= 1 (str.len x)))
6 | (assert (str.< "A" x))
7 | (assert (str.< x "C"))
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/str-lt2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (= 1 (str.len x)))
6 | (assert (str.< "A" x))
7 | (assert (str.< x "B"))
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/anchor-2.smt2:
--------------------------------------------------------------------------------
1 |
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in.re w
6 | (re.++ re.begin-anchor (re.+ (re.range "a" "z")) re.end-anchor)))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/str.to_int_5.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w String)
3 |
4 | (assert (= (str.to_int (str.substr w 0 10)) 123))
5 | (assert (= (str.to_int (str.substr w 10 10)) 321))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/subsumption.smt2:
--------------------------------------------------------------------------------
1 |
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in_re w (re.* (str.to_re "abc"))))
6 | (assert (str.in_re w (re.+ (str.to_re "abc"))))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/subsumption2.smt2:
--------------------------------------------------------------------------------
1 |
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in_re w (re.* (str.to_re "abc"))))
6 | (assert (str.in_re w (re.+ (str.to_re "abcd"))))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/chars2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_)
2 |
3 | (declare-fun x () String)
4 |
5 | (assert (str.in.re x (re.range (str.from_code (bv2nat #x0b)) (str.from_code (bv2nat #xff)))))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/parse-regex2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in.re w (re.from.str "[\+]\d{2}[\(]\d{2}[\)]\d{4}[\-]\d{4}")))
6 |
7 | (check-sat)
8 | (get-model)
9 |
--------------------------------------------------------------------------------
/tests/parse-regex4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in.re w (re.from.str "^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$")))
6 |
7 | (check-sat)
8 | (get-model)
9 |
--------------------------------------------------------------------------------
/tests/str.at-3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (= (str.at x (- (str.len x) 1)) "x"))
6 | (assert (= (str.at x (- (str.len x) 2)) "y"))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-006.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (declare-fun b () String)
3 | (declare-fun z () String)
4 |
5 | (assert (= (str.++ "test" a) "testhello"))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/automata.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (assert (= x "ab"))
3 | (assert (str.in.re x (re.from_automaton "automaton value_0 {init s0; s0 -> s1 [0, 100]; s1 -> s1 [0, 65535];accepting s1;};")))
4 |
--------------------------------------------------------------------------------
/tests/parse-regex-lookahead2b.smt2:
--------------------------------------------------------------------------------
1 | (declare-const w String)
2 |
3 | (assert (str.in.re w (re.from.str "^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$")))
4 | (assert (str.contains w " "))
5 |
6 | (check-sat)
--------------------------------------------------------------------------------
/tests/bug-58-replace-re.smt2:
--------------------------------------------------------------------------------
1 | (define-fun sigmaStar_048 () String "Ajavascript:")
2 | (define-fun x_7 () String "javascript:")
3 | (assert (= x_7 (str.replace_re sigmaStar_048 re.allchar "") ) )
4 | (check-sat)
5 |
--------------------------------------------------------------------------------
/tests/parse-regex-lookahead3.smt2:
--------------------------------------------------------------------------------
1 | (declare-const w String)
2 |
3 | (assert (str.in.re w (re.from.str "(?=.*[\d\W])(?![.\n])(?=.*[A-Z])(?=.*[a-z]).{8,}$")))
4 | (assert (str.contains w "z"))
5 |
6 | (check-sat)
--------------------------------------------------------------------------------
/tests/str_in_re_translation.smt2:
--------------------------------------------------------------------------------
1 |
2 |
3 | (declare-const R RegLan)
4 | (declare-const x String)
5 |
6 | (assert (= R (re.* (re.range "a" "z"))))
7 | (assert (str.in_re x R))
8 |
9 | (check-sat)
10 |
--------------------------------------------------------------------------------
/tests/test-replace-regex3.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (assert (= b (str.replace_re a (re.* re.allchar) "")))
6 | (assert (distinct b ""))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/replace_empty_string.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 |
3 | (assert (= "hhhh" (str.replace_re x (re.* (str.to_re "h")) "hhh")))
4 | (assert (= 1 (str.len x)))
5 |
6 | (check-sat)
7 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/replace_shortest_sat.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 |
3 | (assert (= "hhhh" (str.replace_re x (re.+ (str.to_re "h")) "hhh")))
4 | (assert (= 2 (str.len x)))
5 |
6 | (check-sat)
7 | (get-model)
--------------------------------------------------------------------------------
/tests/test-replace-regex4.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (assert (= b (str.replace_re_longest a (re.* re.allchar) "")))
6 | (assert (distinct b ""))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-008.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (declare-fun b () String)
3 | (declare-fun z () String)
4 |
5 | (assert (= (str.++ (str.++ "test" a) "num") "testhellonum"))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-009.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (declare-fun b () String)
3 | (declare-fun z () String)
4 |
5 | (assert (= (str.++ (str.++ a "hello") "num") "testhellonum"))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-010.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (declare-fun b () String)
3 | (declare-fun z () String)
4 |
5 | (assert (= (str.++ "test" (str.++ a "num") ) "testhellonum"))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/brackets-regex.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in.re w (re.from.str "")))
6 | (assert (str.in.re w (re.from.str "[<>X].*")))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/length_sat.smt2:
--------------------------------------------------------------------------------
1 | ; sat
2 | (declare-fun x ()String)
3 |
4 | (declare-const len_x Int)
5 |
6 | (assert (= len_x (str.len x)))
7 | (assert (< 1 len_x))
8 |
9 |
10 | (check-sat)
11 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/replace_longest_unsat.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 |
3 | (assert (= "hhhh" (str.replace_re_longest x (re.+ (str.to_re "h")) "hhh")))
4 | (assert (= 2 (str.len x)))
5 |
6 | (check-sat)
7 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/str_to_int_sat.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w Int)
3 | (declare-const x String)
4 |
5 | (assert (= w (str.to.int x)))
6 | (assert (str.in_re x (re.+ (str.to_re "4"))))
7 | (check-sat)
8 | (get-model)
9 |
--------------------------------------------------------------------------------
/tests/indexof.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | ; SAT
4 |
5 | (declare-fun x0 () String)
6 | (declare-fun n () Int)
7 |
8 | (assert (= (str.indexof x0 "===" 0) n))
9 | (assert (> n 0))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/str.at-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (= (str.at x 2) "x"))
6 | (assert (= (str.at x 3) "y"))
7 | (assert (not (str.contains x "xy")))
8 |
9 | (check-sat)
10 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-007.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (declare-fun b () String)
3 | (declare-fun z () String)
4 |
5 | (assert (= (str.++ "test" (str.++ "hello" a) ) "testhellonum"))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/regex-001.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 | (declare-fun y () String)
3 |
4 |
5 | (assert (= x ""))
6 | (assert (str.in.re x (re.* (str.to.re "ced") ) ) )
7 |
8 | (check-sat)
9 |
10 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/bug-58-replace-re.smt2:
--------------------------------------------------------------------------------
1 | (define-fun sigmaStar_048 () String "Ajavascript:")
2 | (define-fun x_7 () String "javascript:")
3 | (assert (= x_7 (str.replace_re sigmaStar_048 re.allchar "") ) )
4 | (check-sat)
5 |
--------------------------------------------------------------------------------
/tests/simple-replace-1e.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_7 () String)
4 | (declare-fun x_10 () String)
5 |
6 | (assert (= x_7 (str.replace "HelloWorld" "e" "a")))
7 |
8 | (check-sat)
9 | (get-model)
10 |
--------------------------------------------------------------------------------
/tests/simple-replace.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_7 () String)
4 | (declare-fun x_10 () String)
5 |
6 | (assert (= x_7 (str.replaceall "HelloWorld" "e" "a")))
7 |
8 | (check-sat)
9 | (get-model)
10 |
--------------------------------------------------------------------------------
/tests/name-regex.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in.re w (re.from.str "^[a-z\d\.]{5,}$")))
6 |
7 | ; inconsistent
8 | (assert (str.contains w "]"))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/parse-ecma-bug1.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (set-option :produce-models true)
4 |
5 | (declare-const w String)
6 |
7 | (assert (str.in.re w (re.from_ecma2020 '[\)]')))
8 |
9 | (check-sat)
10 | (get-model)
11 |
--------------------------------------------------------------------------------
/tests/parse-regex-lookahead3b.smt2:
--------------------------------------------------------------------------------
1 | (declare-const w String)
2 |
3 | (assert (str.in.re w (re.from.str "(?=.*[\d\W])(?![.\n])(?=.*[A-Z])(?=.*[a-z]).{8,}$")))
4 | (assert (str.in.re w (re.* (re.range "a" "z"))))
5 |
6 | (check-sat)
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.bloop/
2 | /.metals/
3 | /target/
4 | *.swo
5 | *.swp
6 | /.bsp
7 | # More metals ignores
8 | /project/.bloop/
9 | /project/metals.sbt
10 | /project/project
11 | /project/target
12 | /project/build.properties
13 |
--------------------------------------------------------------------------------
/tests/indexof-6.smt2:
--------------------------------------------------------------------------------
1 | ; UNSAT
2 |
3 | (set-option :print-success false)
4 | (set-logic QF_SLIA)
5 |
6 | (define-fun y () String "\u{0}\u{0}?#")
7 |
8 | (assert (> 0 (str.indexof y "#" 2)))
9 |
10 | (check-sat)
11 | (exit)
12 |
--------------------------------------------------------------------------------
/tests/is-digit-2.smt2:
--------------------------------------------------------------------------------
1 |
2 | (set-logic QF_S)
3 |
4 | (declare-fun x () String)
5 |
6 | (assert (str.is_digit (str.at x 1)))
7 | (assert (str.is_digit (str.at x 2)))
8 |
9 | (check-sat)
10 | (get-model)
11 |
12 |
--------------------------------------------------------------------------------
/tests/failedProp2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-fun x () String)
4 | (declare-fun y () String)
5 | (declare-fun z () Int)
6 |
7 | (assert (not (= (str.suffixof x (str.at x 1)) (= x ""))))
8 | (check-sat)
9 | (exit)
10 |
--------------------------------------------------------------------------------
/tests/prefix-suffix.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; UNSAT
4 |
5 | (declare-fun a () String)
6 | (declare-fun b () String)
7 |
8 | (assert (not (=> (and (str.prefixof a b) (str.suffixof b a)) (= a b))))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/str.at-3b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (= (str.at x (- (str.len x) 1)) "x"))
6 | (assert (= (str.at x (- (str.len x) 2)) "y"))
7 | (assert (< (str.len x) 2))
8 |
9 | (check-sat)
10 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/regex-003.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 |
3 |
4 | (assert (= x "cdeabcdcde"))
5 | (assert (str.in.re x (re.* (re.union (str.to.re "abcd") (str.to.re "cde") ) ) ) )
6 |
7 |
8 |
9 | (check-sat)
10 |
11 |
--------------------------------------------------------------------------------
/tests/case-insensitive-2.smt2:
--------------------------------------------------------------------------------
1 |
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in_re w (re.case_insensitive (re.from_ecma2020 '[a-c]+'))))
6 | (assert (str.in_re w (re.case_insensitive (re.from_ecma2020 '[d-f]+'))))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/parse-regex2b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in.re w (re.from.str "[\+]\d{2}[\(]\d{2}[\)]\d{4}[\-]\d{4}")))
6 | (assert (str.contains w "a"))
7 |
8 | (check-sat)
9 | (get-model)
10 |
--------------------------------------------------------------------------------
/tests/simple-replace-1b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_7 () String)
4 | (declare-fun x_10 () String)
5 |
6 | (assert (= x_7 (str.replaceall "HelloWorld" "e" "a")))
7 | (assert (= x_7 "HolloWorld"))
8 |
9 | (check-sat)
10 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-002.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 | (declare-fun y1 () String)
3 | (declare-fun y2 () String)
4 |
5 |
6 | (assert (= x ( str.++ ( str.++ "te" y1 ) ( str.++ "st" y2 ) ) ) )
7 |
8 |
9 | (check-sat)
10 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/equal-001.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 | (declare-fun y () String)
3 |
4 |
5 | (assert (str.in.re x (re.++ (str.to.re "ced") (re.* (str.to.re "ced") ) )) )
6 | (assert (= x y))
7 |
8 | (check-sat)
9 |
10 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/regex-002-unsat.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 | (declare-fun y () String)
3 |
4 |
5 | (assert (= x "aaaaaaaaa"))
6 | (assert (str.in.re x (re.* (str.to.re "ced") ) ) )
7 |
8 |
9 |
10 | (check-sat)
11 |
12 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/regex-006.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 | (declare-fun y () String)
3 |
4 |
5 | (assert (= x "abcabc"))
6 | (assert (str.in.re x (re.* (re.* (str.to.re "abc") ) ) ) )
7 |
8 |
9 |
10 | (check-sat)
11 |
12 |
--------------------------------------------------------------------------------
/tests/parse-ecma-cases-3.smt2:
--------------------------------------------------------------------------------
1 | ; Example that previously led to an exception using the full 2AFA pipeline
2 |
3 | (set-logic QF_S)
4 |
5 | (assert (str.in_re "P{Lowercase_Letter}" (re.from_ecma2020 '\P{Lowercase_Letter}')))
6 |
7 | (check-sat)
8 |
--------------------------------------------------------------------------------
/tests/parse-regex-lookahead4.smt2:
--------------------------------------------------------------------------------
1 | (declare-const w String)
2 |
3 | (assert (str.in.re w (re.from.str "abc(?!x)q")))
4 | (assert (str.in.re w (re.* (re.union (str.to.re "a") (str.to.re "b") (str.to.re "c") (str.to.re "q")))))
5 |
6 | (check-sat)
7 |
--------------------------------------------------------------------------------
/tests/indexof-3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | ; SAT
4 |
5 | (declare-fun x0 () String)
6 | (declare-fun n () Int)
7 |
8 | (assert (str.prefixof "testtesttest" x0))
9 | (assert (= (str.indexof x0 "testtest" 1) n))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/simple-replace-1d.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_7 () String)
4 | (declare-fun x_10 () String)
5 |
6 | (assert (= x_7 (str.replace "HelloWorld" "e" "")))
7 | (assert (= x_7 "hlloWorld"))
8 |
9 | (check-sat)
10 | (get-model)
--------------------------------------------------------------------------------
/tests/yan-benchmarks/regex-005-unsat.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 | (declare-fun y () String)
3 |
4 |
5 | (assert (= x "aaaaaaaaa"))
6 | (assert (str.in.re x (re.* (re.* (str.to.re "ced") ) ) ) )
7 |
8 |
9 |
10 | (check-sat)
11 |
12 |
--------------------------------------------------------------------------------
/tests/indexof-4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | ; SAT
4 |
5 | (declare-fun x0 () String)
6 | (declare-fun n () Int)
7 |
8 | (assert (str.prefixof "testtesttest" x0))
9 | (assert (= (str.indexof x0 "testtest" (- 1)) n))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/parse-regex3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in.re w (re.from.str "^(?:0|\(?\+33\)?\s?|0033\s?)[1-79](?:[\.\-\s]?\d\d){4}$")))
6 | (assert (str.prefixof "8" w))
7 |
8 | (check-sat)
9 | (get-model)
10 |
--------------------------------------------------------------------------------
/tests/simple-replace-1f.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_7 () String)
4 | (declare-fun x_10 () String)
5 |
6 | (assert (= x_7 (str.replace "HelloWorld" "e" "a")))
7 | (assert (= x_7 "HolloWorld"))
8 |
9 | (check-sat)
10 | (get-model)
11 |
--------------------------------------------------------------------------------
/tests/simple-replace-1g.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_7 () String)
4 | (declare-fun x_10 () String)
5 |
6 | (assert (= x_7 (str.replace "HelloWorld" "e" "a")))
7 | (assert (= x_7 "HalloWorld"))
8 |
9 | (check-sat)
10 | (get-model)
11 |
--------------------------------------------------------------------------------
/tests/indexof-5.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | ; SAT
4 |
5 | (declare-fun x0 () String)
6 | (declare-fun n () Int)
7 |
8 | (assert (str.prefixof "testtesttest" x0))
9 | (assert (= (str.indexof x0 "" 3) n))
10 |
11 | (check-sat)
12 | (get-model)
13 |
--------------------------------------------------------------------------------
/tests/replace-length.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y (str.replace x "l" "L")))
7 | (assert (= (str.len x) 10))
8 |
9 | (assert (str.contains x "l"))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/simple-replace-1c.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_7 () String)
4 | (declare-fun x_10 () String)
5 |
6 | (assert (= x_7 (str.replaceall "HelloWorld" "e" "a")))
7 | (assert (= x_7 "HalloWorld"))
8 |
9 | (check-sat)
10 | (get-model)
11 |
--------------------------------------------------------------------------------
/tests/parse-regex-lookahead.smt2:
--------------------------------------------------------------------------------
1 | (declare-const w String)
2 |
3 | (assert (str.in.re w (re.from.str "^(?=.*[A-Z])(?=.*[a-z])(?=.*[\@%\+\/!#$^\?:,\.\(\){}\[\]~\-_`&*])(?=.*\d).{8,32}$")))
4 | (assert (str.contains w ""))
5 |
6 | (check-sat)
--------------------------------------------------------------------------------
/tests/regex_cg_4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_7 () String)
4 | (declare-fun x_10 () String)
5 |
6 | (assert (= x_7 (str.replace_cg_all "HelloWorld" (re.range "e" "e") (str.to.re "a"))))
7 | (assert (= x_7 "HolloWorld"))
8 |
9 | (check-sat)
10 |
--------------------------------------------------------------------------------
/tests/contains-4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 | (declare-const z String)
6 |
7 | (assert (str.contains y z))
8 | (assert (= x (str.++ y y)))
9 | (assert (not (str.contains x z)))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/replace-length.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y (str.replace x "l" "L")))
7 | (assert (= (str.len x) 10))
8 |
9 | (assert (str.contains x "l"))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/monadic-length.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const x String)
3 | (declare-const a Int)
4 | (declare-const b Int)
5 |
6 | (assert (= (str.len x) a))
7 | (assert (> a 5))
8 | (assert (< a 10))
9 | (assert (str.in_re x (re.* (str.to_re "abc"))))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/contains-5.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 | (declare-const z String)
6 | (declare-const res String)
7 |
8 | (assert(= res (str.replace x y z)))
9 | (assert (not (str.contains x y)))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/indexof-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_SLIA)
2 |
3 | ; UNSAT
4 |
5 | (declare-fun x0 () String)
6 | (declare-fun n () Int)
7 |
8 | (assert (str.prefixof "testtesttest" x0))
9 | (assert (= (str.indexof x0 "testtest" 0) n))
10 | (assert (> n 0))
11 |
12 | (check-sat)
13 |
--------------------------------------------------------------------------------
/tests/test-reverse.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 |
6 | (assert (= a (str.reverse b)))
7 |
8 | (assert (str.in.re a (str.to.re "abcd")))
9 | (assert (str.in.re b (str.to.re "dcba")))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/test-reverse2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 |
6 | (assert (= a (str.reverse b)))
7 |
8 | (assert (str.in.re a (str.to.re "abcd")))
9 | (assert (str.in.re b (str.to.re "abcd")))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/contains-6.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 | (declare-const z String)
6 | (declare-const res String)
7 |
8 | (assert(= res (str.replace_all x y z)))
9 | (assert (not (str.contains x y)))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-004-unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-option :auto-config true)
2 | (set-option :produce-models true)
3 |
4 | (declare-fun a () String)
5 | (declare-fun b () String)
6 |
7 | (assert (= (str.++ a b) "testhello"))
8 | (assert (= a "hello"))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/bug-56-replace-bug2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_4 () String)
4 | (declare-fun sigmaStar_0 () String)
5 |
6 | (assert (= x_4 (str.replace sigmaStar_0 "ab" "c")))
7 |
8 | (assert (str.in_re x_4 (str.to_re "aa")))
9 |
10 | (check-sat)
11 | (get-model)
12 |
--------------------------------------------------------------------------------
/tests/case-insensitive.smt2:
--------------------------------------------------------------------------------
1 |
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in_re w (re.case_insensitive (re.from_ecma2020 '[a-z]+'))))
6 | (assert (str.in_re w (re.case_insensitive (re.from_ecma2020 '.{5,10}'))))
7 | (assert (str.contains w "ABC"))
8 |
9 | (check-sat)
10 |
--------------------------------------------------------------------------------
/tests/loop2.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const x String)
3 |
4 | (assert (str.in.re x ((_ re.loop 0 100) (re.range "0" "9"))))
5 | (assert (str.in.re x ((_ re.loop 100 200) (re.range "0" "9"))))
6 |
7 | (assert (not (str.in.re x ((_ re.^ 100) (re.range "0" "9")))))
8 |
9 | (check-sat)
10 |
--------------------------------------------------------------------------------
/tests/parse-regex.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in.re w (re.from.str "^[a-zA-Z][a-zA-Z0-9-_\.]{1,20}$")))
6 | (assert (str.in.re w (re.* (re.range "a" "z"))))
7 | (assert (= (str.len w) 5))
8 |
9 | (check-sat)
10 | (get-model)
11 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/regex-004-unsat.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 |
3 |
4 | ;(assert (= x "abcdabcdabcdabcd"))
5 | (assert (= x "abcdcde"))
6 | (assert (str.in.re x (re.union (re.* (str.to.re "abcd") ) (re.* (str.to.re "cde") ) ) ) )
7 |
8 |
9 |
10 | (check-sat)
11 |
12 |
--------------------------------------------------------------------------------
/tests/nonlinear-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 |
6 | (assert (= a (str.++ b b)))
7 | (assert (str.in.re a (re.++ (re.* (str.to.re "("))
8 | (re.+ (str.to.re ")")))))
9 |
10 | (check-sat)
11 |
12 |
--------------------------------------------------------------------------------
/tests/nonlinear.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 |
6 | (assert (= a (str.++ b b)))
7 | (assert (str.in.re a (re.++ (re.+ (str.to.re "("))
8 | (re.+ (str.to.re ")")))))
9 |
10 | (check-sat)
11 |
12 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-005-unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-option :auto-config true)
2 | (set-option :produce-models true)
3 |
4 | (declare-fun a () String)
5 | (declare-fun b () String)
6 | (declare-fun z () String)
7 |
8 | (assert (= (str.++ a "testhello") "hello"))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/bug-56-replace-bug2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_4 () String)
4 | (declare-fun sigmaStar_0 () String)
5 |
6 | (assert (= x_4 (str.replace sigmaStar_0 "ab" "c")))
7 |
8 | (assert (str.in_re x_4 (str.to_re "aa")))
9 |
10 | (check-sat)
11 | (get-model)
12 |
--------------------------------------------------------------------------------
/tests/minimize-problem.smt2:
--------------------------------------------------------------------------------
1 | ; Example that tends to time out when trying to minimize/determinize automata
2 |
3 | (declare-const w String)
4 | (assert (str.in.re w (re.from_ecma2020 "^.+@.+\\..{2,20}$")))
5 |
6 | (assert (str.in.re w (re.* (re.range "\u{20}" "\u{FFFF}"))))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/null-problem.smt2:
--------------------------------------------------------------------------------
1 | ; Problem that earlier crashed with the message "ERROR: null"
2 |
3 | (define-fun z () String "10")
4 | (define-fun y () String "010101")
5 | (define-fun x () String "1001")
6 |
7 | (assert (= x (str.replaceallre y (str.to.re "0101") z)))
8 |
9 | (check-sat)
10 |
--------------------------------------------------------------------------------
/tests/simple-cycle.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 | (declare-fun c () String)
6 | (declare-fun d () String)
7 |
8 | (assert (= a (str.++ b c)))
9 | (assert (= b (str.++ d a)))
10 |
11 | (assert (not (= c "")))
12 |
13 | (check-sat)
--------------------------------------------------------------------------------
/tests/substring.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x () String)
4 | (declare-fun y () String)
5 | (declare-fun n () Int)
6 |
7 | (assert (= y (str.substr x n 5)))
8 | (assert (>= (str.len x) (+ n 5)))
9 | (assert (= (str.at y 0) "a"))
10 | (assert (> n 0))
11 |
12 | (check-sat)
13 |
--------------------------------------------------------------------------------
/tests/replace-bug.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (declare-fun b () String)
3 | (declare-fun c () String)
4 | (declare-fun d () String)
5 | (assert (= c (str.replace_all a "B" (str.replace_all "A" "B" b))))
6 | (assert (= d (str.replace_all a "B" "A")))
7 | (assert (distinct c d))
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/simple-replace-5.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_7 () String)
4 | (declare-fun x_10 () String)
5 |
6 | (assert (= x_10 "This is a very long sentence with code"))
7 | (assert (= x_7 (str.replaceall x_10 "" "")))
8 |
9 | (check-sat)
10 | (get-model)
11 |
12 |
--------------------------------------------------------------------------------
/tests/escapeSequences-1b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 |
4 | (declare-fun x () String)
5 | (declare-fun y () String)
6 |
7 | (assert (= x "\x68\145\x6cl"))
8 |
9 | ;sat
10 | (assert (str.in.re x (re.* (re.charrange (char.from-int 97) (char.from-int 117)))))
11 | (check-sat)
12 |
13 | (check-sat)
14 |
--------------------------------------------------------------------------------
/tests/str.from_int_6.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w String)
3 | (declare-const x Int)
4 | (declare-const y Int)
5 |
6 | (assert (= (str.substr w 0 3) (str.from_int x)))
7 | (assert (= (str.substr w 10 3) (str.from_int y)))
8 |
9 | (assert (> x (* 2 y)))
10 | (assert (>= y 0))
11 |
12 | (check-sat)
13 |
--------------------------------------------------------------------------------
/tests/str.to_int_6.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const w String)
3 | (declare-const x Int)
4 | (declare-const y Int)
5 |
6 | (assert (= (str.to_int (str.substr w 0 10)) x))
7 | (assert (= (str.to_int (str.substr w 10 10)) y))
8 |
9 | (assert (> x (* 2 y)))
10 | (assert (>= y 1000))
11 |
12 | (check-sat)
13 |
--------------------------------------------------------------------------------
/tests/temp-prop/word-equation-6-copy.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun H () String)
4 | (declare-fun G () String)
5 | (declare-fun E () String)
6 | (declare-fun J () String)
7 | (assert (= (str.++ "e" H "f" H "g")
8 | (str.++ "ei" G "ig") ))
9 | (check-sat)
10 | (get-model)
11 |
--------------------------------------------------------------------------------
/tests/word-equation-4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 | (declare-fun c () String)
6 | (declare-fun d () String)
7 |
8 | (assert (= (str.++ a b b a) (str.++ c d d c)))
9 | (assert (>= (str.len a) 1))
10 |
11 | (check-sat)
12 | (get-model)
13 |
--------------------------------------------------------------------------------
/tests/word-equation.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 | (declare-fun c () String)
6 | (declare-fun d () String)
7 |
8 | (assert (= (str.++ a "xy" b) (str.++ b "x" c)))
9 | (assert (<= (str.len a) 3))
10 |
11 | (check-sat)
12 | (get-model)
13 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-003.smt2:
--------------------------------------------------------------------------------
1 | (set-option :auto-config true)
2 | (set-option :produce-models true)
3 |
4 | (declare-fun a () String)
5 | (declare-fun b () String)
6 | (declare-fun z () String)
7 |
8 | (assert (= (str.++ a b) "testhello"))
9 | (assert (= a "testhe"))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/escapeSequences-1a.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 |
4 | (declare-fun x () String)
5 | (declare-fun y () String)
6 |
7 | (assert (= x "\x48\145\x6cl"))
8 |
9 | ;unsat
10 | (assert (str.in.re x (re.* (re.charrange (char.from-int 97) (char.from-int 117)))))
11 | (check-sat)
12 |
13 | (check-sat)
14 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/slow-little.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 | (declare-const x String)
3 | (declare-const y String)
4 | (assert (str.in.re x (re.* (re.union (str.to.re "Qqqqa") (str.to.re "1111")))))
5 | (assert (= 10 (str.len x)))
6 | (assert (not (= x "1111Qqqqa")))
7 | (check-sat)
8 | (get-model)
9 |
10 |
--------------------------------------------------------------------------------
/tests/propagation.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-fun f (String) Int)
3 |
4 | (declare-const x String)
5 | (declare-const y String)
6 |
7 | (assert (= (f x) 1))
8 | (assert (= (f y) 2))
9 |
10 | (assert (= x "aaaaa"))
11 | (assert (str.in_re y (re.from_ecma2020 'a{5,}')))
12 |
13 | (check-sat)
14 | (get-model)
15 |
--------------------------------------------------------------------------------
/tests/simple-replace-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const a String)
4 | (declare-const b String)
5 | (declare-fun x_7 () String)
6 | (declare-fun x_10 () String)
7 |
8 | (assert (= x_10 (str.++ a b)))
9 | (assert (= x_7 (str.replaceall x_10 "e" "a")))
10 |
11 | (check-sat)
12 | (get-model)
13 |
--------------------------------------------------------------------------------
/tests/simple-replace-2d.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const a String)
4 | (declare-const b String)
5 | (declare-fun x_7 () String)
6 | (declare-fun x_10 () String)
7 |
8 | (assert (= x_10 (str.++ a b)))
9 | (assert (= x_7 (str.replace x_10 "e" "a")))
10 |
11 | (check-sat)
12 | (get-model)
13 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/replace_all-bug.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () String)
2 | (declare-fun b () String)
3 | (declare-fun c () String)
4 | (declare-fun d () String)
5 | (assert (= c (str.replace_all a "B" (str.replace_all "A" "B" b))))
6 | (assert (= d (str.replace_all a "B" "A")))
7 | (assert (distinct c d))
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/empty-concat.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun sigmaStar_0 () String)
4 | (declare-fun literal_1 () String)
5 | (declare-fun x_2 () String)
6 | (declare-fun literal_3 () String)
7 | (declare-fun x_4 () String)
8 |
9 | (assert (= x_2 (str.++ literal_1 sigmaStar_0)))
10 | (check-sat)
11 | (get-model)
12 |
--------------------------------------------------------------------------------
/tests/euf.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 | (declare-fun c () String)
6 | (declare-fun f (String) Int)
7 |
8 | (assert (= (f a) 1))
9 | (assert (= (f b) 2))
10 | (assert (= a "abc"))
11 | (assert (= b (str.++ "a" c)))
12 | (assert (= c "bc"))
13 |
14 | (check-sat)
15 |
--------------------------------------------------------------------------------
/tests/word-equation-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 | (declare-fun c () String)
6 | (declare-fun d () String)
7 |
8 | (assert (= (str.++ a b) (str.++ b a)))
9 | (assert (>= (str.len a) 1))
10 | (assert (>= (str.len b) 5))
11 |
12 | (check-sat)
13 | (get-model)
14 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-003.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (= x (str.replace_re_longest_all y (str.to.re "*") z)))
6 |
7 | (assert (str.in.re y (str.to.re "******")))
8 | (assert (str.in.re z (str.to.re "\u{5c}"))) ; \
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/simple-cycle2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 | (declare-fun c () String)
6 | (declare-fun d () String)
7 | (declare-fun e () String)
8 |
9 | (assert (= a (str.++ b (str.++ c e))))
10 | (assert (= b (str.++ d a)))
11 |
12 | (assert (not (= e "")))
13 |
14 | (check-sat)
--------------------------------------------------------------------------------
/tests/str.at-bug.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun a () Bool)
2 | (declare-fun b () String)
3 | (declare-fun c () String)
4 | (declare-fun d () Bool)
5 | (declare-fun e () Bool)
6 | (assert (xor a e))
7 | (assert (= d (not (= "" (str.replace b c (str.at b (str.len b)))))))
8 | (assert (= (xor a e) (= "-" c)))
9 | (check-sat)
10 |
11 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/concat-001.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (str.in.re x (re.* (str.to.re "ab"))))
6 | (assert (str.in.re y (re.* (str.to.re "c"))))
7 | (assert (str.in.re z (str.to.re "cccc")))
8 | (assert (= z (str.++ x y)))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/parse-ecma-groups.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const g1 String)
5 | (declare-const g2 String)
6 |
7 | (assert (= g1 ((_ str.extract 1) x (re.from_ecma2020 'abc([a-z]+)([A-Z]+)'))))
8 | (assert (= g2 ((_ str.extract 2) x (re.from_ecma2020 'abc([a-z]+)([A-Z]+)'))))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/word-equation-6.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun H () String)
4 | (declare-fun G () String)
5 | (declare-fun E () String)
6 | (declare-fun J () String)
7 | (assert (= (str.++ "de" H "fahgf" E H "bg" H "dfchjgbjhgafiagegfcije" J H "dg")
8 | (str.++ "deifah" G "idg") ))
9 | (check-sat)
10 | (get-model)
11 |
--------------------------------------------------------------------------------
/tests/substring2.smt2:
--------------------------------------------------------------------------------
1 |
2 | (set-logic QF_S)
3 |
4 | (declare-fun x () String)
5 | (declare-fun y () String)
6 | (declare-fun z () String)
7 |
8 | (assert (= x (str.++ "x" z)))
9 | (assert (= y (str.substr x 3 (- (str.len x) 5))))
10 | (assert (str.in_re y (re.from_ecma2020 'a+b+')))
11 | (assert (= (str.at x 4) "c"))
12 |
13 | (check-sat)
--------------------------------------------------------------------------------
/tests/substring2b.smt2:
--------------------------------------------------------------------------------
1 |
2 | (set-logic QF_S)
3 |
4 | (declare-fun x () String)
5 | (declare-fun y () String)
6 | (declare-fun z () String)
7 |
8 | (assert (= x (str.++ "x" z)))
9 | (assert (= y (str.substr x 3 (- (str.len x) 5))))
10 | (assert (str.in_re y (re.from_ecma2020 'a+b+')))
11 | (assert (= (str.at x 5) "c"))
12 |
13 | (check-sat)
--------------------------------------------------------------------------------
/tests/temp-prop/word-equation-6.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun H () String)
4 | (declare-fun G () String)
5 | (declare-fun E () String)
6 | (declare-fun J () String)
7 | (assert (= (str.++ "de" H "fahgf" E H "bg" H "dfchjgbjhgafiagegfcije" J H "dg")
8 | (str.++ "deifah" G "idg") ))
9 | (check-sat)
10 | (get-model)
--------------------------------------------------------------------------------
/tests/test-replace2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x () String)
4 | (declare-fun y () String)
5 | (declare-fun z () String)
6 |
7 | (assert (= x (str.replaceall y "e" z)))
8 | (assert (str.in.re y (str.to.re "hello")))
9 | (assert (str.in.re z (str.to.re "d")))
10 | (assert (str.in.re x (str.to.re "hbllo")))
11 |
12 | (check-sat)
13 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-024.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (assert (= x (str.replace_re_longest_all y (re.++ (re.++ (re.* (str.to.re "1")) (re.* (str.to.re "0"))) (str.to.re "10")) z)))
5 |
6 | (assert (str.in.re x (re.++ (re.* (str.to.re "01")) (str.to.re "01"))))
7 |
8 | (check-sat)
9 |
--------------------------------------------------------------------------------
/tests/chars3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_)
2 |
3 | (declare-fun Constructed_Argument () String)
4 |
5 | (assert (let ((a!1 (to_real (str.indexof Constructed_Argument
6 | (str.++ (str.from_code (bv2nat #x2d)) (str.from_code (bv2nat #x2d)))
7 | 0))))
8 | (= a!1 (- 1.0))))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/regex_cg.smt2:
--------------------------------------------------------------------------------
1 |
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y (str.replace_cg_all x
7 | ((_ re.capture 1) (re.range "a" "z"))
8 | (re.++ (_ re.reference 1) (_ re.reference 1)))))
9 | (assert (= x "ZabA"))
10 |
11 | (check-sat)
12 | (get-model)
13 |
--------------------------------------------------------------------------------
/tests/test-replace-word.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x () String)
4 | (declare-fun y () String)
5 | (declare-fun z () String)
6 |
7 | (assert (= x (str.replaceall y "ell" z)))
8 | (assert (str.in.re y (str.to.re "hello")))
9 | (assert (str.in.re z (str.to.re "b")))
10 | (assert (str.in.re x (str.to.re "hbo")))
11 |
12 | (check-sat)
13 |
--------------------------------------------------------------------------------
/tests/test-replace-word2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x () String)
4 | (declare-fun y () String)
5 | (declare-fun z () String)
6 |
7 | (assert (= x (str.replaceall y "ell" z)))
8 | (assert (str.in.re y (str.to.re "hello")))
9 | (assert (str.in.re z (str.to.re "b")))
10 | (assert (str.in.re x (str.to.re "hao")))
11 |
12 | (check-sat)
13 |
--------------------------------------------------------------------------------
/tests/contains-8.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 | (declare-const z String)
6 | (declare-const res String)
7 |
8 | (assert(= res (str.replace_re_all x (re.comp (re.*(str.to_re "ab"))) z)))
9 | (assert (str.in_re x (re.*(str.to_re "ab"))))
10 | (assert(not (= res "")))
11 | (check-sat)
12 | (get-model)
13 |
--------------------------------------------------------------------------------
/tests/email-regex.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const w String)
4 |
5 | (assert (str.in.re w (re.from.str "[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*")))
6 |
7 | (assert (str.prefixof "me@" w))
8 | (assert (str.suffixof "@gmail.com" w))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/js-semantics.smt2:
--------------------------------------------------------------------------------
1 | (set-option :produce-models true)
2 | (set-option :inline-size-limit 10000)
3 |
4 | (declare-const var0 String)
5 | (declare-const y String)
6 | (assert (= var0 "abb"))
7 | (assert (= y
8 | ((_ str.extract 1) var0 (re.+ ((_ re.capture 1) (re.*? re.allchar))))))
9 | (assert (= y "b"))
10 |
11 | (check-sat)
12 | (get-model)
13 |
--------------------------------------------------------------------------------
/tests/len-bug.smt2:
--------------------------------------------------------------------------------
1 |
2 | (declare-const x String)
3 | (declare-const y String)
4 | (declare-const a Int)
5 | (declare-const b Int)
6 |
7 | (assert (= x "abc"))
8 | (assert (= (str.len x) (+ (str.len y) 1)))
9 | (assert (= a (str.len x)))
10 | (assert (= b (str.len y)))
11 |
12 | (assert (= a 1)) ; should be unsat, previously gave sat
13 |
14 | (check-sat)
15 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/indexof_const_startpos_sat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status sat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 |
9 | (assert (= "hhhhjjj" (str.++ "h" a)))
10 | (assert (= (str.indexof a "hhh" j) i))
11 | (assert (>= i 0))
12 | (assert (= j 0))
13 | (check-sat)
14 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/indexof_empty_sat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status sat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (= (str.indexof a "" j) i))
10 | (assert (= i j))
11 |
12 | (check-sat)
13 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/indexof_var_sat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status sat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (= (str.indexof a "hhh" j) i))
10 | (assert (> i 0))
11 |
12 | (check-sat)
13 | (get-model)
--------------------------------------------------------------------------------
/tests/replace-length-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_4 () String)
4 | (declare-fun sigmaStar_0 () String)
5 |
6 | (assert (= x_4 (str.replace sigmaStar_0 "\u{2f}\u{5b}\u{5e}\u{30}\u{2d}\u{39}\u{61}\u{2d}\u{7a}\u{5c}\u{2d}\u{5f}\u{2c}\u{5d}\u{2b}\u{2f}\u{69}" "")))
7 |
8 | (assert (> (str.len sigmaStar_0) (str.len x_4)))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/test-replace.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x () String)
4 | (declare-fun y () String)
5 | (declare-fun z () String)
6 |
7 | (assert (= x (str.replaceall y "e" z)))
8 | (assert (str.in.re y (str.to.re "hello")))
9 | (assert (str.in.re z (str.to.re "b")))
10 | (assert (str.in.re x (str.to.re "hbllo")))
11 |
12 | (check-sat)
13 | (get-model)
14 |
--------------------------------------------------------------------------------
/tests/contains-7.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 | (declare-const z String)
6 | (declare-const res String)
7 |
8 | (assert(= res (str.replace_all x y z)))
9 | (assert (str.in_re x (re.*(str.to_re "ab"))))
10 | (assert (not(str.in_re y (re.*(str.to_re "ab")))))
11 | (assert(not (= res "")))
12 |
13 | (check-sat)
14 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/indexof_const_startpos_unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status unsat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 |
9 | (assert (= "hhhhjjj" (str.++ "h" a)))
10 | (assert (= (str.indexof a "hhh" j) i))
11 | (assert (>= i 0))
12 | (assert (= j 1))
13 | (check-sat)
14 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/indexof_var_unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status unsat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (= (str.indexof a "hhh" j) i))
10 | (assert (> i 1))
11 |
12 | (check-sat)
13 | (get-model)
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-011.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (str.in.re x (re.* (str.to.re "ab"))))
6 | (assert (str.in.re y (re.* (str.to.re "c"))))
7 | (assert (str.in.re z (str.to.re "cccc")))
8 | (assert (= z (str.replace_re_longest_all x (str.to.re "ab") y)))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/prefix3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; SAT
4 |
5 | (declare-fun x0 () String)
6 | (declare-fun x1 () String)
7 |
8 | (assert (str.prefixof x0 x1))
9 | (assert (str.in.re x0 (re.* (re.range "a" "c"))))
10 | (assert (str.in.re x1 (re.* (re.range "c" "e"))))
11 |
12 | (assert (not (= (str.len x0) 0)))
13 | (assert (not (= (str.len x1) 0)))
14 |
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/extract-cg.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y ((_ str.extract 1) x
7 | (re.++ ((_ re.capture 1) (re.+ (str.to.re "a")))
8 | re.all))))
9 |
10 | (assert (str.in.re x (str.to.re "aabbb")))
11 | ;(assert (str.in.re y (str.to.re "")))
12 |
13 | (check-sat)
14 | (get-model)
15 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/replace-length-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x_4 () String)
4 | (declare-fun sigmaStar_0 () String)
5 |
6 | (assert (= x_4 (str.replace sigmaStar_0 "\u{2f}\u{5b}\u{5e}\u{30}\u{2d}\u{39}\u{61}\u{2d}\u{7a}\u{5c}\u{2d}\u{5f}\u{2c}\u{5d}\u{2b}\u{2f}\u{69}" "")))
7 |
8 | (assert (> (str.len sigmaStar_0) (str.len x_4)))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/extract-cg2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y ((_ str.extract 1) x
7 | (re.++ ((_ re.capture 1) (re.+ (str.to.re "a")))
8 | re.all))))
9 |
10 | (assert (str.in.re x (str.to.re "bbbaabbb")))
11 | ;(assert (str.in.re y (str.to.re "")))
12 |
13 | (check-sat)
14 | (get-model)
15 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/regex_counting_unsat.smt2:
--------------------------------------------------------------------------------
1 | (declare-const X String)
2 | (assert (str.in_re X (re.++ ((_ re.loop 5 60) (re.diff re.allchar (str.to_re "a"))) ((_ re.loop 5 60) (re.diff re.allchar (str.to_re "b")))((_ re.loop 0 60) (re.diff re.allchar (str.to_re "c"))))))
3 | (assert (str.in_re X (re.++ re.all (str.to_re "c"))))
4 | (assert (< 120 (str.len X)))
5 | (check-sat)
6 | (get-model)
--------------------------------------------------------------------------------
/tests/test-replace-regex.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x () String)
4 | (declare-fun y () String)
5 | (declare-fun z () String)
6 |
7 | (assert (str.in.re y (str.to.re "010101")))
8 | (assert (str.in.re z (str.to.re "c")))
9 | (assert (= x (str.replace_re_longest_all y (re.* (str.to.re "01")) z)))
10 | (assert (str.in.re x (str.to.re "c")))
11 |
12 | (check-sat)
13 |
--------------------------------------------------------------------------------
/tests/test-replace-regex2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x () String)
4 | (declare-fun y () String)
5 | (declare-fun z () String)
6 |
7 | (assert (str.in.re y (str.to.re "010101")))
8 | (assert (str.in.re z (str.to.re "c")))
9 | (assert (= x (str.replace_re_longest_all y (re.* (str.to.re "01")) z)))
10 | (assert (str.in.re x (str.to.re "cc")))
11 |
12 | (check-sat)
13 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/indexof_empty_sat2.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status sat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (= (str.indexof a "" j) i))
10 | (assert (not (= i j)))
11 | (assert (< i 0))
12 | (check-sat)
13 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/indexof_const_index_sat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status sat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (= (str.indexof a "hhh" j) i))
10 | (assert (= i 1))
11 | (assert (= j 0))
12 |
13 | (check-sat)
14 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/indexof_empty_unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status unsat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (= (str.indexof a "" j) i))
10 | (assert (not (= i j)))
11 | (assert (>= i 0))
12 | (check-sat)
13 | (get-model)
--------------------------------------------------------------------------------
/tests/loop-cg.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y ((_ str.extract 1) x
7 | (re.++ ((_ re.capture 1) ((_ re.loop 2 3) (str.to.re "a")))
8 | re.all))))
9 |
10 | (assert (str.in.re x (str.to.re "aaaabb")))
11 | (assert (str.in.re y (str.to.re "aaa")))
12 |
13 | (check-sat)
14 | (get-model)
15 |
--------------------------------------------------------------------------------
/tests/parse-regex-incremental.smt2:
--------------------------------------------------------------------------------
1 |
2 |
3 | (set-logic QF_S)
4 |
5 | (declare-const w String)
6 |
7 | (assert (str.in.re w (re.from.str "^[a-zA-Z][a-zA-Z0-9-_\.]{1,20}$")))
8 |
9 | (check-sat)
10 | (get-model)
11 |
12 | (assert (str.in.re w (re.* (re.range "a" "z"))))
13 |
14 | (check-sat)
15 | (get-model)
16 |
17 | (assert (= (str.len w) 5))
18 |
19 | (check-sat)
20 | (get-model)
21 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-002.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (= x (str.replace_re_longest_all y (str.to.re "0") z)))
6 |
7 | (assert (str.in.re x (re.++ (str.to.re "*") (re.* (str.to.re "*")))))
8 | (assert (str.in.re y (re.* (str.to.re "0"))))
9 | (assert (str.in.re z (re.* (str.to.re "*"))))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/indexof_const_index_unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status unsat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (= (str.indexof a "hhh" j) i))
10 |
11 | (assert (= i 2))
12 | (assert (> j 0))
13 |
14 | (check-sat)
15 | (get-model)
--------------------------------------------------------------------------------
/tests/regex_cg_2.smt2:
--------------------------------------------------------------------------------
1 |
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y (str.replace_cg x
7 | ((_ re.capture 1) (re.range "a" "z"))
8 | (re.++ (_ re.reference 1) (_ re.reference 1)))))
9 | (assert (str.contains x "a"))
10 | (assert (not (str.contains y "aa")))
11 |
12 | (check-sat)
13 | (get-model)
14 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-014.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (= x (str.replace_re_longest_all y (str.to.re "0101") z)))
6 |
7 | (assert (str.in.re x (re.++ (re.* (str.to.re "0")) (str.to.re "11"))))
8 | (assert (str.in.re y (re.* (str.to.re "01"))))
9 | (assert (str.in.re z (re.* (str.to.re "10"))))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/concat-regex.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 | (declare-fun c () String)
6 | (declare-fun d () String)
7 |
8 | (assert (= a (str.++ b c)))
9 | (assert (= b (str.++ d c)))
10 |
11 | (assert (str.in.re a (re.+ (re.union (str.to.re "x") (str.to.re "y")))))
12 | (assert (str.in.re c (re.+ (str.to.re "x"))))
13 |
14 | (check-sat)
15 | (get-model)
16 |
--------------------------------------------------------------------------------
/tests/simple-replace-2c.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const a String)
4 | (declare-const b String)
5 | (declare-fun x_7 () String)
6 | (declare-fun x_10 () String)
7 |
8 | (assert (= x_10 (str.++ a b)))
9 | (assert (= x_7 (str.replaceall x_10 "e" "a")))
10 | (assert (str.in.re x_10 (str.to.re "Hello")))
11 | (assert (str.in.re x_7 (str.to.re "Hallo")))
12 |
13 | (check-sat)
14 | (get-model)
15 |
--------------------------------------------------------------------------------
/tests/norn-benchmark-9k.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (= "abc" "abd"))
14 | (check-sat)
15 |
--------------------------------------------------------------------------------
/tests/concat-regex2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (set-info :status unsat)
4 |
5 | (declare-fun a () String)
6 | (declare-fun b () String)
7 | (declare-fun c () String)
8 | (declare-fun d () String)
9 |
10 | (assert (= a (str.++ b c)))
11 | (assert (= b (str.++ d c)))
12 |
13 | (assert (str.in.re a (re.+ (str.to.re "y"))))
14 | (assert (str.in.re c (re.+ (str.to.re "x"))))
15 |
16 | (check-sat)
17 | (get-model)
18 |
--------------------------------------------------------------------------------
/tests/extract-cg4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y ((_ str.extract 1) x
7 | (re.union
8 | (re.+ (str.to.re "a"))
9 | ((_ re.capture 1) (re.+ (str.to.re "a")))))))
10 |
11 | (assert (str.in.re x (str.to.re "aa")))
12 | ;(assert (str.in.re y (str.to.re "")))
13 |
14 | (check-sat)
15 | (get-model)
16 |
--------------------------------------------------------------------------------
/tests/norn-benchmark-9g.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (not (= "abc" "abd")))
14 | (check-sat)
15 |
--------------------------------------------------------------------------------
/tests/simple-cvc-smtlib-b.smt2:
--------------------------------------------------------------------------------
1 |
2 | (set-logic QF_S)
3 |
4 | (declare-fun a () String)
5 | (declare-fun b () String)
6 | (declare-fun a_len () Int)
7 |
8 | (assert (= b (str.++ a "c")))
9 | (assert (= (str.len a) (str.len b)))
10 | (assert (str.in.re a (re.* (str.to.re "xy"))))
11 | (assert (not (str.in.re b (re.* (str.to.re "xy")))))
12 | (assert (= (str.len a) a_len))
13 | (assert (> a_len 0))
14 |
15 | (check-sat)
--------------------------------------------------------------------------------
/tests/simple-cvc-smtlib.smt2:
--------------------------------------------------------------------------------
1 |
2 | (set-logic QF_S)
3 |
4 | (declare-fun a () String)
5 | (declare-fun b () String)
6 | (declare-fun a_len () Int)
7 |
8 | (assert (= b (str.++ a "c")))
9 | ; (assert (= (str.len a) (str.len b)))
10 | (assert (str.in.re a (re.* (str.to.re "xy"))))
11 | (assert (not (str.in.re b (re.* (str.to.re "xy")))))
12 | (assert (= (str.len a) a_len))
13 | (assert (> a_len 0))
14 |
15 | (check-sat)
--------------------------------------------------------------------------------
/tests/simple-replace-3b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const a String)
4 | (declare-const b String)
5 | (declare-fun x_7 () String)
6 | (declare-fun x_10 () String)
7 |
8 | (assert (= x_7 (str.replace x_10 "e" "X")))
9 | (assert (str.in.re x_7 (re.++ re-full-set
10 | (str.to.re "e")
11 | re-full-set)))
12 |
13 | (check-sat)
14 | (get-model)
15 |
16 |
--------------------------------------------------------------------------------
/tests/str.at-3c.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 |
5 | (assert (not (and
6 | (= (str.at "012" (- 1)) "")
7 | (= (str.at "012" 0) "0")
8 |
9 | (= (str.at "012" (- (str.len "012") 1)) "2")
10 | (= (str.at "012" (- (str.len "012") 2)) "1")
11 | (= (str.at "012" (- (str.len "012") 0)) "")
12 | (distinct (str.at "000" (- (str.len "000") 5)) "0")
13 | )))
14 |
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-025.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (assert (= x (str.replace_re_longest_all y (re.++ (str.to.re "a") (re.* (str.to.re "a"))) z)))
5 |
6 | (assert (str.in.re x (str.to.re "cccc")) )
7 | (assert (str.in.re y (re.++ (str.to.re "aa") (str.to.re "ccc"))))
8 | (assert (str.in.re z (re.* (str.to.re "c"))))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/simple-replace-3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const a String)
4 | (declare-const b String)
5 | (declare-fun x_7 () String)
6 | (declare-fun x_10 () String)
7 |
8 | (assert (= x_7 (str.replaceall x_10 "e" "X")))
9 | (assert (str.in.re x_7 (re.++ re-full-set
10 | (str.to.re "e")
11 | re-full-set)))
12 |
13 | (check-sat)
14 | (get-model)
15 |
16 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-004.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (= x (str.replace_re_longest_all y (str.to.re "a") z)))
6 |
7 | (assert (str.in.re y (re.++ (re.* (str.to.re "a")) (re.* (str.to.re "b")))))
8 | (assert (str.in.re z (str.to.re "1")))
9 | (assert (str.in.re x (re.++ (str.to.re "1111") (re.* (str.to.re "1")))))
10 |
11 | (check-sat)
12 |
--------------------------------------------------------------------------------
/tests/loop-cg2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y ((_ str.extract 1) x
7 | (re.++
8 | ((_ re.loop 2 3)
9 | ((_ re.capture 1) (str.to.re "a")))
10 | re.all))))
11 |
12 | (assert (str.in.re x (str.to.re "aabb")))
13 | (assert (str.in.re y (str.to.re "a")))
14 |
15 | (check-sat)
16 | (get-model)
17 |
--------------------------------------------------------------------------------
/tests/prefix.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; SAT
4 |
5 | (declare-fun x0 () String)
6 | (declare-fun x1 () String)
7 |
8 | (assert (str.prefixof x0 x1))
9 | (assert (str.in.re x0 (re.* (re.charrange (char.from-int 70) (char.from-int 80)))))
10 | (assert (str.in.re x1 (re.* (re.charrange (char.from-int 80) (char.from-int 90)))))
11 |
12 | (assert (not (= (str.len x0) 0)))
13 | (assert (not (= (str.len x1) 0)))
14 |
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/extract-cg3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y ((_ str.extract 1) x
7 | (re.++
8 | (re.*? re.allchar)
9 | ((_ re.capture 1) (re.+ (str.to.re "a")))
10 | re.all))))
11 |
12 | (assert (str.in.re x (str.to.re "bbbaabbb")))
13 | ;(assert (str.in.re y (str.to.re "")))
14 |
15 | (check-sat)
16 | (get-model)
17 |
--------------------------------------------------------------------------------
/tests/prefix2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; UNSAT
4 |
5 | (declare-fun x0 () String)
6 | (declare-fun x1 () String)
7 |
8 | (assert (str.prefixof x0 x1))
9 | (assert (str.in.re x0 (re.* (re.charrange (char.from-int 70) (char.from-int 80)))))
10 | (assert (str.in.re x1 (re.* (re.charrange (char.from-int 81) (char.from-int 90)))))
11 |
12 | (assert (not (= (str.len x0) 0)))
13 | (assert (not (= (str.len x1) 0)))
14 |
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-005.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (= x (str.replace_re_longest_all y (str.to.re "a") z)))
6 |
7 |
8 |
9 | (assert (str.in.re y (re.++ (re.* (str.to.re "ab")) (re.* (str.to.re "b")))))
10 |
11 |
12 | (assert (str.in.re z (str.to.re "1")))
13 |
14 | (assert (str.in.re x (re.* (str.to.re "1"))))
15 |
16 |
17 |
18 | (check-sat)
19 |
--------------------------------------------------------------------------------
/tests/epsilon-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 | (set-option :strings-exp true)
3 | (set-option :produce-models true)
4 | (declare-fun sigmaStar_2 () String)
5 | (declare-fun epsilon () String)
6 | (declare-fun x_3 () String)
7 | (assert (= epsilon ""))
8 | (assert (= x_3 (str.replace epsilon "http://" "https://")))
9 | (assert (str.in.re x_3 (re.++ (re.* re.allchar) (re.++ (str.to.re "/evil") (re.* re.allchar)))))
10 | (check-sat)
11 | (get-model)
12 |
--------------------------------------------------------------------------------
/tests/simple-cvc-smtlib-c.smt2:
--------------------------------------------------------------------------------
1 |
2 | (set-logic QF_S)
3 |
4 | (declare-fun a () String)
5 | (declare-fun b () String)
6 | (declare-fun a_len () Int)
7 |
8 | (assert (= b (str.++ a "c")))
9 | ; (assert (= (str.len a) (str.len b)))
10 | (assert (str.in.re a (re.* (str.to.re "xy"))))
11 | (assert (not (str.in.re b (re.* (str.to.re "xy")))))
12 | (assert (= (str.len a) a_len))
13 | (assert (> a_len 0))
14 | (assert (= a_len 8))
15 |
16 | (check-sat)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/substr_var_sat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status sat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (str.in_re b (re.union (str.to_re "hh") (str.to_re "bb"))))
10 | (assert (= (str.substr a i j) b))
11 | (assert (> i 0))
12 | (assert (> j 0))
13 |
14 | (check-sat)
15 | (get-model)
--------------------------------------------------------------------------------
/tests/parse-ecma-replace.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | (assert (= y (str.replace_cg x (re.from_ecma2020 'a([a-z]*)z')
7 | (_ re.reference 1)
8 | ; not working yet:
9 | ; (re.from_ecma2020 '\1')
10 | )))
11 | (assert (str.contains x 'abcz'))
12 |
13 | (check-sat)
14 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/substr_const_len_sat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status sat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (str.in_re b (re.union (str.to_re "hh") (str.to_re "bb"))))
10 | (assert (= (str.substr a i j) b))
11 | (assert (= i 0))
12 | (assert (= j 2))
13 |
14 | (check-sat)
15 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/substr_empty_sat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status sat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (str.in_re b (re.union (str.to_re "hh") (str.to_re "bb"))))
10 | (assert (= (str.substr a i j) ""))
11 | (assert (> i 3))
12 | (assert (> j 0))
13 |
14 | (check-sat)
15 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/substr_var_unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status unsat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (str.in_re b (re.union (str.to_re "hh") (str.to_re "bb"))))
10 | (assert (= (str.substr a i j) b))
11 | (assert (> i 6))
12 | (assert (> j 0))
13 |
14 | (check-sat)
15 | (get-model)
--------------------------------------------------------------------------------
/tests/simple-replace-4c.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 | (set-option :strings-exp true)
3 | (set-option :produce-models true)
4 |
5 | (declare-fun x_7 () String)
6 | (declare-fun x_10 () String)
7 | (declare-fun x_11 () String)
8 | (declare-fun x_12 () String)
9 | (declare-fun x_13 () String)
10 |
11 |
12 | (assert (= x_10 (str.++ x_11 x_12 )))
13 | (assert (= x_7 (str.replace x_10 "e" "a")))
14 | (assert (= x_7 ""))
15 |
16 | (check-sat)
17 | (get-model)
18 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/substr_const_begin_sat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status sat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (str.in_re b (re.union (str.to_re "hh") (str.to_re "bb"))))
10 | (assert (= (str.substr a i j) b))
11 | (assert (= i 1))
12 | (assert (= j 2))
13 |
14 | (check-sat)
15 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/substr_const_len_unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status unsat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (str.in_re b (re.union (str.to_re "hh") (str.to_re "bb"))))
10 | (assert (= (str.substr a i j) b))
11 | (assert (> i 5))
12 | (assert (= j 2))
13 |
14 | (check-sat)
15 | (get-model)
--------------------------------------------------------------------------------
/tests/simple-replace-2b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const a String)
4 | (declare-const b String)
5 | (declare-fun x_7 () String)
6 | (declare-fun x_10 () String)
7 |
8 | (assert (= x_10 (str.++ a b)))
9 | (assert (or (= x_7 (str.replace x_10 "e" "a"))
10 | (= x_7 (str.replaceall x_10 "e" "a"))))
11 | (assert (str.in.re x_10 (str.to.re "Hello")))
12 | (assert (str.in.re x_7 (str.to.re "Hollo")))
13 |
14 | (check-sat)
15 | (get-model)
16 |
--------------------------------------------------------------------------------
/tests/simple-replace-4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 | (set-option :strings-exp true)
3 | (set-option :produce-models true)
4 |
5 | (declare-fun x_7 () String)
6 | (declare-fun x_10 () String)
7 | (declare-fun x_11 () String)
8 | (declare-fun x_12 () String)
9 | (declare-fun x_13 () String)
10 |
11 |
12 | (assert (= x_10 (str.++ x_11 x_12 )))
13 | (assert (= x_7 (str.replace x_10 "e" "a")))
14 | (assert (= x_7 "hallo"))
15 |
16 | (check-sat)
17 | (get-model)
18 |
--------------------------------------------------------------------------------
/tests/simple-replace-4b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 | (set-option :strings-exp true)
3 | (set-option :produce-models true)
4 |
5 | (declare-fun x_7 () String)
6 | (declare-fun x_10 () String)
7 | (declare-fun x_11 () String)
8 | (declare-fun x_12 () String)
9 | (declare-fun x_13 () String)
10 |
11 |
12 | (assert (= x_10 (str.++ x_11 x_12 )))
13 | (assert (= x_7 (str.replace x_10 "e" "a")))
14 | (assert (= x_7 "hello"))
15 |
16 | (check-sat)
17 | (get-model)
18 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/substr_const_begin_unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status unsat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (str.in_re b (re.union (str.to_re "hh") (str.to_re "bb"))))
10 | (assert (= (str.substr a i j) b))
11 | (assert (= i 1))
12 | (assert (not (= j 2)))
13 |
14 | (check-sat)
15 | (get-model)
--------------------------------------------------------------------------------
/.github/workflows/scala.yml:
--------------------------------------------------------------------------------
1 | name: Scala CI
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 | pull_request:
7 | branches: [ master ]
8 |
9 | jobs:
10 | build:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v2
16 | - name: Set up JDK 11
17 | uses: actions/setup-java@v2
18 | with:
19 | java-version: '11'
20 | distribution: 'adopt'
21 | - name: Run tests
22 | run: sbt test
23 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/substr_empty_unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :status unsat)
2 | (declare-fun a () String)
3 | (declare-fun b () String)
4 |
5 | (declare-fun i () Int)
6 | (declare-fun j () Int)
7 |
8 | (assert (str.in_re a (re.union (str.to_re "hhhbbb") (str.to_re "bhhh"))))
9 | (assert (str.in_re b (re.union (str.to_re "hh") (str.to_re "bb"))))
10 | (assert (= (str.substr a i j) ""))
11 | (assert (< i 3))
12 | (assert (> i 0))
13 | (assert (> j 0))
14 |
15 | (check-sat)
16 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/concat_sat.smt2:
--------------------------------------------------------------------------------
1 | ; sat
2 | (declare-fun x ()String)
3 | (declare-fun y ()String)
4 | (declare-fun z ()String)
5 |
6 | (declare-const len_x Int)
7 | (declare-const len_y Int)
8 | (declare-const len_z Int)
9 |
10 | (assert (= len_x (str.len x)))
11 | (assert (= len_y (str.len y)))
12 | (assert (= len_z (str.len z)))
13 |
14 | (assert (< 1 len_x))
15 | (assert (< 3 len_y))
16 | (assert (> 7 len_z))
17 |
18 | (assert (= z (str.++ x y)))
19 |
20 | (check-sat)
21 | (get-model)
--------------------------------------------------------------------------------
/tests/hu-benchmarks/concat_unsat.smt2:
--------------------------------------------------------------------------------
1 | ; unsat
2 | (declare-fun x ()String)
3 | (declare-fun y ()String)
4 | (declare-fun z ()String)
5 |
6 | (declare-const len_x Int)
7 | (declare-const len_y Int)
8 | (declare-const len_z Int)
9 |
10 | (assert (= len_x (str.len x)))
11 | (assert (= len_y (str.len y)))
12 | (assert (= len_z (str.len z)))
13 |
14 | (assert (< 1 len_x))
15 | (assert (< 3 len_y))
16 | (assert (> 6 len_z))
17 | (assert (= z (str.++ x y)))
18 |
19 | (check-sat)
20 | (get-model)
--------------------------------------------------------------------------------
/tests/norn-benchmark-9.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (str.in.re "" (re.* (re.range "a" "u"))))
14 | (assert (not (str.in.re "" (re.* (str.to.re "b")))))
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/norn-benchmark-9c.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (str.in.re var_0 (re.* (re.range "a" "u"))))
14 | (assert (str.in.re var_0 (re.* (str.to.re "v"))))
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/norn-benchmark-9e.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (str.in.re var_0 (re.* (re.range "m" "u"))))
14 | (assert (str.in.re var_0 (re.+ (str.to.re "v"))))
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-021.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (assert (= x (str.replace_re_longest_all y (re.++ (re.* (str.to.re "0")) (re.++ (str.to.re "01") (re.union (re.* (str.to.re "0")) (re.* (str.to.re "1"))))) z)))
5 |
6 | (assert (str.in.re x (re.++ (re.* (str.to.re "0")) (str.to.re "11"))))
7 | (assert (str.in.re y (re.* (str.to.re "01"))))
8 | (assert (str.in.re z (re.* (str.to.re "10"))))
9 |
10 | (check-sat)
11 |
--------------------------------------------------------------------------------
/tests/norn-benchmark-9b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (str.in.re var_0 (re.* (re.range "a" "u"))))
14 | (assert (not (str.in.re var_0 (re.* (str.to.re "b")))))
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | Matthew Hague
2 | http://www.cs.rhul.ac.uk/home/hague/
3 |
4 | Philipp Ruemmer
5 | http://www.philipp.ruemmer.org
6 |
7 | Denghang Hu
8 | https://tis.ios.ac.cn/?page_id=2451
9 |
10 | Riccardo De Masellis
11 | http://demasellis.x10host.com/
12 |
13 | Zhilei Han
14 | https://www.linusboyle.cn/
15 |
16 | Oliver Markgraf
17 | https://arg.cs.uni-kl.de/gruppe/markgraf/
--------------------------------------------------------------------------------
/tests/regex_cg_6.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 |
4 | (assert (= y (str.replace_cg x
5 | (re.+? (re.range "a" "a"))
6 | (str.to.re "b"))))
7 |
8 | (assert (str.in.re x (re.+
9 | (re.++
10 | (re.+ (re.range "a" "b"))
11 | (re.+ (re.range "b" "b"))))))
12 | (assert (str.in.re y (re.+ (re.range "b" "c"))))
13 |
14 | (check-sat)
15 | (get-model)
16 |
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/parikh.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Cyclic Word equation
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 |
13 | (declare-fun x () String)
14 | (assert (= (str.++ x x "b" x)(str.++ x "a" x x)))
15 | (check-sat)
16 | (exit)
17 |
--------------------------------------------------------------------------------
/tests/norn-benchmark-9h.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (str.in.re var_0 (str.to.re "abc")))
14 | (assert (str.in.re var_1 (str.to.re "abc")))
15 | (assert (not (= var_0 var_1)))
16 | (check-sat)
17 |
--------------------------------------------------------------------------------
/tests/automata-bwd.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | ;(assert (= x "bB"))
4 | (assert(str.suffixof "B" x))
5 |
6 | ;(assert (str.in.re x (re.from_automaton "automaton value_0 {init s0; s0 -> s0 [0, 65];s0 -> s0 [68, 97];s0 -> s1 [98, 98];s0 -> s0 [99, 65535]; s1 -> s1 [0, 66];s1 -> s1 [68, 65535];accepting s0,s1;};")))
7 | (assert (str.in.re x (re.from_automaton "automaton value_0 {init s0; s0 -> s0 [0, 66];s0 -> s0 [68, 65535];accepting s0;};")))
8 |
9 | (assert(= y (str.replace x "B" "b")))
10 |
--------------------------------------------------------------------------------
/tests/norn-benchmark-9f.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (str.in.re var_0 (re.* (re.range "a" "u"))))
14 | (assert (str.in.re var_0 (re.* (str.to.re "v"))))
15 | (assert (not (= var_0 "")))
16 | (check-sat)
17 |
--------------------------------------------------------------------------------
/tests/loop-cg3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const x String)
4 | (declare-const y String)
5 |
6 | ; "aaaa".match(/(a*?){1,4}/) ===> a
7 | (assert (= y ((_ str.extract 1) x
8 | (re.++
9 | (re.*? re.allchar)
10 | ((_ re.loop 1 4)
11 | ((_ re.capture 1)
12 | (re.*? (str.to.re "a"))))
13 | re.all))))
14 |
15 | (assert (str.in.re x (str.to.re "aaaa")))
16 | (assert (str.in.re y (str.to.re "a")))
17 |
18 | (check-sat)
19 | (get-model)
20 |
--------------------------------------------------------------------------------
/tests/non-greedy-quantifiers.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun a () String)
4 | (declare-fun b () String)
5 | (declare-fun c () String)
6 | (declare-fun d () String)
7 |
8 | (assert (= a (str.++ b c)))
9 | (assert (= b (str.++ d c)))
10 |
11 | ; in a simple membership test, non-greedy quantifiers have exactly the same
12 | ; semantics as greedy quantifiers
13 | (assert (str.in.re a (re.+ (re.union (str.to.re "x") (str.to.re "y")))))
14 | (assert (str.in.re c (re.+? (str.to.re "x"))))
15 |
16 | (check-sat)
17 | (get-model)
18 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-008.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (declare-const w String)
5 | (declare-const v String)
6 |
7 | (assert (= x (str.replace_re_longest_all y (str.to.re "*") z)))
8 | (assert (= z (str.replace_re_longest_all w (str.to.re "*") v)))
9 |
10 | (assert (str.in.re y (str.to.re "******")))
11 | (assert (str.in.re z (str.to.re "\x5c"))) ; \
12 | (assert (str.in.re w (str.to.re "**")))
13 | (assert (str.in.re v (str.to.re "\x5c"))) ; \
14 |
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/norn-benchmark-9d.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | ;(assert (str.in.re var_0 (re.* (re.range "a" "u"))))
14 | (assert (str.in.re var_0 (re.* (str.to.re "u"))))
15 | (assert (str.in.re var_0 (re.+ (str.to.re "v"))))
16 | (check-sat)
17 |
--------------------------------------------------------------------------------
/tests/concat-regex3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (set-info :status sat)
4 |
5 | (declare-fun a () String)
6 | (declare-fun b () String)
7 | (declare-fun c () String)
8 | (declare-fun d () String)
9 |
10 | (assert (= a (str.++ b (str.++ (str.++ c c) b))))
11 | (assert (= b (str.++ d c)))
12 |
13 | (assert (str.in.re a (re.+ (re.++ (str.to.re "x")
14 | (re.++ (re.* (str.to.re "z"))
15 | (re.* (str.to.re "y")))))))
16 | (assert (str.in.re c (re.+ (str.to.re "x"))))
17 |
18 | (check-sat)
19 | (get-model)
20 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-019.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (declare-const w String)
5 | (declare-const v String)
6 |
7 | (assert (= x (str.replace_re_longest_all y (str.to.re "0101") z)))
8 | (assert (= y (str.replace_re_longest_all w (str.to.re "a") v)))
9 |
10 | (assert (str.in.re x (re.++ (re.* (str.to.re "0")) (str.to.re "11"))))
11 | (assert (str.in.re y (re.* (str.to.re "01"))))
12 | (assert (str.in.re z (re.* (str.to.re "10"))))
13 | (assert (str.in.re v (re.* (str.to.re "10"))))
14 |
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/anchor-5.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 |
4 | (assert (= y (str.replace_cg_all
5 | x
6 | (re.++
7 | (re.+ (str.to.re "a"))
8 | re.end-anchor)
9 | (str.to.re "b"))))
10 |
11 | (assert (= y "cb"))
12 | (assert (str.in.re x
13 | (re.++
14 | re.all
15 | (str.to.re "a")
16 | (re.+
17 | (str.to.re "a"))
18 | re.all)))
19 |
20 | (check-sat)
21 | (get-model)
22 |
--------------------------------------------------------------------------------
/tests/parikh-constraints.smt2:
--------------------------------------------------------------------------------
1 | ;(set-logic ALL_SUPPORTED)
2 | ;(set-option :strings-exp true)
3 | ;(set-option :produce-models true)
4 | ;(set-option :rewrite-divk true)
5 |
6 | (declare-fun value2 () String)
7 | (declare-fun key2 () String)
8 |
9 | (assert
10 |
11 | (str.contains
12 | (str.replace
13 | (str.substr
14 | value2
15 | 0 (+ (str.indexof value2 "G" 0) 1))
16 | "G" "g")
17 | "M")
18 |
19 | )
20 |
21 | (check-sat)
22 |
23 | ;(get-value (value2))
24 | ;(get-value (key2))
--------------------------------------------------------------------------------
/tests/norn-benchmark-9j.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (str.in.re var_0 (str.to.re "abc")))
14 | (assert (or (str.in.re var_1 (str.to.re "abd"))
15 | (str.in.re var_1 (str.to.re "ab"))
16 | (str.in.re var_1 (str.to.re "abcd"))))
17 | (assert (= var_0 var_1))
18 | (check-sat)
19 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-007.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (declare-const w String)
5 | (declare-const v String)
6 |
7 | (assert (= x (str.replace_re_longest_all y (str.to.re "0") z)))
8 | (assert (= z (str.replace_re_longest_all w (str.to.re "1") v)))
9 |
10 | (assert (str.in.re x (re.++ (str.to.re "*") (re.* (str.to.re "*")))))
11 | (assert (str.in.re y (re.* (str.to.re "0"))))
12 | (assert (str.in.re z (re.* (str.to.re "*"))))
13 | (assert (str.in.re w (re.* (str.to.re "1"))))
14 | (assert (str.in.re v (str.to.re "**")))
15 |
16 | (check-sat)
17 |
--------------------------------------------------------------------------------
/tests/norn-benchmark-9i.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun var_0 () String)
4 | (declare-fun var_1 () String)
5 | (declare-fun var_2 () String)
6 | (declare-fun var_3 () String)
7 | (declare-fun var_4 () String)
8 | (declare-fun var_5 () String)
9 | (declare-fun var_6 () String)
10 | (declare-fun var_7 () String)
11 | (declare-fun var_8 () String)
12 |
13 | (assert (str.in.re var_0 (str.to.re "abc")))
14 | (assert (or (str.in.re var_1 (str.to.re "abd"))
15 | (str.in.re var_1 (str.to.re "ab"))
16 | (str.in.re var_1 (str.to.re "abcd"))))
17 | (assert (not (= var_0 var_1)))
18 | (check-sat)
19 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-016.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (declare-const w String)
5 | (declare-const v String)
6 |
7 | (assert (str.in.re x (re.* (str.to.re "ab"))))
8 | (assert (str.in.re y (re.* (str.to.re "c"))))
9 | (assert (str.in.re z (str.to.re "cccc")))
10 | (assert (str.in.re w (re.++ (str.to.re "01") (re.* (str.to.re "01")))))
11 | (assert (str.in.re v (str.to.re "c")))
12 |
13 | (assert (= z (str.replace_re_longest_all x (str.to.re "abab") y)))
14 | (assert (= y (str.replace_re_longest_all w (str.to.re "01") v)))
15 |
16 | (check-sat)
17 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-010.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (declare-const w String)
5 | (declare-const v String)
6 |
7 | (assert (= x (str.replace_re_longest_all y (str.to.re "a") z)))
8 | (assert (= y (str.replace_re_longest_all w (str.to.re "1") v)))
9 |
10 | (assert (str.in.re y (re.++ (re.* (str.to.re "a")) (re.* (str.to.re "b")))))
11 | (assert (str.in.re z (str.to.re "1")))
12 | (assert (str.in.re x (re.++ (str.to.re "1111") (re.* (str.to.re "1")))))
13 | (assert (str.in.re w (re.++ (str.to.re "1") (re.* (str.to.re "11")))))
14 |
15 | (check-sat)
16 |
--------------------------------------------------------------------------------
/tests/anchor-1.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 |
4 | (assert (= y (str.replace_cg_all
5 | x
6 | (re.++
7 | re.begin-anchor
8 | (re.+ (str.to.re "a")))
9 | (str.to.re "b"))))
10 |
11 | (assert (= y "bc"))
12 | (assert (str.in.re x
13 | (re.++
14 | re.all
15 | (str.to.re "a")
16 | (re.+
17 | (str.to.re "a"))
18 | re.all)))
19 | ;(assert (not (str.contains y "aa")))
20 |
21 | (check-sat)
22 | (get-model)
23 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-009.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (declare-const w String)
5 | (declare-const v String)
6 |
7 | (assert (= x (str.replace_re_longest_all y (str.to.re "a") z)))
8 | (assert (= y (str.replace_re_longest_all w (str.to.re "1") v)))
9 |
10 | (assert (str.in.re y (re.++ (re.* (str.to.re "a")) (re.* (str.to.re "b")))))
11 | (assert (str.in.re z (str.to.re "1")))
12 | (assert (str.in.re x (re.++ (str.to.re "1111") (re.* (str.to.re "1")))))
13 | (assert (str.in.re w (re.* (str.to.re "1"))))
14 | (assert (str.in.re v (str.to.re "ab")))
15 |
16 | (check-sat)
17 |
--------------------------------------------------------------------------------
/tests/no-regexes.smt2:
--------------------------------------------------------------------------------
1 |
2 | (set-logic QF_S)
3 |
4 | (set-option :parse-transducers true)
5 |
6 | (define-funs-rec ((isempty ((x String) (y String)) Bool)) (
7 | ; def isempty
8 | (and (not (= x "")) (not (= y ""))
9 | (= (str.head x) (char.from-int 48)) ; '0'
10 | (= (str.head y) (char.from-int 49)) ; '1'
11 | (isempty (str.tail x) (str.tail y)))
12 | ))
13 |
14 | (declare-fun x () String)
15 | (declare-fun y () String)
16 |
17 | (assert (isempty x y))
18 |
19 | (check-sat)
20 |
21 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-013.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (= x (str.replace_re_longest_all y (str.to.re "010") z)))
6 |
7 | (assert
8 | (str.in.re x
9 | (re.++
10 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
11 | (re.union
12 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
13 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
14 | )
15 | )
16 | )
17 | )
18 | (assert (str.in.re y (str.to.re "010101")))
19 | (assert (str.in.re z (re.* (str.to.re "10"))))
20 |
21 | (check-sat)
22 |
--------------------------------------------------------------------------------
/tests/regex_cg_ref3.smt2:
--------------------------------------------------------------------------------
1 | ; function globUnescape (s) {
2 | ; return s.replace(/\\(.)/g, '$1')
3 | ; }
4 | (set-logic QF_S)
5 |
6 | (declare-const x String)
7 | (declare-const y String)
8 |
9 | (assert (= y (str.replace_cg_all x
10 | (re.++ (re.charrange (char.from-int 92) (char.from-int 92)) ((_ re.capture 1) re.allchar))
11 | (_ re.reference 1))))
12 |
13 | (assert (str.in.re x (re.++
14 | (re.charrange (char.from-int 92) (char.from-int 92))
15 | (re.+ re.allchar))))
16 |
17 | (assert (str.in.re y (re.++
18 | re.all
19 | (re.charrange (char.from-int 92) (char.from-int 92))
20 | re.all)))
21 |
22 | (check-sat)
23 | (get-model)
24 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-001.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (= x (str.replace_re_longest_all y (str.to.re "0") z)))
6 |
7 | (assert
8 | (str.in.re x
9 | (re.++
10 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
11 | (re.union
12 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
13 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
14 | )
15 | )
16 | )
17 | )
18 | (assert (str.in.re y (re.* (str.to.re "01"))))
19 | (assert (str.in.re z (re.* (str.to.re "10"))))
20 |
21 | (check-sat)
22 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-012.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (= x (str.replace_re_longest_all y (str.to.re "010") z)))
6 |
7 | (assert
8 | (str.in.re x
9 | (re.++
10 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
11 | (re.union
12 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
13 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
14 | )
15 | )
16 | )
17 | )
18 | (assert (str.in.re y (re.* (str.to.re "01"))))
19 | (assert (str.in.re z (re.* (str.to.re "10"))))
20 |
21 | (check-sat)
22 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-015.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 |
5 | (assert (= x (str.replace_re_longest_all y (str.to.re "0101") z)))
6 |
7 | (assert
8 | (str.in.re x
9 | (re.++
10 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
11 | (re.union
12 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
13 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
14 | )
15 | )
16 | )
17 | )
18 | (assert (str.in.re y (re.* (str.to.re "01"))))
19 | (assert (str.in.re z (re.* (str.to.re "10"))))
20 |
21 | (check-sat)
22 |
--------------------------------------------------------------------------------
/tests/anchor-8.smt2:
--------------------------------------------------------------------------------
1 | (set-option :produce-models true)
2 | (set-option :inline-size-limit 10000)
3 |
4 | (declare-const var0 String)
5 | (assert (str.in.re
6 | (str.replace_cg_all var0
7 | (re.++
8 | re.begin-anchor
9 | (re.opt
10 | ((_ re.capture 1)
11 | (re.range "a" "a")))
12 | (re.range "a" "a")
13 | re.end-anchor)
14 | (_ re.reference 1))
15 | (re.range "a" "a")))
16 |
17 | (check-sat)
18 | (get-model)
19 |
--------------------------------------------------------------------------------
/tests/regex_cg_ref2.smt2:
--------------------------------------------------------------------------------
1 | ; function globUnescape (s) {
2 | ; return s.replace(/\\(.)/g, '$1')
3 | ; }
4 | (set-logic QF_S)
5 |
6 | (declare-const x String)
7 | (declare-const y String)
8 |
9 | (assert (= y (str.replace_cg_all x
10 | (re.++ (re.charrange (char.from-int 92) (char.from-int 92)) ((_ re.capture 1) re.allchar))
11 | (_ re.reference 1))))
12 |
13 | (assert (str.in.re x (re.++
14 | (re.charrange (char.from-int 92) (char.from-int 92))
15 | (re.+ re.allchar))))
16 |
17 | (assert (str.in.re y (re.complement (re.++
18 | re.all
19 | (re.charrange (char.from-int 92) (char.from-int 92))
20 | re.all))))
21 |
22 | (check-sat)
23 | (get-model)
24 |
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/cyclic-xy.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Cyclic Word equations
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 |
16 | (assert (= (str.++ y x) (str.++ x y)))
17 | (assert (str.in_re x (re.union (str.to_re "a") (str.to_re "b"))))
18 | (assert (str.in_re y (re.union (str.to_re "bab") (str.to_re "aba"))))
19 |
20 | (check-sat)
21 | (exit)
22 |
--------------------------------------------------------------------------------
/tests/chars.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_)
2 |
3 | (declare-fun x () String)
4 | (declare-fun z () String)
5 | (declare-fun a () String)
6 | (declare-fun b () String)
7 | (declare-fun c () String)
8 |
9 | ; (declare-fun ch () Int)
10 |
11 | (assert (= (str.from_code 90) x))
12 | ; (assert (= (str.from_code ch) x))
13 | (assert (= (str.from_code (- 1)) z))
14 | (assert (= (str.from_code (bv2nat #x73)) a))
15 | (assert (= (str.from_code (bv2nat #x73)) b))
16 | (assert (= (str.++ (str.from_code (bv2nat #b01110011)) (str.from_code (bv2nat #b01110100)) (str.from_code (bv2nat #b01110010)) (str.from_code (bv2nat #b01101001)) (str.from_code (bv2nat #b01101110)) (str.from_code (bv2nat #b01100111))) c))
17 |
18 | (check-sat)
19 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-022.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (assert (= x (str.replace_re_longest_all y (re.++ (re.++ (re.* (str.to.re "1")) (re.* (str.to.re "0"))) (str.to.re "10")) z)))
5 |
6 | (assert
7 | (str.in.re x
8 | (re.++
9 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
10 | (re.union
11 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
12 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
13 | )
14 | )
15 | )
16 | )
17 | (assert (str.in.re y (re.* (str.to.re "01"))))
18 | (assert (str.in.re z (re.* (str.to.re "10"))))
19 |
20 | (check-sat)
21 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-023.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (assert (= x (str.replace_re_longest_all y (re.++ (re.++ (re.++ (str.to.re "1") (re.* (str.to.re "0"))) (re.* (str.to.re "0"))) (str.to.re "10")) z)))
5 |
6 | (assert
7 | (str.in.re x
8 | (re.++
9 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
10 | (re.union
11 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
12 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
13 | )
14 | )
15 | )
16 | )
17 | (assert (str.in.re y (re.* (str.to.re "01"))))
18 | (assert (str.in.re z (re.* (str.to.re "10"))))
19 |
20 | (check-sat)
21 |
--------------------------------------------------------------------------------
/tests/temp-prop/noodles-unsat7.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unknown)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ z y x) (str.++ x x z)))
18 | (assert (str.in_re x (re.++(str.to_re "2") re.all)))
19 | (assert (str.in_re y (re.++(str.to_re "1") re.all)))
20 | (assert (str.in_re z (str.to_re "2")))
21 |
22 | (check-sat)
23 | (exit)
24 |
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/noodles-unsat4.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ z y x) (str.++ x x z)))
18 | (assert (str.in_re x (re.+ (str.to_re "1111"))))
19 | (assert (str.in_re y (str.to_re "11")))
20 | (assert (str.in_re z (re.+ (str.to_re "111"))))
21 |
22 | (check-sat)
23 | (exit)
24 |
--------------------------------------------------------------------------------
/tests/empty-union.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun TestC0 () String)
2 | (declare-fun |18 Fill 1| () String)
3 | (declare-fun |18 Fill 0| () String)
4 | (declare-fun |18 Fill 2| () String)
5 | (assert (let ((a!1 (re.union (re.range "a" "z")
6 | (re.range "A" "Z")
7 | (re.range "0" "9")
8 | (str.to.re "_"))))
9 | (let ((a!2
10 | (re.complement a!1))
11 | (a!3 (re.inter (str.to.re "Giggles")
12 | (re.++ a!1 (re.* (re.range "\x00" "\xff")))))
13 | )
14 | (let ((a!6 (re.++ (re.union a!2 (str.to.re "")) )
15 | ))
16 | (str.in.re TestC0
17 | a!6
18 | )))))
19 |
20 | (check-sat)
21 | (get-model)
--------------------------------------------------------------------------------
/tests/membership_427.smt2:
--------------------------------------------------------------------------------
1 | ;---
2 | ; using 7-bit bit-vectors as characters
3 | ; check membership of .Net regex
4 | ; regexA = /([^\x00-\xFF]\s*)/u
5 | ;---
6 | (set-info :status unsat)
7 | (set-option :print-success true)
8 | (set-logic QF_BVS)
9 | (define-sort CHAR () (_ BitVec 7))
10 | (declare-const regexA (RegEx CHAR))
11 | (declare-const x (Seq CHAR))
12 |
13 | (assert (= regexA (re-concat (re-range #b0101111 #b0101111)(re-concat (re-concat (as re-empty-set (RegEx CHAR)) (re-star (re-union (re-range #b0001001 #b0001101) (re-range #b0100000 #b0100000)))) (re-of-seq (seq-cons #b0101111 (seq-cons #b1110101 (as seq-empty (Seq CHAR)))))))))
14 |
15 | ;check that the regex contains some x
16 | (assert (re-member x regexA))
17 | (check-sat)
18 |
--------------------------------------------------------------------------------
/tests/anchor-4.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 |
4 | (assert (= y (str.replace_cg_all
5 | x
6 | (re.+ (re.++
7 | re.begin-anchor
8 | (str.to.re "a")))
9 | (str.to.re "b"))))
10 |
11 | ; a modified version of anchor-3
12 | ; sat
13 | (assert (str.in.re y
14 | (re.++
15 | (str.to.re "b")
16 | re.all)))
17 |
18 | (assert (str.in.re x
19 | (re.++
20 | re.all
21 | (str.to.re "a")
22 | (re.+
23 | (str.to.re "a"))
24 | re.all)))
25 |
26 | (check-sat)
27 | (get-model)
28 |
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/noodles-unsat5.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ z y x) (str.++ x x z)))
18 | (assert (str.in_re x (re.++(str.to_re "2") re.all)))
19 | (assert (str.in_re y (re.++(str.to_re "1") re.all)))
20 | (assert (str.in_re z (re.++(str.to_re "2") re.all)))
21 |
22 | (check-sat)
23 | (exit)
24 |
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/noodles-unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ z y x) (str.++ x x z)))
18 | (assert (str.in_re x (re.* (str.to_re "1"))))
19 | (assert (str.in_re y (re.++ (re.+ (str.to_re "1")) (re.+ (str.to_re "2")) )))
20 | (assert (str.in_re z (re.* (str.to_re "2"))))
21 |
22 | (check-sat)
23 | (exit)
24 |
--------------------------------------------------------------------------------
/tests/temp-prop/03_track_11.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Joel Day, Thorsten Ehlers, Mitja Kulczynski, Federico Mora, Florin Manea, Dirk Nowotka, Danny Poulsen, Zhengyang Lu
5 | Application: Test WOORPJE
6 | Target solver: WOORPJE
7 | Publications: Day, J. D., Ehlers, T., Kulczynski, M., Manea, F., Nowotka, D., & Poulsen, D. B. (2019). On solving word equations using SAT. In RP 2019
8 | Description: Transoformed and expanded from Track02
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "random")
12 | (set-info :status unknown)
13 |
14 | (declare-fun C () String)
15 | (assert (= (str.++ C "a" C) (str.++ "aaaa" "") ))
16 | (check-sat)
17 |
18 | (exit)
19 |
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/noodles-unsat2.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ z y x) (str.++ x z x z)))
18 | (assert (str.in_re x (re.* (str.to_re "1"))))
19 | (assert (str.in_re y (re.++ (re.+ (str.to_re "1")) (re.+ (str.to_re "2")) )))
20 | (assert (str.in_re z (re.* (str.to_re "2"))))
21 |
22 | (check-sat)
23 | (exit)
24 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-018.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (declare-const w String)
5 | (declare-const v String)
6 |
7 | (assert (= x (str.replace_re_longest_all y (str.to.re "010") z)))
8 | (assert (= z (str.replace_re_longest_all w (str.to.re "00") v)))
9 |
10 | (assert
11 | (str.in.re x
12 | (re.++
13 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
14 | (re.union
15 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
16 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
17 | )
18 | )
19 | )
20 | )
21 | (assert (str.in.re y (str.to.re "01011")))
22 | (assert (str.in.re z (re.* (str.to.re "10"))))
23 |
24 | (check-sat)
25 |
--------------------------------------------------------------------------------
/tests/anchor-7.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 |
4 | ; a more tricky example where $ occurs in a star
5 | ; (a$)+ => b
6 | (assert (= y (str.replace_cg_all
7 | x
8 | (re.+ (re.++
9 | (str.to.re "a")
10 | re.end-anchor))
11 | (str.to.re "b"))))
12 |
13 | (assert (str.in.re y
14 | (re.++
15 | re.all
16 | (str.to.re "b"))))
17 |
18 | (assert (str.in.re x
19 | (re.++
20 | re.all
21 | (str.to.re "a")
22 | (re.+
23 | (str.to.re "a"))
24 | re.all)))
25 |
26 | (check-sat)
27 | (get-model)
28 |
--------------------------------------------------------------------------------
/tests/anchor-double.smt2:
--------------------------------------------------------------------------------
1 | (set-option :produce-models true)
2 | (set-option :inline-size-limit 10000)
3 |
4 | (declare-const var0 String)
5 | (assert (str.in.re
6 | (str.replace_cg_all var0
7 | (re.++
8 | re.begin-anchor
9 | re.begin-anchor
10 | (re.opt
11 | ((_ re.capture 1)
12 | (re.range "a" "a")))
13 | (re.range "a" "a")
14 | re.end-anchor
15 | re.end-anchor)
16 | (_ re.reference 1))
17 | (re.range "a" "a")))
18 |
19 | (check-sat)
20 | (get-model)
21 |
--------------------------------------------------------------------------------
/tests/adt.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-datatype Tree ( (leaf) (node (left Tree) (data String) (right Tree)) ))
4 |
5 | (define-fun-rec cat ((t Tree)) String
6 | (ite (is-leaf t) ""
7 | (str.++ (cat (left t)) (data t) (cat (right t)))))
8 |
9 | (define-fun-rec nonEmpty ((t Tree)) Bool
10 | (or (is-leaf t)
11 | (and (is-node t)
12 | (not (= (data t) ""))
13 | (nonEmpty (left t))
14 | (nonEmpty (right t)))))
15 |
16 | (declare-const a String)
17 | (declare-const b String)
18 | (declare-const c String)
19 | (declare-const t Tree)
20 |
21 | (assert (= (str.++ a b c) "Hello World"))
22 |
23 | (assert (= (cat t) "Hello World"))
24 | (assert (nonEmpty t))
25 | ;(assert (> (_size t) 5))
26 | (assert (< (_size t) 10))
27 |
28 | (check-sat)
--------------------------------------------------------------------------------
/tests/adt2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-datatype Tree ( (leaf) (node (left Tree) (data String) (right Tree)) ))
4 |
5 | (define-fun-rec cat ((t Tree)) String
6 | (ite (is-leaf t) ""
7 | (str.++ (cat (left t)) (data t) (cat (right t)))))
8 |
9 | (define-fun-rec nonEmpty ((t Tree)) Bool
10 | (or (is-leaf t)
11 | (and (is-node t)
12 | (not (= (data t) ""))
13 | (nonEmpty (left t))
14 | (nonEmpty (right t)))))
15 |
16 | (declare-const a String)
17 | (declare-const b String)
18 | (declare-const c String)
19 | (declare-const t Tree)
20 |
21 | (assert (= (str.++ a b c) "Hello World"))
22 |
23 | (assert (= (cat t) "Hello World"))
24 | (assert (nonEmpty t))
25 | (assert (> (_size t) 5))
26 | (assert (< (_size t) 10))
27 |
28 | (check-sat)
--------------------------------------------------------------------------------
/tests/temp-prop/noodles-unsat6.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unknown)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ z y x) (str.++ x x z)))
18 | (assert (str.in_re x (re.++(str.to_re "2") (re.union (str.to_re "1")(str.to_re "2")))))
19 | (assert (str.in_re y (re.++(str.to_re "1") re.all)))
20 | (assert (str.in_re z (re.++(str.to_re "2") re.all)))
21 |
22 | (check-sat)
23 | (exit)
24 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-020.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (declare-const w String)
5 | (declare-const v String)
6 |
7 | (assert (= x (str.replace_re_longest_all y (str.to.re "0101") z)))
8 | (assert (= z (str.replace_re_longest_all v (str.to.re "1111") w)))
9 |
10 | (assert
11 | (str.in.re x
12 | (re.++
13 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
14 | (re.union
15 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
16 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
17 | )
18 | )
19 | )
20 | )
21 | (assert (str.in.re y (re.* (str.to.re "01"))))
22 | (assert (str.in.re z (re.* (str.to.re "10"))))
23 |
24 | (check-sat)
25 |
--------------------------------------------------------------------------------
/tests/temp-prop/noodles-unsat10.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unknown)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ "2" y x) (str.++ x x "2")))
18 | (assert (str.in_re x (re.++(str.to_re "2") (re.union (re.* (str.to_re "1"))(re.* (str.to_re "2"))))))
19 | (assert (str.in_re y (re.++(str.to_re "2")(re.union (re.* (str.to_re "1"))(re.* (str.to_re "2"))))))
20 |
21 | (check-sat)
22 | (exit)
23 |
--------------------------------------------------------------------------------
/tests/anchor-3.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 |
4 | ; a more tricky example where ^ occurs in a star
5 | ; (^a)+ => b
6 | (assert (= y (str.replace_cg_all
7 | x
8 | (re.+ (re.++
9 | re.begin-anchor
10 | (str.to.re "a")))
11 | (str.to.re "b"))))
12 |
13 | (assert (= y "bc"))
14 |
15 | ; suppose x has at least two consecutive 'a's
16 | ; but because of ^, the star can only match once
17 | ; making this unsat.
18 | (assert (str.in.re x
19 | (re.++
20 | re.all
21 | (str.to.re "a")
22 | (re.+
23 | (str.to.re "a"))
24 | re.all)))
25 |
26 | (check-sat)
27 | (get-model)
28 |
--------------------------------------------------------------------------------
/tests/anchor-6.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 |
4 | ; a more tricky example where $ occurs in a star
5 | ; (a$)+ => b
6 | (assert (= y (str.replace_cg_all
7 | x
8 | (re.+ (re.++
9 | (str.to.re "a")
10 | re.end-anchor))
11 | (str.to.re "b"))))
12 |
13 | (assert (= y "cb"))
14 |
15 | ; suppose x has at least two consecutive 'a's
16 | ; but because of $, the star can only match once
17 | ; making this unsat.
18 | (assert (str.in.re x
19 | (re.++
20 | re.all
21 | (str.to.re "a")
22 | (re.+
23 | (str.to.re "a"))
24 | re.all)))
25 |
26 | (check-sat)
27 | (get-model)
28 |
--------------------------------------------------------------------------------
/tests/parse-ecma-cases-2.smt2:
--------------------------------------------------------------------------------
1 | ; Examples that need the full 2AFA regex pipeline
2 |
3 | (set-logic QF_S)
4 |
5 | (declare-const w String)
6 |
7 | (assert (not (and
8 |
9 | (= (str.in_re w (re.from_ecma2020 '((?=a*x)a)*x'))
10 | (str.in_re w (re.from_ecma2020 'a*x')))
11 |
12 | (= (str.in_re w (re.from_ecma2020 '/(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/'))
13 | (str.in_re w
14 | (re.inter (re.from_ecma2020 '/.{6,}/')
15 | (re.from_ecma2020 '.*\d.*')
16 | (re.from_ecma2020 '.*[a-z].*')
17 | (re.from_ecma2020 '.*[A-Z].*'))))
18 |
19 | (= (str.in_re w (re.from_ecma2020 '.(?=a|b)[b-z]'))
20 | (str.in_re w (re.from_ecma2020 '.b')))
21 |
22 | )))
23 |
24 | (check-sat)
25 |
--------------------------------------------------------------------------------
/tests/failedProp.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_SLIA)
3 | (set-info :source |
4 | Generated by: Andres Noetzli, Andrew Reynolds, Haniel Barbosa, Aina Niemetz, Mathias Preiner, Clark Barrett, Cesare Tinelli
5 | Generated on: 2018-11-08
6 | Generator: CVC4
7 | Application: Rewrite rule verification
8 | Publications: "Syntax-Guided Rewrite Rule Enumeration for SMT Solvers" by A. Noetzli, A. Reynolds, H. Barbosa, A. Niemetz, M. Preiner, C. Barrett, and C. Tinelli, SAT 2019.
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "industrial")
12 | (set-info :status unknown)
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () Int)
16 | (assert (not (= (str.prefixof x (str.at x 1)) (= x ""))))
17 | (check-sat)
18 | (exit)
19 |
--------------------------------------------------------------------------------
/tests/replace-special.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_SLIA)
3 | (set-info :source |
4 | Generated by: Andres Noetzli, Andrew Reynolds, Haniel Barbosa, Aina Niemetz, Mathias Preiner, Clark Barrett, Cesare Tinelli
5 | Generated on: 2018-11-08
6 | Generator: CVC4
7 | Application: Rewrite rule verification
8 | Publications: "Syntax-Guided Rewrite Rule Enumeration for SMT Solvers" by A. Noetzli, A. Reynolds, H. Barbosa, A. Niemetz, M. Preiner, C. Barrett, and C. Tinelli, SAT 2019.
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "industrial")
12 | (set-info :status unknown)
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () Int)
16 | (assert (not (= (= "B" (str.replace "" x "A")) false)))
17 | (check-sat)
18 | (exit)
19 |
--------------------------------------------------------------------------------
/tests/transducer2b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (set-option :parse-transducers true)
6 |
7 | (define-fun-rec toUpper ((x String) (y String)) Bool
8 | (or (and (= x "") (= y ""))
9 | (and (not (= x "")) (not (= y ""))
10 | (= (char.code (str.head y))
11 | (ite (and (<= 97 (char.code (str.head x))) ; 'a'
12 | (<= (char.code (str.head x)) 122)) ; 'z'
13 | (- (char.code (str.head x)) 32) ; 'a' -> 'A', etc.
14 | (char.code (str.head x))))
15 | (toUpper (str.tail x) (str.tail y))))
16 | )
17 |
18 | (declare-fun x () String)
19 | (declare-fun y () String)
20 |
21 | (assert (= x "Hello World"))
22 | (assert (toUpper x y))
23 | (assert (= y "HELLO WORLT"))
24 |
25 | (check-sat)
26 |
--------------------------------------------------------------------------------
/tests/transducer2c.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (set-option :parse-transducers true)
6 |
7 | (define-fun-rec toUpper ((x String) (y String)) Bool
8 | (or (and (= x "") (= y ""))
9 | (and (not (= x "")) (not (= y ""))
10 | (= (char.code (str.head y))
11 | (ite (and (<= 97 (char.code (str.head x))) ; 'a'
12 | (<= (char.code (str.head x)) 122)) ; 'z'
13 | (- (char.code (str.head x)) 32) ; 'a' -> 'A', etc.
14 | (char.code (str.head x))))
15 | (toUpper (str.tail x) (str.tail y))))
16 | )
17 |
18 | (declare-fun x () String)
19 | (declare-fun y () String)
20 |
21 | (assert (= x "Hello World"))
22 | (assert (toUpper x y))
23 | (assert (= y "HELLO WORL"))
24 |
25 | (check-sat)
26 |
--------------------------------------------------------------------------------
/tests/transducer2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (set-option :parse-transducers true)
6 |
7 | (define-fun-rec toUpper ((x String) (y String)) Bool
8 | (or (and (= x "") (= y ""))
9 | (and (not (= x "")) (not (= y ""))
10 | (= (char.code (str.head y))
11 | (ite (and (<= 97 (char.code (str.head x))) ; 'a'
12 | (<= (char.code (str.head x)) 122)) ; 'z'
13 | (- (char.code (str.head x)) 32) ; 'a' -> 'A', etc.
14 | (char.code (str.head x))))
15 | (toUpper (str.tail x) (str.tail y))))
16 | )
17 |
18 | (declare-fun x () String)
19 | (declare-fun y () String)
20 |
21 | (assert (= x "Hello World"))
22 | (assert (toUpper x y))
23 | (assert (not (= y "HELLO WORLD")))
24 |
25 | (check-sat)
26 |
--------------------------------------------------------------------------------
/tests/transducer2d.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (set-option :parse-transducers true)
6 |
7 | (define-fun-rec toUpper ((x String) (y String)) Bool
8 | (or (and (= x "") (= y ""))
9 | (and (not (= x "")) (not (= y ""))
10 | (= (char.code (str.head y))
11 | (ite (and (<= 97 (char.code (str.head x))) ; 'a'
12 | (<= (char.code (str.head x)) 122)) ; 'z'
13 | (- (char.code (str.head x)) 32) ; 'a' -> 'A', etc.
14 | (char.code (str.head x))))
15 | (toUpper (str.tail x) (str.tail y))))
16 | )
17 |
18 | (declare-fun x () String)
19 | (declare-fun y () String)
20 |
21 | (assert (= x "Hello World"))
22 | (assert (toUpper x y))
23 | ; (assert (= y "HELLO WORLD"))
24 |
25 | (check-sat)
26 |
--------------------------------------------------------------------------------
/tests/replace-special-2.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_SLIA)
3 | (set-info :source |
4 | Generated by: Andres Noetzli, Andrew Reynolds, Haniel Barbosa, Aina Niemetz, Mathias Preiner, Clark Barrett, Cesare Tinelli
5 | Generated on: 2018-11-08
6 | Generator: CVC4
7 | Application: Rewrite rule verification
8 | Publications: "Syntax-Guided Rewrite Rule Enumeration for SMT Solvers" by A. Noetzli, A. Reynolds, H. Barbosa, A. Niemetz, M. Preiner, C. Barrett, and C. Tinelli, SAT 2019.
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "industrial")
12 | (set-info :status unknown)
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () Int)
16 | (assert (not (= (str.prefixof (str.replace "" x x) y) true)))
17 | (check-sat)
18 | (exit)
19 |
--------------------------------------------------------------------------------
/tests/str-term-small-rw_186.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_SLIA)
3 | (set-info :source |
4 | Generated by: Andres Noetzli, Andrew Reynolds, Haniel Barbosa, Aina Niemetz, Mathias Preiner, Clark Barrett, Cesare Tinelli
5 | Generated on: 2018-11-08
6 | Generator: CVC4
7 | Application: Rewrite rule verification
8 | Publications: "Syntax-Guided Rewrite Rule Enumeration for SMT Solvers" by A. Noetzli, A. Reynolds, H. Barbosa, A. Niemetz, M. Preiner, C. Barrett, and C. Tinelli, SAT 2019.
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "industrial")
12 | (set-info :status unknown)
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () Int)
16 | (assert (not (= (str.substr x 1 (str.indexof x x z)) "")))
17 | (check-sat)
18 | (exit)
19 |
--------------------------------------------------------------------------------
/src/test/scala/ostrich/preop/ConcatPreOpSpecification.scala:
--------------------------------------------------------------------------------
1 | package ostrich.preop
2 |
3 | import ostrich.automata.{BricsAutomaton, Automaton}
4 |
5 | import org.scalacheck.{Arbitrary, Gen, Properties}
6 | import org.scalacheck.Prop._
7 |
8 | import dk.brics.automaton.{Automaton => BAutomaton, State, Transition}
9 |
10 | object ConcatPreOpSpecification
11 | extends Properties("ConcatPreOp"){
12 |
13 | def seq(s : String) = s.map(_.toInt)
14 |
15 | property("Simple Post") = {
16 | val baut1 = BricsAutomaton.fromString("d")
17 | val baut2 = BricsAutomaton.fromString("e")
18 |
19 | val concat = ConcatPreOp.forwardApprox(Seq(Seq(baut1.asInstanceOf[Automaton]),
20 | Seq(baut2.asInstanceOf[Automaton])))
21 |
22 | concat(seq("de")) && !concat(seq("d"))
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/anchor-alternate.smt2:
--------------------------------------------------------------------------------
1 | (set-option :produce-models true)
2 | (set-option :inline-size-limit 10000)
3 |
4 | (declare-const var0 String)
5 | (assert (str.in.re
6 | (str.replace_cg_all var0
7 | (re.++
8 | re.begin-anchor
9 | re.begin-anchor
10 | (re.opt
11 | ((_ re.capture 1)
12 | (re.range "a" "a")))
13 | (re.range "a" "a")
14 | re.end-anchor
15 | re.begin-anchor
16 | re.end-anchor)
17 | (_ re.reference 1))
18 | (re.* (re.range "a" "a"))))
19 |
20 | (check-sat)
21 | (get-model)
22 |
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/artur-unsat-we.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Instance of Lyndon-Schuetzenberger theorem
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 | (declare-fun X () String)
13 | (declare-fun A () String)
14 | (declare-fun B () String)
15 | (declare-fun C () String)
16 | (declare-fun D () String)
17 | (declare-fun E () String)
18 |
19 | (assert (= X (str.++ A B C)))
20 | (assert (= C (str.++ "b" D)))
21 | (assert (= B (str.++ "a" E)))
22 | (assert (= (str.++ X X) (str.++ A A B B C C)))
23 | (assert (= (str.++ X X X) (str.++ A A A B B B C C C)))
24 |
25 | (check-sat)
26 | (exit)
27 |
--------------------------------------------------------------------------------
/tests/temp-prop/noodles-unsat8.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unknown)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ z y x) (str.++ x x z)))
18 | (assert (str.in_re x (re.++(str.to_re "2") (re.union (re.* (str.to_re "1"))(re.* (str.to_re "2"))))))
19 | (assert (str.in_re y (re.++(str.to_re "1") (re.union (re.* (str.to_re "1"))(re.* (str.to_re "2"))))))
20 | (assert (str.in_re z (re.++(str.to_re "2") re.all)))
21 |
22 | (check-sat)
23 | (exit)
24 |
--------------------------------------------------------------------------------
/tests/replace-special-3.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_SLIA)
3 | (set-info :source |
4 | Generated by: Andres Noetzli, Andrew Reynolds, Haniel Barbosa, Aina Niemetz, Mathias Preiner, Clark Barrett, Cesare Tinelli
5 | Generated on: 2018-11-08
6 | Generator: CVC4
7 | Application: Rewrite rule verification
8 | Publications: "Syntax-Guided Rewrite Rule Enumeration for SMT Solvers" by A. Noetzli, A. Reynolds, H. Barbosa, A. Niemetz, M. Preiner, C. Barrett, and C. Tinelli, SAT 2019.
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "industrial")
12 | (set-info :status unknown)
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () Int)
16 | (assert (not (= (str.contains (str.replace "B" "" x) y) (str.contains (str.++ x "B") y))))
17 | (check-sat)
18 | (exit)
19 |
--------------------------------------------------------------------------------
/tests/replace-special-4.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_SLIA)
3 | (set-info :source |
4 | Generated by: Andres Noetzli, Andrew Reynolds, Haniel Barbosa, Aina Niemetz, Mathias Preiner, Clark Barrett, Cesare Tinelli
5 | Generated on: 2018-11-08
6 | Generator: CVC4
7 | Application: Rewrite rule verification
8 | Publications: "Syntax-Guided Rewrite Rule Enumeration for SMT Solvers" by A. Noetzli, A. Reynolds, H. Barbosa, A. Niemetz, M. Preiner, C. Barrett, and C. Tinelli, SAT 2019.
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "industrial")
12 | (set-info :status unknown)
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () Int)
16 | (assert (not (= (str.replace "" (str.++ x y) "A") (str.replace "" x (str.replace x y "A")))))
17 | (check-sat)
18 | (exit)
19 |
--------------------------------------------------------------------------------
/tests/replace-special-5.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_SLIA)
3 | (set-info :source |
4 | Generated by: Andres Noetzli, Andrew Reynolds, Haniel Barbosa, Aina Niemetz, Mathias Preiner, Clark Barrett, Cesare Tinelli
5 | Generated on: 2018-11-08
6 | Generator: CVC4
7 | Application: Rewrite rule verification
8 | Publications: "Syntax-Guided Rewrite Rule Enumeration for SMT Solvers" by A. Noetzli, A. Reynolds, H. Barbosa, A. Niemetz, M. Preiner, C. Barrett, and C. Tinelli, SAT 2019.
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "industrial")
12 | (set-info :status unknown)
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () Int)
16 | (assert (not (= (str.replace "" (str.replace "" x "A") "B") (str.substr "B" 0 (str.len x)))))
17 | (check-sat)
18 | (exit)
19 |
--------------------------------------------------------------------------------
/tests/str-term-small-rw_164.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_SLIA)
3 | (set-info :source |
4 | Generated by: Andres Noetzli, Andrew Reynolds, Haniel Barbosa, Aina Niemetz, Mathias Preiner, Clark Barrett, Cesare Tinelli
5 | Generated on: 2018-11-08
6 | Generator: CVC4
7 | Application: Rewrite rule verification
8 | Publications: "Syntax-Guided Rewrite Rule Enumeration for SMT Solvers" by A. Noetzli, A. Reynolds, H. Barbosa, A. Niemetz, M. Preiner, C. Barrett, and C. Tinelli, SAT 2019.
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "industrial")
12 | (set-info :status unknown)
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () Int)
16 | (assert (not (= (str.substr x 0 (str.indexof "A" y 1)) (str.at x (str.indexof "" y 0)))))
17 | (check-sat)
18 | (exit)
19 |
--------------------------------------------------------------------------------
/tests/cvc_replace_28.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 | (set-option :strings-exp true)
3 | (set-option :produce-models true)
4 | (declare-fun sigmaStar_0 () String)
5 | (declare-fun sigmaStar_6 () String)
6 | (declare-fun literal_9 () String)
7 | (declare-fun x_7 () String)
8 | (declare-fun x_10 () String)
9 | (declare-fun literal_11 () String)
10 | (declare-fun A () String)
11 | (assert (= x_7 (str.replace sigmaStar_0 "\x2f\x5b\x5e\x41\x53\x43\x52\x20\x2e\x5c\x2d\x40\x3a\x2f\x5d\x2f" "\x48\x45\x4c\x4c\x4f")))
12 | (assert (= literal_9 "\x3c\x74\x64\x3e\x55\x52\x4c\x3a\x20"))
13 | (assert (= x_10 (str.++ literal_9 x_7)))
14 | (assert (= literal_11 "\x3c\x2f\x74\x64\x3e"))
15 | (assert (= A (str.++ x_10 literal_11)))
16 | (assert (str.in.re A (re.++ (re.* re.allchar) (re.++ (str.to.re "\x5c\x3c\x53\x43\x52\x49\x50\x54") (re.* re.allchar)))))
17 |
18 | (check-sat)
19 | (get-model)
20 |
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/noodles-unsat3.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ "1111" z "1" y x "21111") (str.++ "11" x x "111" z)))
18 | (assert (str.in_re x (re.++ (re.+ (str.to_re "1")) (re.+ (str.to_re "2")) )))
19 | (assert (str.in_re y (re.++ (re.+ (str.to_re "1")) (re.* (str.to_re "2")) )))
20 | (assert (str.in_re z (re.++ (re.+ (str.to_re "2")) (re.* (str.to_re "1")) )))
21 |
22 | (check-sat)
23 | (exit)
24 |
--------------------------------------------------------------------------------
/tests/simple-concat.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (define-fun-rec toUpper ((x String) (y String)) Bool
6 | (or (and (= x "") (= y ""))
7 | (and (= (seq-head y)
8 | (ite (and (bvule (_ bv97 8) (seq-head x)) ; 'a'
9 | (bvule (seq-head x) (_ bv122 8))) ; 'z'
10 | (bvsub (seq-head x) (_ bv32 8)) ; 'a' -> 'A', etc.
11 | (seq-head x)))
12 | (toUpper (seq-tail x) (seq-tail y))))
13 | )
14 |
15 | (declare-fun x0 () String)
16 | (declare-fun x1 () String)
17 | (declare-fun x2 () String)
18 | (declare-fun x3 () String)
19 | (declare-fun x4 () String)
20 | (declare-fun s0 () String) ; source variable
21 |
22 | (assert (= x2 (str.++ x0 x1)))
23 | (assert (toUpper x2 x3))
24 | (assert (str.in.re x3 (re.+ (re.range "A" "Z"))))
25 |
26 | (check-sat)
27 |
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/artur-unsat-common-prefix.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Instance of Lyndon-Schuetzenberger theorem
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 | (declare-fun X () String)
13 | (declare-fun A () String)
14 | (declare-fun B () String)
15 | (declare-fun C () String)
16 | (declare-fun D () String)
17 | (declare-fun E () String)
18 |
19 | (assert (= X (str.++ A B C)))
20 | (assert (= (str.++ X X) (str.++ A A B B C C)))
21 | (assert (= (str.++ X X X) (str.++ A A A B B B C C C)))
22 | (assert (str.in_re B (re.+ (str.to_re "b"))))
23 | (assert (str.in_re A (re.+ (str.to_re "a"))))
24 | (check-sat)
25 | (exit)
--------------------------------------------------------------------------------
/tests/propagation-benchmarks/artur-unsat.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Instance of Lyndon-Schuetzenberger theorem
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unsat)
12 | (declare-fun X () String)
13 | (declare-fun A () String)
14 | (declare-fun B () String)
15 | (declare-fun C () String)
16 | (declare-fun D () String)
17 | (declare-fun E () String)
18 |
19 | (assert (= X (str.++ A B C)))
20 | (assert (= (str.++ X X) (str.++ A A B B C C)))
21 | (assert (= (str.++ X X X) (str.++ A A A B B B C C C)))
22 | (assert (str.in_re C (re.++(str.to_re "b") re.all)))
23 | (assert (str.in_re B (re.++(str.to_re "a") re.all)))
24 | (check-sat)
25 | (exit)
26 |
--------------------------------------------------------------------------------
/tests/simple-concat-2.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (define-fun-rec toUpper ((x String) (y String)) Bool
6 | (or (and (= x "") (= y ""))
7 | (and (= (seq-head y)
8 | (ite (and (bvule (_ bv97 8) (seq-head x)) ; 'a'
9 | (bvule (seq-head x) (_ bv122 8))) ; 'z'
10 | (bvsub (seq-head x) (_ bv32 8)) ; 'a' -> 'A', etc.
11 | (seq-head x)))
12 | (toUpper (seq-tail x) (seq-tail y))))
13 | )
14 |
15 | (declare-fun x0 () String)
16 | (declare-fun x1 () String)
17 | (declare-fun x2 () String)
18 | (declare-fun x3 () String)
19 | (declare-fun x4 () String)
20 | (declare-fun s0 () String) ; source variable
21 |
22 | ; should be unsat
23 | (assert (= x2 (str.++ x0 x1)))
24 | (assert (toUpper x2 x3))
25 | (assert (str.in.re x3 (re.+ (re.range "a" "z"))))
26 |
27 | (check-sat)
28 |
--------------------------------------------------------------------------------
/tests/simple-concat-4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (define-fun-rec toUpper ((x String) (y String)) Bool
6 | (or (and (= x "") (= y ""))
7 | (and (= (seq-head y)
8 | (ite (and (bvule (_ bv97 8) (seq-head x)) ; 'a'
9 | (bvule (seq-head x) (_ bv122 8))) ; 'z'
10 | (bvsub (seq-head x) (_ bv32 8)) ; 'a' -> 'A', etc.
11 | (seq-head x)))
12 | (toUpper (seq-tail x) (seq-tail y))))
13 | )
14 |
15 | (declare-fun x0 () String)
16 | (declare-fun x1 () String)
17 | (declare-fun x2 () String)
18 | (declare-fun x3 () String)
19 | (declare-fun x4 () String)
20 | (declare-fun s0 () String) ; source variable
21 |
22 | (assert (str.in.re x1 (re.+ (re.range "a" "b"))))
23 | (assert (= x3 (str.++ x1 x2)))
24 | (assert (str.in.re x3 (re.+ (re.range "a" "d"))))
25 |
26 | (check-sat)
27 |
--------------------------------------------------------------------------------
/tests/temp-prop/noodles-unsat9.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Oliver Markgraf
5 | Generated on: 2024-03-18
6 | Application: Word equations + Regular Constraints
7 | Target solver: OSTRICH
8 | |)
9 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
10 | (set-info :category "industrial")
11 | (set-info :status unknown)
12 |
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun z () String)
16 |
17 | (assert (= (str.++ z y x) (str.++ x x z)))
18 | (assert (str.in_re x (re.++(str.to_re "2") (re.* (re.union (str.to_re "1")(re.* (str.to_re "2")))))))
19 | (assert (str.in_re y (re.++(str.to_re "1") (re.* (re.union (str.to_re "1")(re.* (str.to_re "2")))))))
20 | (assert (str.in_re z (re.++(str.to_re "2") (re.* (re.union (str.to_re "1")(re.* (str.to_re "2")))))))
21 |
22 | (check-sat)
23 | (exit)
24 |
--------------------------------------------------------------------------------
/tests/simple-concat-4b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (define-fun-rec toUpper ((x String) (y String)) Bool
6 | (or (and (= x "") (= y ""))
7 | (and (= (seq-head y)
8 | (ite (and (bvule (_ bv97 8) (seq-head x)) ; 'a'
9 | (bvule (seq-head x) (_ bv122 8))) ; 'z'
10 | (bvsub (seq-head x) (_ bv32 8)) ; 'a' -> 'A', etc.
11 | (seq-head x)))
12 | (toUpper (seq-tail x) (seq-tail y))))
13 | )
14 |
15 | (declare-fun x0 () String)
16 | (declare-fun x1 () String)
17 | (declare-fun x2 () String)
18 | (declare-fun x3 () String)
19 | (declare-fun x4 () String)
20 | (declare-fun s0 () String) ; source variable
21 |
22 | (assert (str.in.re x1 (re.+ (re.range "a" "b"))))
23 | (assert (= x3 (str.++ x1 x2)))
24 | (assert (str.in.re x3 (re.+ (re.range "c" "d"))))
25 |
26 | (check-sat)
27 |
--------------------------------------------------------------------------------
/tests/simple-concat-5.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (define-fun-rec toUpper ((x String) (y String)) Bool
6 | (or (and (= x "") (= y ""))
7 | (and (= (seq-head y)
8 | (ite (and (bvule (_ bv97 8) (seq-head x)) ; 'a'
9 | (bvule (seq-head x) (_ bv122 8))) ; 'z'
10 | (bvsub (seq-head x) (_ bv32 8)) ; 'a' -> 'A', etc.
11 | (seq-head x)))
12 | (toUpper (seq-tail x) (seq-tail y))))
13 | )
14 |
15 | (declare-fun x0 () String)
16 | (declare-fun x1 () String)
17 | (declare-fun x2 () String)
18 | (declare-fun x3 () String)
19 | (declare-fun x4 () String)
20 | (declare-fun s0 () String) ; source variable
21 |
22 | ; should be unsat
23 | (assert (= x2 (str.++ x0 "Hello World")))
24 | (assert (toUpper x2 x3))
25 | (assert (str.in.re x3 (re.+ (re.range "A" "Z"))))
26 |
27 | (check-sat)
28 |
--------------------------------------------------------------------------------
/tests/simple-concat-5b.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (define-fun-rec toUpper ((x String) (y String)) Bool
6 | (or (and (= x "") (= y ""))
7 | (and (= (seq-head y)
8 | (ite (and (bvule (_ bv97 8) (seq-head x)) ; 'a'
9 | (bvule (seq-head x) (_ bv122 8))) ; 'z'
10 | (bvsub (seq-head x) (_ bv32 8)) ; 'a' -> 'A', etc.
11 | (seq-head x)))
12 | (toUpper (seq-tail x) (seq-tail y))))
13 | )
14 |
15 | (declare-fun x0 () String)
16 | (declare-fun x1 () String)
17 | (declare-fun x2 () String)
18 | (declare-fun x3 () String)
19 | (declare-fun x4 () String)
20 | (declare-fun s0 () String) ; source variable
21 |
22 | ; should be sat
23 | (assert (= x2 (str.++ x0 "HelloWorld")))
24 | (assert (toUpper x2 x3))
25 | (assert (str.in.re x3 (re.+ (re.range "A" "Z"))))
26 |
27 | (check-sat)
28 |
--------------------------------------------------------------------------------
/tests/simple-concat-3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | ; to-uppercase transducer
4 |
5 | (define-fun-rec toUpper ((x String) (y String)) Bool
6 | (or (and (= x "") (= y ""))
7 | (and (= (seq-head y)
8 | (ite (and (bvule (_ bv97 8) (seq-head x)) ; 'a'
9 | (bvule (seq-head x) (_ bv122 8))) ; 'z'
10 | (bvsub (seq-head x) (_ bv32 8)) ; 'a' -> 'A', etc.
11 | (seq-head x)))
12 | (toUpper (seq-tail x) (seq-tail y))))
13 | )
14 |
15 | (declare-fun x0 () String)
16 | (declare-fun x1 () String)
17 | (declare-fun x2 () String)
18 | (declare-fun x3 () String)
19 | (declare-fun x4 () String)
20 | (declare-fun s0 () String) ; source variable
21 |
22 | (assert (str.in.re x0 (re.+ (re.range "a" "z"))))
23 | (assert (toUpper x0 x1))
24 | (assert (= x3 (str.++ x1 x2)))
25 | (assert (str.in.re x3 (re.+ (re.range "a" "z"))))
26 |
27 | (check-sat)
28 |
--------------------------------------------------------------------------------
/tests/test-replace3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x0 () String)
4 |
5 | (declare-fun y1 () String)
6 | (declare-fun z1 () String)
7 | (declare-fun x1 () String)
8 |
9 | (declare-fun y2 () String)
10 | (declare-fun z2 () String)
11 | (declare-fun x2 () String)
12 |
13 | (declare-fun y3 () String)
14 | (declare-fun z3 () String)
15 | (declare-fun x3 () String)
16 |
17 | (assert (str.in.re x0 (str.to.re "abc")))
18 | (assert (= y1 (str.replaceall x0 "c" "0")))
19 | (assert (= z1 (str.replaceall x0 "c" "1")))
20 | (assert (= x1 (str.++ y1 z1)))
21 |
22 | (assert (= y2 (str.replaceall x1 "b" "0")))
23 | (assert (= z2 (str.replaceall x1 "b" "1")))
24 | (assert (= x2 (str.++ y2 z2)))
25 |
26 | (assert (= y3 (str.replaceall x2 "a" "0")))
27 | (assert (= z3 (str.replaceall x2 "a" "1")))
28 | (assert (= x3 (str.++ y3 z3)))
29 |
30 | (assert (str.in.re x3 (str.to.re "000001010011100101110111")))
31 |
32 | (check-sat)
33 |
--------------------------------------------------------------------------------
/tests/test-replace4.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun x0 () String)
4 |
5 | (declare-fun y1 () String)
6 | (declare-fun z1 () String)
7 | (declare-fun x1 () String)
8 |
9 | (declare-fun y2 () String)
10 | (declare-fun z2 () String)
11 | (declare-fun x2 () String)
12 |
13 | (declare-fun y3 () String)
14 | (declare-fun z3 () String)
15 | (declare-fun x3 () String)
16 |
17 | (assert (str.in.re x0 (str.to.re "abc")))
18 | (assert (= y1 (str.replaceall x0 "c" "0")))
19 | (assert (= z1 (str.replaceall x0 "c" "1")))
20 | (assert (= x1 (str.++ y1 z1)))
21 |
22 | (assert (= y2 (str.replaceall x1 "b" "0")))
23 | (assert (= z2 (str.replaceall x1 "b" "1")))
24 | (assert (= x2 (str.++ y2 z2)))
25 |
26 | (assert (= y3 (str.replaceall x2 "a" "0")))
27 | (assert (= z3 (str.replaceall x2 "a" "1")))
28 | (assert (= x3 (str.++ y3 z3)))
29 |
30 | (assert (str.in.re x3 (str.to.re "000001010011100101110110")))
31 |
32 | (check-sat)
33 |
--------------------------------------------------------------------------------
/tests/temp-prop/03_track_10.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Joel Day, Thorsten Ehlers, Mitja Kulczynski, Federico Mora, Florin Manea, Dirk Nowotka, Danny Poulsen, Zhengyang Lu
5 | Application: Test WOORPJE
6 | Target solver: WOORPJE
7 | Publications: Day, J. D., Ehlers, T., Kulczynski, M., Manea, F., Nowotka, D., & Poulsen, D. B. (2019). On solving word equations using SAT. In RP 2019
8 | Description: Transoformed and expanded from Track02
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "random")
12 | (set-info :status unknown)
13 |
14 | (declare-fun I () String)
15 | (declare-fun K () String)
16 | (declare-fun F () String)
17 | (declare-fun E () String)
18 | (declare-fun M () String)
19 | (assert (= (str.++ "a" F F F "aa" F F F "b" K "aba") (str.++ "a" E E K I K I "b" M M "baa") ))
20 | (check-sat)
21 |
22 | (exit)
23 |
--------------------------------------------------------------------------------
/tests/cg-star.smt2:
--------------------------------------------------------------------------------
1 | (declare-const var0 String)
2 | (declare-const re0 RegLan)
3 | (declare-const cap String)
4 |
5 | (assert (= re0 ((_ re.capture 1)
6 | (re.++
7 | (str.to.re "<")
8 | (re.*?
9 | ((_ re.capture 2)
10 | (re.union
11 | (re.range "\x01" "\xff")
12 | (str.to.re "\u{0a}"))))
13 | (str.to.re ">")))))
14 | (assert (= cap ((_ str.extract 2) var0
15 | (re.++
16 | (re.*? re.allchar) re0 re.all))))
17 |
18 | (assert (str.in.re var0 (re.* (re.range "\x01" "\xff"))))
19 | (assert (str.in.re var0 (re.++ (re.*? re.allchar) re0 re.all)))
20 | ; match!==null
21 | (assert (not (str.in.re cap (str.to.re "\x00"))))
22 | ;match[1]!==null
23 | (assert (str.in.re cap (re.++ re.all (re.+ (re.range "a" "z")) re.all)))
24 | ;/[a-z]+/.test(match[1]) == true
25 | (check-sat)
26 |
--------------------------------------------------------------------------------
/tests/regex_cg_ref.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-const in String)
4 | (declare-const intermediate-1 String)
5 | (declare-const intermediate-2 String)
6 | (declare-const intermediate-3 String)
7 | (declare-const intermediate-4 String)
8 |
9 | (assert (= intermediate-1 (str.replaceall in "Attribution" "BY")))
10 |
11 | (assert (= intermediate-2 (str.replaceall intermediate-1 "NonCommercial" "NC")))
12 |
13 | (assert (= intermediate-3 (str.replaceall intermediate-2 "NoDerivatives" "ND")))
14 |
15 | (assert (= intermediate-4 (str.replace_cg_all intermediate-3
16 | (re.++ (re.range " " " ") ((_ re.capture 2) (re.range "0" "9")))
17 | ;((_ re.capture 1) (re.range "0" "9"))
18 | (re.++ (str.to.re "-") (_ re.reference 2)))))
19 |
20 | (assert (str.in.re in (re.from.str "CC((-(Attribution|NonCommercial|NoDerivatives))| \d)+")))
21 | (assert (str.in.re intermediate-4 (re.complement (re.from.str ".*\s\d.*"))))
22 |
23 | (check-sat)
24 |
--------------------------------------------------------------------------------
/tests/temp-prop/word-equation-6-regex.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 |
3 | (declare-fun H () String)
4 | (declare-fun G () String)
5 | (declare-fun E () String)
6 | (declare-fun J () String)
7 | (declare-fun D1 () String)
8 | (declare-fun D2 () String)
9 | (declare-fun D3 () String)
10 | (declare-fun D4 () String)
11 | (declare-fun D5 () String)
12 | (declare-fun D6 () String)
13 | (declare-fun D7 () String)
14 |
15 | (assert (= (str.++ D1 H D2 E H D3 H D4 J H D5)
16 | (str.++ D6 G D7) ))
17 | (assert (str.in.re D1 (str.to.re "de")))
18 | (assert (str.in.re D2 (str.to.re "fahgf")))
19 | (assert (str.in.re D3 (str.to.re "bg")))
20 | (assert (str.in.re D4 (str.to.re "dfche")))
21 | (assert (str.in.re D5 (str.to.re "dg")))
22 | (assert (str.in.re D6 (str.to.re "deifah")))
23 | (assert (str.in.re D7 (str.to.re "idg")))
24 | (assert (str.in.re H re.all))
25 | (assert (str.in.re J re.all))
26 | (assert (str.in.re G re.all))
27 | (check-sat)
28 | (get-model)
--------------------------------------------------------------------------------
/tests/temp-prop/03_track_1.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_S)
3 | (set-info :source |
4 | Generated by: Joel Day, Thorsten Ehlers, Mitja Kulczynski, Federico Mora, Florin Manea, Dirk Nowotka, Danny Poulsen, Zhengyang Lu
5 | Application: Test WOORPJE
6 | Target solver: WOORPJE
7 | Publications: Day, J. D., Ehlers, T., Kulczynski, M., Manea, F., Nowotka, D., & Poulsen, D. B. (2019). On solving word equations using SAT. In RP 2019
8 | Description: Transoformed and expanded from Track02
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "random")
12 | (set-info :status unknown)
13 |
14 | (declare-fun H () String)
15 | (declare-fun K () String)
16 | (declare-fun I () String)
17 | (declare-fun J () String)
18 | (declare-fun L () String)
19 | (assert (= (str.++ "aaaaaaa" H "aaaaaaaaaa" H "aab" I H I I "b" J "ab" K "aba") (str.++ "a" H H "aa" I H I H I H I H "b" I "a" I "abaaaab" L L "baa") ))
20 | (check-sat)
21 |
22 | (exit)
23 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-006.smt2:
--------------------------------------------------------------------------------
1 | (declare-const x String)
2 | (declare-const y String)
3 | (declare-const z String)
4 | (declare-const w String)
5 | (declare-const v String)
6 |
7 |
8 |
9 | (assert (= x (str.replace_re_longest_all y (str.to.re "0") z)))
10 | (assert (= y (str.replace_re_longest_all w (str.to.re "1") v)))
11 |
12 | (assert
13 | (str.in.re x
14 | (re.++
15 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
16 | (re.union
17 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
18 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
19 | )
20 | )
21 | )
22 | )
23 | (assert (str.in.re z (re.* (str.to.re "10"))))
24 | (assert (str.in.re y (re.* (str.to.re "01"))))
25 | (assert (str.in.re w (re.++ (re.* (str.to.re "0")) (re.++ (re.* (str.to.re "1")) (re.++ (re.* (str.to.re "0")) (re.* (str.to.re "1")))))))
26 | (assert (str.in.re v (re.++ (re.* (str.to.re "0")) (re.* (str.to.re "1")))))
27 |
28 | (check-sat)
29 |
--------------------------------------------------------------------------------
/tests/yan-benchmarks/replaceAll-017.smt2:
--------------------------------------------------------------------------------
1 | (declare-fun x () String)
2 | (declare-fun y () String)
3 | (declare-fun x1 () String)
4 | (declare-fun y1 () String)
5 | (declare-fun z () String)
6 | (declare-fun w () String)
7 | (declare-fun v () String)
8 |
9 | (assert (= x (str.replace_re_longest_all y (str.to.re "010") z)))
10 | (assert (= y (str.replace_re_longest_all w (str.to.re "1") v)))
11 | (assert (= w (str.replace_re_longest_all x1 (str.to.re "00") y1)))
12 |
13 | (assert
14 | (str.in.re x
15 | (re.++
16 | (re.* (re.union (str.to.re "0") (str.to.re "1") ) )
17 | (re.union
18 | (re.++ (str.to.re "00") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
19 | (re.++ (str.to.re "11") (re.* (re.union (str.to.re "0")(str.to.re "1") ) ) )
20 | )
21 | )
22 | )
23 | )
24 | (assert (str.in.re y (re.* (str.to.re "01"))))
25 | (assert (str.in.re z (re.* (str.to.re "10"))))
26 | (assert (str.in.re w (re.* (str.to.re "1"))))
27 | (assert (str.in.re x1 (re.* (str.to.re "0"))))
28 |
29 | (check-sat)
30 |
--------------------------------------------------------------------------------
/tests/hu-benchmarks/loopCountMotivation.smt2:
--------------------------------------------------------------------------------
1 | (declare-const X String)
2 | ; ^[/]*([^/\\ \:\*\?"\<\>\|\.][^/\\\:\*\?\"\<\>\|]{0,63}/)*[^/\\ \:\*\?"\<\>\|\.][^/\\\:\*\?\"\<\>\|]{0,63}$
3 | (assert (not (str.in.re X (re.++ (re.* (str.to.re "/")) (re.* (re.++ (re.union (str.to.re "/") (str.to.re "\x5c") (str.to.re " ") (str.to.re ":") (str.to.re "*") (str.to.re "?") (str.to.re "\x22") (str.to.re "<") (str.to.re ">") (str.to.re "|") (str.to.re ".")) ((_ re.loop 0 12) (re.union (str.to.re "/") (str.to.re "\x5c") (str.to.re ":") (str.to.re "*") (str.to.re "?") (str.to.re "\x22") (str.to.re "<") (str.to.re ">") (str.to.re "|"))) (str.to.re "/"))) (re.union (str.to.re "/") (str.to.re "\x5c") (str.to.re " ") (str.to.re ":") (str.to.re "*") (str.to.re "?") (str.to.re "\x22") (str.to.re "<") (str.to.re ">") (str.to.re "|") (str.to.re ".")) ((_ re.loop 0 12) (re.union (str.to.re "/") (str.to.re "\x5c") (str.to.re ":") (str.to.re "*") (str.to.re "?") (str.to.re "\x22") (str.to.re "<") (str.to.re ">") (str.to.re "|"))) (str.to.re "\x0a")))))
4 | (check-sat)
5 |
6 |
--------------------------------------------------------------------------------
/tests/substring-bug2.smt2:
--------------------------------------------------------------------------------
1 | (set-info :smt-lib-version 2.6)
2 | (set-logic QF_SLIA)
3 | (set-info :source |
4 | Generated by: Andres Noetzli, Andrew Reynolds, Haniel Barbosa, Aina Niemetz, Mathias Preiner, Clark Barrett, Cesare Tinelli
5 | Generated on: 2018-11-08
6 | Generator: CVC4
7 | Application: Rewrite rule verification
8 | Publications: "Syntax-Guided Rewrite Rule Enumeration for SMT Solvers" by A. Noetzli, A. Reynolds, H. Barbosa, A. Niemetz, M. Preiner, C. Barrett, and C. Tinelli, SAT 2019.
9 | |)
10 | (set-info :license "https://creativecommons.org/licenses/by/4.0/")
11 | (set-info :category "industrial")
12 | (set-info :status unknown)
13 | (declare-fun x () String)
14 | (declare-fun y () String)
15 | (declare-fun y2 () String)
16 | (declare-fun z () Int)
17 | ;(assert (not (= (str.substr "A" 0 (str.indexof x "A" 1)) (str.at x (str.indexof x "A" 1)))))
18 | (assert (= z (str.indexof x "A" 1)))
19 | (assert (= y (str.at x z)))
20 | (assert (= y2 (str.substr "A" 0 z)))
21 | (assert (distinct y y2))
22 | (check-sat)
23 | (get-model)
24 | (exit)
25 |
--------------------------------------------------------------------------------
/tests/epsilon-3.smt2:
--------------------------------------------------------------------------------
1 | (set-logic QF_S)
2 | (set-option :strings-exp true)
3 | (set-option :produce-models true)
4 | (declare-fun sigmaStar_0 () String)
5 | (declare-fun sigmaStar_5 () String)
6 | (declare-fun x_2 () String)
7 | (declare-fun epsilon () String)
8 | (declare-fun literal_7 () String)
9 | (declare-fun x_6 () String)
10 | (declare-fun x_8 () String)
11 | (declare-fun sigmaStar_12 () String)
12 | (declare-fun literal_11 () String)
13 | (declare-fun x_14 () String)
14 | (declare-fun x_13 () String)
15 | (declare-fun x_15 () String)
16 | (declare-fun literal_16 () String)
17 | (declare-fun x_17 () String)
18 | (declare-fun x_18 () String)
19 | (declare-fun literal_19 () String)
20 | (declare-fun x_20 () String)
21 |
22 | (assert (= epsilon ""))
23 | (assert (or (= x_2 epsilon)))
24 | (assert (= literal_7 "[ hello:"))
25 | (assert (= x_8 (str.++ literal_7 x_6)))
26 | (assert (= x_18 (str.++ x_8 sigmaStar_0)))
27 | (assert (str.in.re x_18 (re.++ (re.* re.allchar) (re.++ (str.to.re "\