Debian Codegraph @

src/plugins/wp/tests/wp_acsl/oracle/bitwise.res.oracle

raw
1 # frama-c -wp [...]
2 [kernel] Parsing bitwise.i (no preprocessing)
3 [wp] Running WP plugin...
4 [wp] Warning: Missing RTE guards
5 ------------------------------------------------------------
6 Function band
7 ------------------------------------------------------------
8
9 Goal Post-condition (file bitwise.i, line 5) in 'band':
10 Prove: true.
11
12 ------------------------------------------------------------
13
14 Goal Post-condition 'band0' in 'band':
15 Prove: true.
16
17 ------------------------------------------------------------
18 ------------------------------------------------------------
19 Function band with behavior bit0
20 ------------------------------------------------------------
21
22 Goal Post-condition for 'bit0' 'band1' in 'band':
23 Prove: true.
24
25 ------------------------------------------------------------
26
27 Goal Post-condition for 'bit0' 'band2' in 'band':
28 Prove: true.
29
30 ------------------------------------------------------------
31 ------------------------------------------------------------
32 Function band with behavior bit1
33 ------------------------------------------------------------
34
35 Goal Post-condition for 'bit1' 'band3' in 'band':
36 Prove: true.
37
38 ------------------------------------------------------------
39 ------------------------------------------------------------
40 Function band with behavior bit2
41 ------------------------------------------------------------
42
43 Goal Post-condition for 'bit2' 'band4' in 'band':
44 Prove: true.
45
46 ------------------------------------------------------------
47 ------------------------------------------------------------
48 Function band with behavior bit3
49 ------------------------------------------------------------
50
51 Goal Post-condition for 'bit3' 'band5' in 'band':
52 Prove: true.
53
54 ------------------------------------------------------------
55 ------------------------------------------------------------
56 Function band with behavior bit4
57 ------------------------------------------------------------
58
59 Goal Post-condition for 'bit4' 'band6' in 'band':
60 Prove: true.
61
62 ------------------------------------------------------------
63 ------------------------------------------------------------
64 Function band with behavior bit5
65 ------------------------------------------------------------
66
67 Goal Post-condition for 'bit5' 'band7,zbit' in 'band':
68 Prove: true.
69
70 ------------------------------------------------------------
71 ------------------------------------------------------------
72 Function band_bool with behavior false
73 ------------------------------------------------------------
74
75 Goal Post-condition for 'false' (file bitwise.i, line 91) in 'band_bool':
76 Assume {
77 Type: is_bool(a) /\ is_bool(b).
78 (* Pre-condition for 'false' *)
79 Have: (a != 1) \/ (b != 1).
80 }
81 Prove: land(a, b) = 0.
82
83 ------------------------------------------------------------
84 ------------------------------------------------------------
85 Function band_bool with behavior true
86 ------------------------------------------------------------
87
88 Goal Post-condition for 'true' (file bitwise.i, line 88) in 'band_bool':
89 Prove: true.
90
91 ------------------------------------------------------------
92 ------------------------------------------------------------
93 Function bnot
94 ------------------------------------------------------------
95
96 Goal Post-condition (file bitwise.i, line 55) in 'bnot':
97 Prove: true.
98
99 ------------------------------------------------------------
100 ------------------------------------------------------------
101 Function bor
102 ------------------------------------------------------------
103
104 Goal Post-condition (file bitwise.i, line 28) in 'bor':
105 Prove: true.
106
107 ------------------------------------------------------------
108
109 Goal Post-condition 'bor0' in 'bor':
110 Prove: true.
111
112 ------------------------------------------------------------
113 ------------------------------------------------------------
114 Function bor with behavior bit1
115 ------------------------------------------------------------
116
117 Goal Post-condition for 'bit1' 'bor1' in 'bor':
118 Prove: true.
119
120 ------------------------------------------------------------
121 ------------------------------------------------------------
122 Function bor with behavior bit2
123 ------------------------------------------------------------
124
125 Goal Post-condition for 'bit2' 'bor2' in 'bor':
126 Prove: true.
127
128 ------------------------------------------------------------
129 ------------------------------------------------------------
130 Function bor with behavior bit3
131 ------------------------------------------------------------
132
133 Goal Post-condition for 'bit3' 'bor3' in 'bor':
134 Prove: true.
135
136 ------------------------------------------------------------
137 ------------------------------------------------------------
138 Function bor_bool with behavior false
139 ------------------------------------------------------------
140
141 Goal Post-condition for 'false' (file bitwise.i, line 81) in 'bor_bool':
142 Assume {
143 Type: is_bool(a) /\ is_bool(b).
144 (* Pre-condition for 'false' *)
145 Have: (a != 1) /\ (b != 1).
146 }
147 Prove: (a = 0) /\ (b = 0).
148
149 ------------------------------------------------------------
150 ------------------------------------------------------------
151 Function bor_bool with behavior true
152 ------------------------------------------------------------
153
154 Goal Post-condition for 'true' (file bitwise.i, line 78) in 'bor_bool':
155 Prove: true.
156
157 ------------------------------------------------------------
158 ------------------------------------------------------------
159 Function bxor
160 ------------------------------------------------------------
161
162 Goal Post-condition (file bitwise.i, line 42) in 'bxor':
163 Prove: true.
164
165 ------------------------------------------------------------
166 ------------------------------------------------------------
167 Function bxor with behavior bit1
168 ------------------------------------------------------------
169
170 Goal Post-condition for 'bit1' (file bitwise.i, line 45) in 'bxor':
171 Prove: true.
172
173 ------------------------------------------------------------
174 ------------------------------------------------------------
175 Function bxor with behavior bit2
176 ------------------------------------------------------------
177
178 Goal Post-condition for 'bit2' (file bitwise.i, line 48) in 'bxor':
179 Prove: true.
180
181 ------------------------------------------------------------
182 ------------------------------------------------------------
183 Function bxor with behavior bit3
184 ------------------------------------------------------------
185
186 Goal Post-condition for 'bit3' (file bitwise.i, line 51) in 'bxor':
187 Prove: true.
188
189 ------------------------------------------------------------
190 ------------------------------------------------------------
191 Function bxor_bool with behavior false
192 ------------------------------------------------------------
193
194 Goal Post-condition for 'false' (file bitwise.i, line 100) in 'bxor_bool':
195 Assume {
196 Type: is_bool(a) /\ is_bool(b).
197 (* Pre-condition for 'false' *)
198 Have: ((a != 0) \/ (b != 1)) /\ ((a != 1) \/ (b != 0)).
199 }
200 Prove: b = a.
201
202 ------------------------------------------------------------
203 ------------------------------------------------------------
204 Function bxor_bool with behavior true
205 ------------------------------------------------------------
206
207 Goal Post-condition for 'true' (file bitwise.i, line 97) in 'bxor_bool':
208 Assume {
209 Type: is_bool(a) /\ is_bool(b).
210 (* Pre-condition for 'true' *)
211 Have: ((a = 0) /\ (b = 1)) \/ ((a = 1) /\ (b = 0)).
212 }
213 Prove: b != a.
214
215 ------------------------------------------------------------
216 ------------------------------------------------------------
217 Function cast_uchar
218 ------------------------------------------------------------
219
220 Goal Post-condition (file bitwise.i, line 131) in 'cast_uchar':
221 Prove: true.
222
223 ------------------------------------------------------------
224
225 Goal Check 'bit_test,ok' (file bitwise.i, line 134):
226 Prove: true.
227
228 ------------------------------------------------------------
229
230 Goal Check 'bit_test1,ok' (file bitwise.i, line 135):
231 Prove: true.
232
233 ------------------------------------------------------------
234
235 Goal Check 'bit_unset,ok' (file bitwise.i, line 136):
236 Prove: true.
237
238 ------------------------------------------------------------
239
240 Goal Check 'bit_set_unset,ok' (file bitwise.i, line 137):
241 Prove: true.
242
243 ------------------------------------------------------------
244
245 Goal Check 'bit_set_unset2,ok' (file bitwise.i, line 138):
246 Prove: true.
247
248 ------------------------------------------------------------
249
250 Goal Check 'bit_defined,ok' (file bitwise.i, line 140):
251 Prove: true.
252
253 ------------------------------------------------------------
254
255 Goal Check 'bit_defined2,ok' (file bitwise.i, line 141):
256 Prove: true.
257
258 ------------------------------------------------------------
259
260 Goal Check 'bit_to_signed_positive,ok' (file bitwise.i, line 143):
261 Prove: true.
262
263 ------------------------------------------------------------
264
265 Goal Check 'bit_to_signed_positive2,ok' (file bitwise.i, line 144):
266 Prove: true.
267
268 ------------------------------------------------------------
269
270 Goal Check 'bit_to_signed_negative,ok' (file bitwise.i, line 145):
271 Prove: true.
272
273 ------------------------------------------------------------
274
275 Goal Check 'bit_to_signed_negative2,ok' (file bitwise.i, line 146):
276 Prove: true.
277
278 ------------------------------------------------------------
279
280 Goal Check 'bit_to_signed,ok' (file bitwise.i, line 147):
281 Prove: true.
282
283 ------------------------------------------------------------
284
285 Goal Check 'bit_to_signed2,ok' (file bitwise.i, line 148):
286 Prove: true.
287
288 ------------------------------------------------------------
289
290 Goal Check 'bit_lsl_lowest,ok' (file bitwise.i, line 150):
291 Prove: true.
292
293 ------------------------------------------------------------
294
295 Goal Check 'bit_lsl_higher_set,ok' (file bitwise.i, line 151):
296 Prove: true.
297
298 ------------------------------------------------------------
299
300 Goal Check 'bit_lsl_higher_unset,ok' (file bitwise.i, line 152):
301 Prove: true.
302
303 ------------------------------------------------------------
304
305 Goal Check 'bit_lsr_set,ok' (file bitwise.i, line 154):
306 Prove: true.
307
308 ------------------------------------------------------------
309
310 Goal Check 'bit_lsr_unset,ok' (file bitwise.i, line 155):
311 Prove: true.
312
313 ------------------------------------------------------------
314 ------------------------------------------------------------
315 Function lemma
316 ------------------------------------------------------------
317
318 Goal Check 'zbit,a1' (file bitwise.i, line 105):
319 Assume { Type: is_uint32(a). }
320 Prove: (a + lnot(a)) = (-1).
321
322 ------------------------------------------------------------
323
324 Goal Check 'zbit,a2' (file bitwise.i, line 106):
325 Assume { Type: is_uint32(a). }
326 Prove: lor(a, lnot(a)) = (-1).
327
328 ------------------------------------------------------------
329
330 Goal Check 'zbit,a3' (file bitwise.i, line 107):
331 Assume { Type: is_uint32(a). }
332 Prove: land(a, lnot(a)) = 0.
333
334 ------------------------------------------------------------
335
336 Goal Check (file bitwise.i, line 108):
337 Prove: true.
338
339 ------------------------------------------------------------
340
341 Goal Check (file bitwise.i, line 109):
342 Prove: true.
343
344 ------------------------------------------------------------
345
346 Goal Check (file bitwise.i, line 110):
347 Prove: true.
348
349 ------------------------------------------------------------
350
351 Goal Check (file bitwise.i, line 111):
352 Prove: true.
353
354 ------------------------------------------------------------
355
356 Goal Check (file bitwise.i, line 112):
357 Prove: true.
358
359 ------------------------------------------------------------
360
361 Goal Check 'zbit,a4' (file bitwise.i, line 114):
362 Assume { Type: is_uint32(a) /\ is_uint32(b). }
363 Prove: (land(a, b) % 256) = land(255, land(a, b)).
364
365 ------------------------------------------------------------
366
367 Goal Check (file bitwise.i, line 118):
368 Prove: true.
369
370 ------------------------------------------------------------
371
372 Goal Check 'zbit,a5' (file bitwise.i, line 120):
373 Let x = lsl(1, k).
374 Assume { Type: is_uint32(a) /\ is_uint32(b) /\ is_uint32(k). }
375 Prove: (land(77, land(a, b)) % x) = land(77, land(a, land(b, x - 1))).
376
377 ------------------------------------------------------------
378
379 Goal Check (file bitwise.i, line 124):
380 Prove: true.
381
382 ------------------------------------------------------------
383 ------------------------------------------------------------
384 Function lshift
385 ------------------------------------------------------------
386
387 Goal Post-condition (file bitwise.i, line 58) in 'lshift':
388 Prove: true.
389
390 ------------------------------------------------------------
391 ------------------------------------------------------------
392 Function lshift with behavior shift1
393 ------------------------------------------------------------
394
395 Goal Post-condition for 'shift1' 'lsl1' in 'lshift':
396 Prove: true.
397
398 ------------------------------------------------------------
399
400 Goal Post-condition for 'shift1' 'lsl2' in 'lshift':
401 Prove: true.
402
403 ------------------------------------------------------------
404 ------------------------------------------------------------
405 Function lshift with behavior shift2
406 ------------------------------------------------------------
407
408 Goal Post-condition for 'shift2' 'lsl3' in 'lshift':
409 Prove: true.
410
411 ------------------------------------------------------------
412 ------------------------------------------------------------
413 Function rshift
414 ------------------------------------------------------------
415
416 Goal Post-condition (file bitwise.i, line 69) in 'rshift':
417 Prove: true.
418
419 ------------------------------------------------------------
420 ------------------------------------------------------------
421 Function rshift with behavior shift1
422 ------------------------------------------------------------
423
424 Goal Post-condition for 'shift1' 'lsr1' in 'rshift':
425 Prove: true.
426
427 ------------------------------------------------------------