summaryrefslogtreecommitdiff
path: root/test/regress/regress0/strings/from_code.smt2
blob: c9b49a931b28e87d7ae84da289c015f1b9856923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
; COMMAND-LINE: --lang=smt2.6
; EXPECT: unsat
; EXPECT: unsat
; EXPECT: sat
; EXPECT: unsat
; EXPECT: sat
; EXPECT: unsat
; EXPECT: sat
; EXPECT: unsat
; EXPECT: unsat
(set-option :incremental true)
(set-logic QF_SLIA)
(declare-const s String)
(declare-const t String)
(declare-const n Int)

(push)
(assert (not (= (str.to_code (str.from_code (str.to_code s))) (str.to_code s))))
(check-sat)
(pop)

(push)
(assert (not (= (str.from_code (str.to_code s)) s)))
(assert (<= (str.len s) 1))
(check-sat)
(pop)

(push)
(assert (not (= (str.from_code (str.to_code s)) s)))
(check-sat)
(pop)

(push)
(assert (not (= (str.from_code (str.to_code (str.from_code n))) (str.from_code n))))
(check-sat)
(pop)

(push)
(assert (not (= (str.to_code (str.from_code n)) n)))
(assert (>= n 0))
(check-sat)
(pop)

(push)
(assert (not (= (str.to_code (str.from_code n)) n)))
(assert (and (>= n 0) (< n 50)))
(check-sat)
(pop)

(push)
(assert (not (= (str.to_code (str.from_code n)) n)))
(check-sat)
(pop)

(push)
(assert (= (str.to_code s) (str.to_code t)))
(assert (= (str.len s) 1))
(assert (= (str.len t) 1))
(assert (not (= (str.from_code (str.to_code s)) (str.from_code (str.to_code t)))))
(check-sat)
(pop)

(push)
(assert (or
  (not (= (str.from_code (- 1)) ""))
  (not (= (str.from_code 100000000000000000000000) ""))
  (not (= (str.from_code 65) "A"))))
(check-sat)
(pop)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback