blob: c33e16bcd31b36562fdf55c6f0e172e0f1be4dd5 (
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
; EXPECT: unsat
; COMMAND-LINE: --lang=sygus2 --sygus-inv-templ=post --sygus-out=status
(set-logic LIA)
(define-fun
__node_init_previous_0 (
(previous.usr.x@0 Int)
(previous.usr.y@0 Int)
(previous.res.init_flag@0 Bool)
) Bool
(and (= previous.usr.y@0 0) previous.res.init_flag@0)
)
(define-fun
__node_trans_previous_0 (
(previous.usr.x@1 Int)
(previous.usr.y@1 Int)
(previous.res.init_flag@1 Bool)
(previous.usr.x@0 Int)
(previous.usr.y@0 Int)
(previous.res.init_flag@0 Bool)
) Bool
(and (= previous.usr.y@1 previous.usr.x@0) (not previous.res.init_flag@1))
)
(define-fun
__node_init_stopwatch_0 (
(stopwatch.usr.toggle@0 Bool)
(stopwatch.usr.reset@0 Bool)
(stopwatch.usr.count@0 Int)
(stopwatch.res.init_flag@0 Bool)
(stopwatch.res.abs_0@0 Bool)
(stopwatch.impl.usr.running@0 Bool)
(stopwatch.res.abs_1@0 Int)
(stopwatch.res.inst_0@0 Bool)
) Bool
(and
(= stopwatch.impl.usr.running@0 (not (not stopwatch.usr.toggle@0)))
(=
stopwatch.usr.count@0
(ite
stopwatch.usr.reset@0
0
(ite
stopwatch.impl.usr.running@0
(+ stopwatch.res.abs_1@0 1)
stopwatch.res.abs_1@0)))
(= stopwatch.res.abs_0@0 (>= stopwatch.usr.count@0 0))
(__node_init_previous_0
stopwatch.usr.count@0
stopwatch.res.abs_1@0
stopwatch.res.inst_0@0)
stopwatch.res.init_flag@0
true)
)
(define-fun
__node_trans_stopwatch_0 (
(stopwatch.usr.toggle@1 Bool)
(stopwatch.usr.reset@1 Bool)
(stopwatch.usr.count@1 Int)
(stopwatch.res.init_flag@1 Bool)
(stopwatch.res.abs_0@1 Bool)
(stopwatch.impl.usr.running@1 Bool)
(stopwatch.res.abs_1@1 Int)
(stopwatch.res.inst_0@1 Bool)
(stopwatch.usr.toggle@0 Bool)
(stopwatch.usr.reset@0 Bool)
(stopwatch.usr.count@0 Int)
(stopwatch.res.init_flag@0 Bool)
(stopwatch.res.abs_0@0 Bool)
(stopwatch.impl.usr.running@0 Bool)
(stopwatch.res.abs_1@0 Int)
(stopwatch.res.inst_0@0 Bool)
) Bool
(and
(=
stopwatch.impl.usr.running@1
(not (= stopwatch.impl.usr.running@0 stopwatch.usr.toggle@1)))
(=
stopwatch.usr.count@1
(ite
stopwatch.usr.reset@1
0
(ite
stopwatch.impl.usr.running@1
(+ stopwatch.res.abs_1@1 1)
stopwatch.res.abs_1@1)))
(= stopwatch.res.abs_0@1 (>= stopwatch.usr.count@1 0))
(__node_trans_previous_0
stopwatch.usr.count@1
stopwatch.res.abs_1@1
stopwatch.res.inst_0@1
stopwatch.usr.count@0
stopwatch.res.abs_1@0
stopwatch.res.inst_0@0)
(not stopwatch.res.init_flag@1)
true)
)
(synth-inv str_invariant(
(stopwatch.usr.toggle Bool)
(stopwatch.usr.reset Bool)
(stopwatch.usr.count Int)
(stopwatch.res.init_flag Bool)
(stopwatch.res.abs_0 Bool)
(stopwatch.impl.usr.running Bool)
(stopwatch.res.abs_1 Int)
(stopwatch.res.inst_0 Bool)
))
(define-fun
init (
(stopwatch.usr.toggle Bool)
(stopwatch.usr.reset Bool)
(stopwatch.usr.count Int)
(stopwatch.res.init_flag Bool)
(stopwatch.res.abs_0 Bool)
(stopwatch.impl.usr.running Bool)
(stopwatch.res.abs_1 Int)
(stopwatch.res.inst_0 Bool)
) Bool
(and
(= stopwatch.impl.usr.running (not (not stopwatch.usr.toggle)))
(=
stopwatch.usr.count
(ite
stopwatch.usr.reset
0
(ite
stopwatch.impl.usr.running
(+ stopwatch.res.abs_1 1)
stopwatch.res.abs_1)))
(= stopwatch.res.abs_0 (>= stopwatch.usr.count 0))
(__node_init_previous_0
stopwatch.usr.count
stopwatch.res.abs_1
stopwatch.res.inst_0)
stopwatch.res.init_flag
true)
)
(define-fun
trans (
;; Constants.
;; Current state.
(stopwatch.usr.toggle Bool)
(stopwatch.usr.reset Bool)
(stopwatch.usr.count Int)
(stopwatch.res.init_flag Bool)
(stopwatch.res.abs_0 Bool)
(stopwatch.impl.usr.running Bool)
(stopwatch.res.abs_1 Int)
(stopwatch.res.inst_0 Bool)
;; Next state.
(stopwatch.usr.toggle! Bool)
(stopwatch.usr.reset! Bool)
(stopwatch.usr.count! Int)
(stopwatch.res.init_flag! Bool)
(stopwatch.res.abs_0! Bool)
(stopwatch.impl.usr.running! Bool)
(stopwatch.res.abs_1! Int)
(stopwatch.res.inst_0! Bool)
) Bool
(and
(=
stopwatch.impl.usr.running!
(not (= stopwatch.impl.usr.running stopwatch.usr.toggle!)))
(=
stopwatch.usr.count!
(ite
stopwatch.usr.reset!
0
(ite
stopwatch.impl.usr.running!
(+ stopwatch.res.abs_1! 1)
stopwatch.res.abs_1!)))
(= stopwatch.res.abs_0! (>= stopwatch.usr.count! 0))
(__node_trans_previous_0
stopwatch.usr.count!
stopwatch.res.abs_1!
stopwatch.res.inst_0!
stopwatch.usr.count
stopwatch.res.abs_1
stopwatch.res.inst_0)
(not stopwatch.res.init_flag!)
true)
)
(define-fun
prop (
(stopwatch.usr.toggle Bool)
(stopwatch.usr.reset Bool)
(stopwatch.usr.count Int)
(stopwatch.res.init_flag Bool)
(stopwatch.res.abs_0 Bool)
(stopwatch.impl.usr.running Bool)
(stopwatch.res.abs_1 Int)
(stopwatch.res.inst_0 Bool)
) Bool
stopwatch.res.abs_0
)
(inv-constraint str_invariant init trans prop)
(check-synth)
|