-
Notifications
You must be signed in to change notification settings - Fork 2
/
dll_len_entails_lspre_len.sb.smt2
70 lines (56 loc) · 1.35 KB
/
dll_len_entails_lspre_len.sb.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
67
68
69
70
(set-logic QF_SHIDLIA)
(set-info :source | Songbird - https://songbird-prover.github.io/ |)
(set-info :smt-lib-version 2)
(set-info :category "crafted")
(set-info :status unsat)
;; singleton heap
(declare-sort Refnode 0)
(declare-datatypes
((node 0))
(((c_node (next Refnode) (prev Refnode)))))
(declare-heap (Refnode node))
;; heap predicates
(define-fun-rec dll ((hd_2 Refnode) (p_3 Refnode) (tl_4 Refnode) (n_5 Refnode) (len_6 Int)) Bool
(or
(and
(pto hd_2 (c_node n_5 p_3))
(and
(= (+ len_6 (- 1)) 0)
(= hd_2 tl_4)))
(exists
((x_7 Refnode) (k Int))
(and
(sep
(pto hd_2 (c_node x_7 p_3))
(dll x_7 hd_2 tl_4 n_5 k))
(= k (+ len_6 (- 1)))
(<= 1 (+ len_6 (- 1)))))))
;; heap predicates
(define-fun-rec ls_pre ((x_8 Refnode) (y_9 Refnode) (len_10 Int)) Bool
(or
(and
(_ emp Refnode node)
(and
(= len_10 0)
(= x_8 y_9)))
(exists
((anon_11 Refnode) (u_12 Refnode) (k Int))
(and
(sep
(pto x_8 (c_node anon_11 u_12))
(ls_pre u_12 y_9 k))
(= k (+ len_10 (- 1)))
(<= 0 (+ len_10 (- 1)))))))
(check-sat)
;; entailment: dll(x,y,z,t,n) |- ls_pre(z,y,n)
(declare-const x Refnode)
(declare-const y Refnode)
(declare-const z Refnode)
(declare-const t Refnode)
(declare-const n Int)
(assert
(dll x y z t n))
(assert
(not
(ls_pre z y n)))
(check-sat)