-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswap.smt2
68 lines (46 loc) · 1.79 KB
/
swap.smt2
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
(set-info :source |
encoding first conclusion of body_swap in verif_swap
notes:
- doesn't seem possible to encode len as function since it's domain is not a base type, using Ints instead
|)
(set-info :smt-lib-version 2.0)
(set-info :status unsat)
(set-logic QF_AUFLIA)
(declare-fun a () (Array Int Int))
(declare-fun i () Int)
(declare-fun j () Int)
(declare-fun size () Int)
(declare-fun dI () Int)
(declare-fun saj () Int)
(declare-fun sai () Int)
(declare-fun lspp () (Array Int Int))
(declare-fun lsp () (Array Int Int))
(declare-fun rs () Int)
(declare-fun ls () Int)
(declare-fun len_a () Int)
(declare-fun len_lspp () Int)
(declare-fun len_lsp () Int)
(assert (not (= dI (select a j))))
(assert (not (= dI (select a i))))
(assert (let ((?id (select a j)))
(=> (not (= dI ?id)) (and (<= 0 j) (< j len_a)))))
(assert (let ((?id0 (select a i)))
(=> (not (= dI ?id0)) (and (<= 0 i) (< i len_a)))))
(assert (and (<= 0 i) (< i size)))
(assert (and (<= 0 j) (< j size)))
(assert
(and (and (=> (and (<= 0 j) (< j len_a)) (= saj (select a j)))
(=> (not (and (<= 0 j) (< j len_a))) (= saj dI)))
(and (= lspp (store a i saj))
(and (=> (and (<= 0 i) (< i len_a)) (= len_lspp len_a))
(and (and (=> (and (<= 0 i) (< i len_a)) (= sai (select a i)))
(=> (not (and (<= 0 i) (< i len_a))) (= sai dI)))
(and (= lsp (store lspp j sai))
(and (=> (and (<= 0 j) (< j len_lspp)) (= len_lsp len_lspp))
(and (and (=> (and (<= 0 i) (< i len_lsp)) (= ls (select lsp i)))
(=> (not (and (<= 0 i) (< i len_lsp))) (= ls dI)))
(and (and (=> (and (<= 0 j) (< j len_a)) (= rs (select a j)))
(=> (not (and (<= 0 j) (< j len_a))) (= rs dI)))
(not (and (= ls rs))))))))))))
(check-sat)
(exit)