Debian Codegraph @

test/regress/cli/regress0/strings/idof-rewrites.smt2

raw
1 (set-logic ALL)
2 (set-info :status sat)
3
4 (declare-fun s () String)
5 (declare-fun t () String)
6
7 ; all of these should rewrite to true
8 (assert (= (str.indexof (str.++ s "abc") "ab" 0) (str.indexof (str.++ s "ab") "ab" 0)))
9 (assert (= (str.indexof (str.++ s "abc" t "a") t 2) (str.indexof (str.++ s "abc" t "c") t 2)))
10 (assert (= (str.indexof (str.++ "ddd" s "abc") "ab" 2) (+ 1 (str.indexof (str.++ "ed" s "ab") "ab" 1))))
11 (assert (= (str.indexof (str.++ "dd" s "dd") "ab" 0) (str.indexof (str.++ "dd" s "ee") "ab" 0)))
12 (assert (= (str.indexof (str.++ "dd" s "dabd") "ab" 1) (+ 2 (str.indexof (str.++ s "dab" t) "ab" 0))))
13 (check-sat)