This repository was archived by the owner on Nov 22, 2022. It is now read-only.
forked from viperproject/silicon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreamble.smt2
More file actions
65 lines (45 loc) · 1.57 KB
/
Copy pathpreamble.smt2
File metadata and controls
65 lines (45 loc) · 1.57 KB
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
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
; Requires Z3 >= 4.3.2
; ATTENTION: Continuing multi-line statements must be indented with at least
; one tab or two spaces. All other lines must not start with tabs
; or more than one space.
; --- Snapshots ---
(declare-datatypes (($Snap 0)) ((
($Snap.unit)
($Snap.combine ($Snap.first $Snap) ($Snap.second $Snap)))))
; --- References ---
(declare-sort $Ref 0)
(declare-const $Ref.null $Ref)
; --- Permissions ---
(declare-sort $FPM 0)
(declare-sort $PPM 0)
(define-sort $Perm () Real)
(define-const $Perm.Write $Perm 1.0)
(define-const $Perm.No $Perm 0.0)
(define-fun $Perm.isValidVar ((p $Perm)) Bool
(<= $Perm.No p))
(define-fun $Perm.isReadVar ((p $Perm) (ub $Perm)) Bool
(and ($Perm.isValidVar p)
(not (= p $Perm.No))
(< p $Perm.Write)))
; min function for permissions
(define-fun $Perm.min ((p1 $Perm) (p2 $Perm)) Real
(ite (<= p1 p2) p1 p2))
; --- Sort wrappers ---
; Sort wrappers are no longer part of the static preamble. Instead, they are
; emitted as part of the program-specific preamble.
; --- Math ---
;function Math#min(a: int, b: int): int;
(define-fun $Math.min ((a Int) (b Int)) Int
(ite (<= a b) a b))
;function Math#clip(a: int): int;
(define-fun $Math.clip ((a Int)) Int
(ite (< a 0) 0 a))
; --- End static preamble ---
; (get-proof "stdout")
; (get-info :all-statistics)
; (push)
; (check-sat)
; (pop)