Debian Codegraph @

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

raw
1 # frama-c -wp [...]
2 [kernel] Parsing precedence.i (no preprocessing)
3 [kernel:annot-error] precedence.i:90: Warning: unexpected token ';'
4 [kernel:annot-error] precedence.i:135: Warning: Inconsistent relation chain.
5 [kernel:annot-error] precedence.i:134: Warning: Inconsistent relation chain.
6 [kernel:annot-error] precedence.i:133: Warning: Inconsistent relation chain.
7 [kernel:annot-error] precedence.i:132: Warning: Inconsistent relation chain.
8 [kernel:annot-error] precedence.i:130: Warning: Inconsistent relation chain.
9 [kernel:annot-error] precedence.i:129: Warning: Inconsistent relation chain.
10 [kernel:annot-error] precedence.i:128: Warning: Inconsistent relation chain.
11 [kernel:annot-error] precedence.i:127: Warning: Inconsistent relation chain.
12 [kernel:annot-error] precedence.i:125: Warning: Inconsistent relation chain.
13 [kernel:annot-error] precedence.i:124: Warning: Inconsistent relation chain.
14 [kernel:annot-error] precedence.i:123: Warning: Inconsistent relation chain.
15 [kernel:annot-error] precedence.i:122: Warning: Inconsistent relation chain.
16 [kernel:annot-error] precedence.i:120: Warning: Inconsistent relation chain.
17 [kernel:annot-error] precedence.i:119: Warning: Inconsistent relation chain.
18 [kernel:annot-error] precedence.i:118: Warning: Inconsistent relation chain.
19 [kernel:annot-error] precedence.i:175: Warning:
20 R is not a logic variable. Ignoring code annotation
21 [kernel:annot-error] precedence.i:176: Warning:
22 P is not a logic variable. Ignoring code annotation
23 [wp] Running WP plugin...
24 [wp] Warning: Missing RTE guards
25 ------------------------------------------------------------
26 Function bitwise
27 ------------------------------------------------------------
28
29 Goal Post-condition 'r_precedence_and_xor' in 'bitwise':
30 Prove: true.
31
32 ------------------------------------------------------------
33
34 Goal Post-condition 'l_precedence_and_xor' in 'bitwise':
35 Prove: true.
36
37 ------------------------------------------------------------
38
39 Goal Post-condition 'ko,l_precedence_xor_and' in 'bitwise':
40 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
41 Prove: lxor(r, land(p, q)) = land(p, lxor(q, r)).
42
43 ------------------------------------------------------------
44
45 Goal Post-condition 'ko,r_precedence_xor_and' in 'bitwise':
46 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
47 Prove: lxor(p, land(q, r)) = land(r, lxor(p, q)).
48
49 ------------------------------------------------------------
50
51 Goal Post-condition 'r_precedence_xor_or' in 'bitwise':
52 Prove: true.
53
54 ------------------------------------------------------------
55
56 Goal Post-condition 'l_precedence_xor_or' in 'bitwise':
57 Prove: true.
58
59 ------------------------------------------------------------
60
61 Goal Post-condition 'ko,l_precedence_or_xor' in 'bitwise':
62 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
63 Prove: lxor(p, lor(q, r)) = lor(r, lxor(p, q)).
64
65 ------------------------------------------------------------
66
67 Goal Post-condition 'ko,r_precedence_or_xor' in 'bitwise':
68 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
69 Prove: lxor(r, lor(p, q)) = lor(p, lxor(q, r)).
70
71 ------------------------------------------------------------
72
73 Goal Post-condition 'r_precedence_or_implies' in 'bitwise':
74 Prove: true.
75
76 ------------------------------------------------------------
77
78 Goal Post-condition 'l_precedence_or_implies' in 'bitwise':
79 Prove: true.
80
81 ------------------------------------------------------------
82
83 Goal Post-condition 'ko,l_precedence_implies_or' in 'bitwise':
84 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
85 Prove: lor(r, lnot(lor(p, q))) = lor(p, lor(r, lnot(q))).
86
87 ------------------------------------------------------------
88
89 Goal Post-condition 'ok,r_precedence_implies_or' in 'bitwise':
90 Prove: true.
91
92 ------------------------------------------------------------
93
94 Goal Post-condition 'ok,since' in 'bitwise':
95 Prove: true.
96
97 ------------------------------------------------------------
98
99 Goal Post-condition 'r_assoc_implies' in 'bitwise':
100 Prove: true.
101
102 ------------------------------------------------------------
103
104 Goal Post-condition 'ko,l_assoc_implies' in 'bitwise':
105 Let x = lnot(p).
106 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
107 Prove: lor(r, lnot(lor(q, x))) = lor(r, lor(x, lnot(q))).
108
109 ------------------------------------------------------------
110
111 Goal Post-condition 'r_precedence_implies_equiv' in 'bitwise':
112 Prove: true.
113
114 ------------------------------------------------------------
115
116 Goal Post-condition 'l_precedence_implies_equiv' in 'bitwise':
117 Prove: true.
118
119 ------------------------------------------------------------
120
121 Goal Post-condition 'ko,r_precedence_equiv_implies' in 'bitwise':
122 Let x = lnot(p).
123 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
124 Prove: lxor(r, lnot(lor(q, x))) = lor(lxor(r, lnot(q)), x).
125
126 ------------------------------------------------------------
127
128 Goal Post-condition 'ko,l_precedence_equiv_implies' in 'bitwise':
129 Let x = lnot(p).
130 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
131 Prove: lor(r, lnot(lxor(q, x))) = lxor(lor(r, lnot(q)), x).
132
133 ------------------------------------------------------------
134 ------------------------------------------------------------
135 Function comparison
136 ------------------------------------------------------------
137
138 Goal Post-condition 'chainable_lt_lt' in 'comparison':
139 Prove: true.
140
141 ------------------------------------------------------------
142
143 Goal Post-condition 'chainable_le_le' in 'comparison':
144 Prove: true.
145
146 ------------------------------------------------------------
147
148 Goal Post-condition 'chainable_gt_gt' in 'comparison':
149 Prove: true.
150
151 ------------------------------------------------------------
152
153 Goal Post-condition 'chainable_ge_ge' in 'comparison':
154 Prove: true.
155
156 ------------------------------------------------------------
157
158 Goal Post-condition 'chainable_eq_eq' in 'comparison':
159 Prove: true.
160
161 ------------------------------------------------------------
162
163 Goal Post-condition 'r_precedence_eq_and' in 'comparison':
164 Prove: true.
165
166 ------------------------------------------------------------
167
168 Goal Post-condition 'l_precedence_eq_and' in 'comparison':
169 Prove: true.
170
171 ------------------------------------------------------------
172
173 Goal Post-condition 'ko,r_precedence_and_eq' in 'comparison':
174 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
175 Prove: ((q = p) /\ (r != 0)) <-> (((q != 0) /\ (r != 0)) <-> (p != 0)).
176
177 ------------------------------------------------------------
178
179 Goal Post-condition 'ko,l_precedence_and_eq' in 'comparison':
180 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
181 Prove: ((p != 0) /\ (r = q)) <-> (((p != 0) /\ (q != 0)) <-> (r != 0)).
182
183 ------------------------------------------------------------
184
185 Goal Post-condition 'ko,l_nonassoc_eq' in 'comparison':
186 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
187 Prove: ((q = p) /\ (r = q)) <-> ((r != 0) <-> (q = p)).
188
189 ------------------------------------------------------------
190
191 Goal Post-condition 'ko,r_nonassoc_eq' in 'comparison':
192 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
193 Prove: ((q = p) /\ (r = q)) <-> ((r = q) <-> (p != 0)).
194
195 ------------------------------------------------------------
196
197 Goal Post-condition 'r_precedence_neq_and' in 'comparison':
198 Prove: true.
199
200 ------------------------------------------------------------
201
202 Goal Post-condition 'l_precedence_neq_and' in 'comparison':
203 Prove: true.
204
205 ------------------------------------------------------------
206
207 Goal Post-condition 'ko,r_precedence_and_neq' in 'comparison':
208 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
209 Prove: ((q != p) /\ (r != 0)) <-> (!(((q != 0) /\ (r != 0)) <-> (p != 0))).
210
211 ------------------------------------------------------------
212
213 Goal Post-condition 'ko,l_precedence_and_neq' in 'comparison':
214 Assume { Type: is_sint32(p) /\ is_sint32(q) /\ is_sint32(r). }
215 Prove: ((p != 0) /\ (r != q)) <-> (!(((p != 0) /\ (q != 0)) <-> (r != 0))).
216
217 ------------------------------------------------------------
218 ------------------------------------------------------------
219 Function predicate
220 ------------------------------------------------------------
221
222 Goal Post-condition 'r_precedence_and_xor' in 'predicate':
223 Prove: true.
224
225 ------------------------------------------------------------
226
227 Goal Post-condition 'l_precedence_and_xor' in 'predicate':
228 Prove: true.
229
230 ------------------------------------------------------------
231
232 Goal Post-condition 'ko,l_precedence_xor_and' in 'predicate':
233 Prove: (P_P /\ (!(P_R <-> P_Q))) <-> (!((P_P /\ P_Q) <-> P_R)).
234
235 ------------------------------------------------------------
236
237 Goal Post-condition 'ko,r_precedence_xor_and' in 'predicate':
238 Prove: (P_R /\ (!(P_Q <-> P_P))) <-> (!((P_Q /\ P_R) <-> P_P)).
239
240 ------------------------------------------------------------
241
242 Goal Post-condition 'r_precedence_xor_or' in 'predicate':
243 Prove: true.
244
245 ------------------------------------------------------------
246
247 Goal Post-condition 'l_precedence_xor_or' in 'predicate':
248 Prove: true.
249
250 ------------------------------------------------------------
251
252 Goal Post-condition 'ko,l_precedence_or_xor' in 'predicate':
253 Prove: (P_R \/ (!(P_Q <-> P_P))) <-> (!((P_Q \/ P_R) <-> P_P)).
254
255 ------------------------------------------------------------
256
257 Goal Post-condition 'ko,r_precedence_or_xor' in 'predicate':
258 Prove: (P_P \/ (!(P_R <-> P_Q))) <-> (!((P_P \/ P_Q) <-> P_R)).
259
260 ------------------------------------------------------------
261
262 Goal Post-condition 'r_precedence_or_implies' in 'predicate':
263 Prove: true.
264
265 ------------------------------------------------------------
266
267 Goal Post-condition 'l_precedence_or_implies' in 'predicate':
268 Prove: true.
269
270 ------------------------------------------------------------
271
272 Goal Post-condition 'ko,l_precedence_implies_or' in 'predicate':
273 Prove: (P_P \/ ((P_Q -> P_R))) <-> (((P_P \/ P_Q) -> P_R)).
274
275 ------------------------------------------------------------
276
277 Goal Post-condition 'ok,r_precedence_implies_or' in 'predicate':
278 Prove: (P_R \/ ((P_P -> P_Q))) <-> ((P_P -> (P_Q \/ P_R))).
279
280 ------------------------------------------------------------
281
282 Goal Post-condition 'ok,since' in 'predicate':
283 Prove: true.
284
285 ------------------------------------------------------------
286
287 Goal Post-condition 'r_assoc_implies' in 'predicate':
288 Prove: true.
289
290 ------------------------------------------------------------
291
292 Goal Post-condition 'ko,l_assoc_implies' in 'predicate':
293 Prove: ((((P_P -> P_Q)) -> P_R)) <-> ((P_P -> (P_Q -> P_R))).
294
295 ------------------------------------------------------------
296
297 Goal Post-condition 'r_precedence_implies_equiv' in 'predicate':
298 Prove: true.
299
300 ------------------------------------------------------------
301
302 Goal Post-condition 'l_precedence_implies_equiv' in 'predicate':
303 Prove: true.
304
305 ------------------------------------------------------------
306
307 Goal Post-condition 'ko,r_precedence_equiv_implies' in 'predicate':
308 Prove: ((P_P -> (P_R <-> P_Q))) <-> (((P_P -> P_Q)) <-> P_R).
309
310 ------------------------------------------------------------
311
312 Goal Post-condition 'ko,l_precedence_equiv_implies' in 'predicate':
313 Prove: (((P_Q <-> P_P) -> P_R)) <-> (((P_Q -> P_R)) <-> P_P).
314
315 ------------------------------------------------------------
316
317 Goal Post-condition 'r_precedence_equiv_ite' in 'predicate':
318 Prove: true.
319
320 ------------------------------------------------------------
321
322 Goal Post-condition 'm_precedence_equiv_ite' in 'predicate':
323 Prove: true.
324
325 ------------------------------------------------------------
326
327 Goal Post-condition 'l_precedence_equiv_ite' in 'predicate':
328 Prove: true.
329
330 ------------------------------------------------------------
331
332 Goal Post-condition 'ko,r_precedence_ite_equiv' in 'predicate':
333 Prove: ((((P_Q <-> P_P) -> P_R)) /\ (((!(P_Q <-> P_P)) -> P_S))) <->
334 ((((P_Q -> P_R)) /\ (((!P_Q) -> P_S))) <-> P_P).
335
336 ------------------------------------------------------------
337
338 Goal Post-condition 'ko,l_precedence_ite_equiv' in 'predicate':
339 Prove: (((P_P -> P_Q)) /\ (((!P_P) -> (P_S <-> P_R)))) <->
340 ((((P_P -> P_Q)) /\ (((!P_P) -> P_R))) <-> P_S).
341
342 ------------------------------------------------------------
343
344 Goal Post-condition 'r_assoc_ite' in 'predicate':
345 Prove: true.
346
347 ------------------------------------------------------------
348
349 Goal Post-condition 'ko,l_assoc_ite' in 'predicate':
350 Prove: (((((P_P -> P_Q)) -> ((((!P_P) -> P_R)) -> P_S))) /\
351 ((((P_P /\ (!P_Q)) \/ ((!P_P) /\ (!P_R))) -> P_U))) <->
352 (((P_P -> P_Q)) /\ (((!P_P) -> (((P_R -> P_S)) /\ (((!P_R) -> P_U)))))).
353
354 ------------------------------------------------------------
355
356 Goal Post-condition 'r_precedence_ite_forall' in 'predicate':
357 Prove: true.
358
359 ------------------------------------------------------------
360
361 Goal Post-condition 'm_precedence_ite_forall' in 'predicate':
362 Prove: true.
363
364 ------------------------------------------------------------
365
366 Goal Post-condition 'l_precedence_ite_forall' in 'predicate':
367 Prove: true.
368
369 ------------------------------------------------------------
370
371 Goal Post-condition 'ko,r_precedence_forall_ite' in 'predicate':
372 Assume { Type: is_sint32(x). }
373 Prove: (forall i : Z. ((P_Px(i) -> P_Qx(i))) /\ (((!P_Px(i)) -> P_Rx(i)))) <->
374 ((((forall i : Z. P_Px(i)) -> P_Qx(x))) /\
375 (((exists i : Z. !P_Px(i)) -> P_Rx(x)))).
376
377 ------------------------------------------------------------
378
379 Goal Post-condition 'ko,m_precedence_forall_ite' in 'predicate':
380 Assume { Type: is_sint32(x). }
381 Prove: ((((!P_Px(x)) -> P_Rx(x))) /\ ((P_Px(x) -> (forall i : Z. P_Qx(i))))) <->
382 (((P_Px(x) -> P_Qx(x))) /\ (((!P_Px(x)) -> P_Rx(x)))).
383
384 ------------------------------------------------------------
385
386 Goal Post-condition 'ko,l_precedence_forall_ite' in 'predicate':
387 Assume { Type: is_sint32(x). }
388 Prove: (((P_Px(x) -> P_Qx(x))) /\ (((!P_Px(x)) -> (forall i : Z. P_Rx(i))))) <->
389 (((P_Px(x) -> P_Qx(x))) /\ (((!P_Px(x)) -> P_Rx(x)))).
390
391 ------------------------------------------------------------
392
393 Goal Post-condition 'r_assoc_forall' in 'predicate':
394 Prove: true.
395
396 ------------------------------------------------------------
397
398 Goal Post-condition 'ko,r_assoc_forall' in 'predicate':
399 Prove: (forall i_1,i : Z. P_Pxy(i_1, i)) <-> (forall i : Z. P_Pxy(i, i)).
400
401 ------------------------------------------------------------
402
403 Goal Post-condition 'r_precedence_ite_exists' in 'predicate':
404 Prove: true.
405
406 ------------------------------------------------------------
407
408 Goal Post-condition 'm_precedence_ite_exists' in 'predicate':
409 Prove: true.
410
411 ------------------------------------------------------------
412
413 Goal Post-condition 'l_precedence_ite_exists' in 'predicate':
414 Prove: true.
415
416 ------------------------------------------------------------
417
418 Goal Post-condition 'ko,r_precedence_exists_ite' in 'predicate':
419 Assume { Type: is_sint32(x). }
420 Prove: (exists i : Z. ((P_Px(i) -> P_Qx(i))) /\ (((!P_Px(i)) -> P_Rx(i)))) <->
421 ((((exists i : Z. P_Px(i)) -> P_Qx(x))) /\
422 (((forall i : Z. !P_Px(i)) -> P_Rx(x)))).
423
424 ------------------------------------------------------------
425
426 Goal Post-condition 'ko,m_precedence_exists_ite' in 'predicate':
427 Assume { Type: is_sint32(x). }
428 Prove: ((((!P_Px(x)) -> P_Rx(x))) /\ ((P_Px(x) -> (exists i : Z. P_Qx(i))))) <->
429 (((P_Px(x) -> P_Qx(x))) /\ (((!P_Px(x)) -> P_Rx(x)))).
430
431 ------------------------------------------------------------
432
433 Goal Post-condition 'ko,l_precedence_exists_ite' in 'predicate':
434 Assume { Type: is_sint32(x). }
435 Prove: (((P_Px(x) -> P_Qx(x))) /\ (((!P_Px(x)) -> (exists i : Z. P_Rx(i))))) <->
436 (((P_Px(x) -> P_Qx(x))) /\ (((!P_Px(x)) -> P_Rx(x)))).
437
438 ------------------------------------------------------------
439
440 Goal Post-condition 'r_assoc_exist' in 'predicate':
441 Prove: true.
442
443 ------------------------------------------------------------
444
445 Goal Post-condition 'ko,r_assoc_exist' in 'predicate':
446 Prove: (exists i_1,i : Z. P_Pxy(i_1, i)) <-> (exists i : Z. P_Pxy(i, i)).
447
448 ------------------------------------------------------------
449
450 Goal Post-condition 'r_precedence_ite_let' in 'predicate':
451 Prove: true.
452
453 ------------------------------------------------------------
454
455 Goal Post-condition 'm_precedence_ite_let' in 'predicate':
456 Prove: true.
457
458 ------------------------------------------------------------
459
460 Goal Post-condition 'l_precedence_ite_let' in 'predicate':
461 Prove: true.
462
463 ------------------------------------------------------------
464
465 Goal Post-condition 'ko,r_precedence_let_ite' in 'predicate':
466 Assume { Type: is_sint32(a) /\ is_sint32(x). }
467 Prove: (((P_Px(a) -> P_Qx(x))) /\ (((!P_Px(a)) -> P_Rx(x)))) <->
468 (((P_Px(a) -> P_Qx(a))) /\ (((!P_Px(a)) -> P_Rx(a)))).
469
470 ------------------------------------------------------------
471
472 Goal Post-condition 'ko,m_precedence_let_ite' in 'predicate':
473 Assume { Type: is_sint32(a) /\ is_sint32(x). }
474 Prove: (((P_Px(x) -> P_Qx(x))) /\ (((!P_Px(x)) -> P_Rx(x)))) <->
475 (((P_Px(x) -> P_Qx(a))) /\ (((!P_Px(x)) -> P_Rx(x)))).
476
477 ------------------------------------------------------------
478
479 Goal Post-condition 'ko,l_precedence_let_ite' in 'predicate':
480 Assume { Type: is_sint32(a) /\ is_sint32(x). }
481 Prove: (((P_Px(x) -> P_Qx(x))) /\ (((!P_Px(x)) -> P_Rx(x)))) <->
482 (((P_Px(x) -> P_Qx(x))) /\ (((!P_Px(x)) -> P_Rx(a)))).
483
484 ------------------------------------------------------------
485
486 Goal Post-condition 'r_assoc_let' in 'predicate':
487 Prove: true.
488
489 ------------------------------------------------------------
490
491 Goal Post-condition 'scope_let' in 'predicate':
492 Prove: true.
493
494 ------------------------------------------------------------
495
496 Goal Post-condition 'scope_let' in 'predicate':
497 Prove: true.
498
499 ------------------------------------------------------------
500
501 Goal Post-condition 'ko,l_assoc_naming' in 'predicate':
502 Prove: (((P_P -> P_R)) /\ (((!P_P) -> P_S))) <->
503 (((P_P -> P_Q)) /\ (((!P_P) -> P_S))).
504
505 ------------------------------------------------------------
506
507 Goal Post-condition 'r_precedence_ite_naming' in 'predicate':
508 Prove: true.
509
510 ------------------------------------------------------------
511 ------------------------------------------------------------
512 Function predicate_bitwise
513 ------------------------------------------------------------
514
515 Goal Post-condition 'r_precedence_equiv_Pand' in 'predicate_bitwise':
516 Prove: true.
517
518 ------------------------------------------------------------
519
520 Goal Post-condition 'l_precedence_equiv_Pand' in 'predicate_bitwise':
521 Prove: true.
522
523 ------------------------------------------------------------
524 /* Generated by Frama-C */
525 /*@
526 axiomatic Pred {
527 predicate P;
528
529 predicate Q;
530
531 predicate R;
532
533 predicate S;
534
535 predicate U;
536
537 }
538 */
539 /*@
540 axiomatic PredX {
541 predicate Px(ℤ x) ;
542
543 predicate Qx(ℤ x) ;
544
545 predicate Rx(ℤ x) ;
546
547 }
548 */
549 /*@
550 axiomatic PredXY {
551 predicate Pxy(ℤ x, ℤ y) ;
552
553 predicate Qxy(ℤ x, ℤ y) ;
554
555 }
556 */
557 /*@ ensures r_precedence_and_xor: (P ∧ Q) ⊻ R ⇔ (P ∧ Q) ⊻ R;
558 ensures l_precedence_and_xor: P ⊻ (Q ∧ R) ⇔ P ⊻ (Q ∧ R);
559 ensures ko: l_precedence_xor_and: (P ∧ Q) ⊻ R ⇔ P ∧ (Q ⊻ R);
560 ensures ko: r_precedence_xor_and: P ⊻ (Q ∧ R) ⇔ (P ⊻ Q) ∧ R;
561 ensures r_precedence_xor_or: (P ⊻ Q) ∨ R ⇔ (P ⊻ Q) ∨ R;
562 ensures l_precedence_xor_or: P ∨ (Q ⊻ R) ⇔ P ∨ (Q ⊻ R);
563 ensures ko: l_precedence_or_xor: (P ⊻ Q) ∨ R ⇔ P ⊻ (Q ∨ R);
564 ensures ko: r_precedence_or_xor: P ∨ (Q ⊻ R) ⇔ (P ∨ Q) ⊻ R;
565 ensures r_precedence_or_implies: P ∨ Q ⇒ R ⇔ P ∨ Q ⇒ R;
566 ensures l_precedence_or_implies: P ⇒ Q ∨ R ⇔ P ⇒ Q ∨ R;
567 ensures ko: l_precedence_implies_or: P ∨ Q ⇒ R ⇔ P ∨ (Q ⇒ R);
568 ensures ok: r_precedence_implies_or: P ⇒ Q ∨ R ⇔ (P ⇒ Q) ∨ R;
569 ensures ok: since: (P ⇒ Q) ∨ R ⇔ (P ⇒ Q) ∨ R;
570 ensures r_assoc_implies: P ⇒ Q ⇒ R ⇔ P ⇒ Q ⇒ R;
571 ensures ko: l_assoc_implies: P ⇒ Q ⇒ R ⇔ (P ⇒ Q) ⇒ R;
572 ensures r_precedence_implies_equiv: P ⇒ Q ⇔ R ⇔ P ⇒ Q ⇔ R;
573 ensures l_precedence_implies_equiv: P ⇔ Q ⇒ R ⇔ P ⇔ Q ⇒ R;
574 ensures
575 ko: r_precedence_equiv_implies: P ⇒ Q ⇔ R ⇔ P ⇒ (Q ⇔ R);
576 ensures
577 ko: l_precedence_equiv_implies: P ⇔ Q ⇒ R ⇔ (P ⇔ Q) ⇒ R;
578 ensures
579 r_precedence_equiv_ite:
580 ((P ⇔ Q) ⇒ R) ∧ (¬(P ⇔ Q) ⇒ S) ⇔
581 ((P ⇔ Q) ⇒ R) ∧ (¬(P ⇔ Q) ⇒ S);
582 ensures
583 m_precedence_equiv_ite:
584 (P ⇒ (Q ⇔ R)) ∧ (¬P ⇒ S) ⇔
585 (P ⇒ (Q ⇔ R)) ∧ (¬P ⇒ S);
586 ensures
587 l_precedence_equiv_ite:
588 (P ⇒ Q) ∧ (¬P ⇒ (R ⇔ S)) ⇔
589 (P ⇒ Q) ∧ (¬P ⇒ (R ⇔ S));
590 ensures
591 ko: r_precedence_ite_equiv:
592 ((P ⇔ Q) ⇒ R) ∧ (¬(P ⇔ Q) ⇒ S) ⇔
593 P ⇔ (Q ⇒ R) ∧ (¬Q ⇒ S);
594 ensures
595 ko: l_precedence_ite_equiv:
596 (P ⇒ Q) ∧ (¬P ⇒ (R ⇔ S)) ⇔ (P ⇒ Q) ∧ (¬P ⇒ R) ⇔ S;
597 ensures
598 r_assoc_ite:
599 (P ⇒ Q) ∧ (¬P ⇒ (R ⇒ S) ∧ (¬R ⇒ U)) ⇔
600 (P ⇒ Q) ∧ (¬P ⇒ (R ⇒ S) ∧ (¬R ⇒ U));
601 ensures
602 ko: l_assoc_ite:
603 (P ⇒ Q) ∧ (¬P ⇒ (R ⇒ S) ∧ (¬R ⇒ U)) ⇔
604 ((P ⇒ Q) ∧ (¬P ⇒ R) ⇒ S) ∧
605 (¬((P ⇒ Q) ∧ (¬P ⇒ R)) ⇒ U);
606 ensures
607 r_precedence_ite_forall:
608 (∀ ℤ x; (Px(x) ⇒ Qx(x)) ∧ (¬Px(x) ⇒ Rx(x))) ⇔
609 (∀ ℤ y; (Px(y) ⇒ Qx(y)) ∧ (¬Px(y) ⇒ Rx(y)));
610 ensures
611 m_precedence_ite_forall:
612 (Px(\old(x)) ⇒ (∀ ℤ x; Qx(x))) ∧
613 (¬Px(\old(x)) ⇒ Rx(\old(x))) ⇔
614 (Px(\old(x)) ⇒ (∀ ℤ y; Qx(y))) ∧
615 (¬Px(\old(x)) ⇒ Rx(\old(x)));
616 ensures
617 l_precedence_ite_forall:
618 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
619 (¬Px(\old(x)) ⇒ (∀ ℤ x; Rx(x))) ⇔
620 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
621 (¬Px(\old(x)) ⇒ (∀ ℤ y; Rx(y)));
622 ensures
623 ko: r_precedence_forall_ite:
624 (∀ ℤ x; (Px(x) ⇒ Qx(x)) ∧ (¬Px(x) ⇒ Rx(x))) ⇔
625 ((∀ ℤ y; Px(y)) ⇒ Qx(\old(x))) ∧
626 (¬(∀ ℤ y; Px(y)) ⇒ Rx(\old(x)));
627 ensures
628 ko: m_precedence_forall_ite:
629 (Px(\old(x)) ⇒ (∀ ℤ x; Qx(x))) ∧
630 (¬Px(\old(x)) ⇒ Rx(\old(x))) ⇔
631 (Px(\old(x)) ⇒ (∀ ℤ y; Qx(\old(x)))) ∧
632 (¬Px(\old(x)) ⇒ Rx(\old(x)));
633 ensures
634 ko: l_precedence_forall_ite:
635 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
636 (¬Px(\old(x)) ⇒ (∀ ℤ x; Rx(x))) ⇔
637 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
638 (¬Px(\old(x)) ⇒ (∀ ℤ y; Rx(\old(x))));
639 ensures
640 r_assoc_forall:
641 (∀ ℤ x; ∀ ℤ x; Pxy(x, x)) ⇔ (∀ ℤ x; Pxy(x, x));
642 ensures
643 ko: r_assoc_forall:
644 (∀ ℤ x; ∀ ℤ y; Pxy(x, y)) ⇔ (∀ ℤ x; Pxy(x, x));
645 ensures
646 r_precedence_ite_exists:
647 (∃ ℤ x; (Px(x) ⇒ Qx(x)) ∧ (¬Px(x) ⇒ Rx(x))) ⇔
648 (∃ ℤ y; (Px(y) ⇒ Qx(y)) ∧ (¬Px(y) ⇒ Rx(y)));
649 ensures
650 m_precedence_ite_exists:
651 (Px(\old(x)) ⇒ (∃ ℤ x; Qx(x))) ∧
652 (¬Px(\old(x)) ⇒ Rx(\old(x))) ⇔
653 (Px(\old(x)) ⇒ (∃ ℤ y; Qx(y))) ∧
654 (¬Px(\old(x)) ⇒ Rx(\old(x)));
655 ensures
656 l_precedence_ite_exists:
657 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
658 (¬Px(\old(x)) ⇒ (∃ ℤ x; Rx(x))) ⇔
659 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
660 (¬Px(\old(x)) ⇒ (∃ ℤ y; Rx(y)));
661 ensures
662 ko: r_precedence_exists_ite:
663 (∃ ℤ x; (Px(x) ⇒ Qx(x)) ∧ (¬Px(x) ⇒ Rx(x))) ⇔
664 ((∃ ℤ y; Px(y)) ⇒ Qx(\old(x))) ∧
665 (¬(∃ ℤ y; Px(y)) ⇒ Rx(\old(x)));
666 ensures
667 ko: m_precedence_exists_ite:
668 (Px(\old(x)) ⇒ (∃ ℤ x; Qx(x))) ∧
669 (¬Px(\old(x)) ⇒ Rx(\old(x))) ⇔
670 (Px(\old(x)) ⇒ (∃ ℤ y; Qx(\old(x)))) ∧
671 (¬Px(\old(x)) ⇒ Rx(\old(x)));
672 ensures
673 ko: l_precedence_exists_ite:
674 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
675 (¬Px(\old(x)) ⇒ (∃ ℤ x; Rx(x))) ⇔
676 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
677 (¬Px(\old(x)) ⇒ (∃ ℤ y; Rx(\old(x))));
678 ensures
679 r_assoc_exist:
680 (∃ ℤ x; ∃ ℤ x; Pxy(x, x)) ⇔ (∃ ℤ x; Pxy(x, x));
681 ensures
682 ko: r_assoc_exist:
683 (∃ ℤ x; ∃ ℤ y; Pxy(x, y)) ⇔ (∃ ℤ x; Pxy(x, x));
684 ensures
685 r_precedence_ite_let:
686 (\let x = \old(a); (Px(x) ⇒ Qx(x)) ∧ (¬Px(x) ⇒ Rx(x))) ⇔
687 (\let y = \old(a); (Px(y) ⇒ Qx(y)) ∧ (¬Px(y) ⇒ Rx(y)));
688 ensures
689 m_precedence_ite_let:
690 (Px(\old(x)) ⇒ (\let x = \old(a); Qx(x))) ∧
691 (¬Px(\old(x)) ⇒ Rx(\old(x))) ⇔
692 (Px(\old(x)) ⇒ (\let y = \old(a); Qx(y))) ∧
693 (¬Px(\old(x)) ⇒ Rx(\old(x)));
694 ensures
695 l_precedence_ite_let:
696 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
697 (¬Px(\old(x)) ⇒ (\let x = \old(a); Rx(x))) ⇔
698 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
699 (¬Px(\old(x)) ⇒ (\let y = \old(a); Rx(y)));
700 ensures
701 ko: r_precedence_let_ite:
702 (\let x = \old(a); (Px(x) ⇒ Qx(x)) ∧ (¬Px(x) ⇒ Rx(x))) ⇔
703 ((\let y = \old(a); Px(y)) ⇒ Qx(\old(x))) ∧
704 (¬(\let y = \old(a); Px(y)) ⇒ Rx(\old(x)));
705 ensures
706 ko: m_precedence_let_ite:
707 (Px(\old(x)) ⇒ (\let x = \old(a); Qx(x))) ∧
708 (¬Px(\old(x)) ⇒ Rx(\old(x))) ⇔
709 (Px(\old(x)) ⇒ (\let y = \old(a); Qx(\old(x)))) ∧
710 (¬Px(\old(x)) ⇒ Rx(\old(x)));
711 ensures
712 ko: l_precedence_let_ite:
713 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
714 (¬Px(\old(x)) ⇒ (\let x = \old(a); Rx(x))) ⇔
715 (Px(\old(x)) ⇒ Qx(\old(x))) ∧
716 (¬Px(\old(x)) ⇒ (\let y = \old(a); Rx(\old(x))));
717 ensures
718 r_assoc_let:
719 (\let x = \old(a); \let x = \old(b); Pxy(x, x)) ⇔
720 (\let x = \old(b); Pxy(x, x));
721 ensures
722 scope_let:
723 (\let x = \old(a); \let x = x + 1; Px(x)) ⇔ Px(\old(a) + 1);
724 ensures
725 scope_let:
726 (\let x = \old(x); \let y = x + 1; Pxy(x, y)) ⇔
727 Pxy(\old(x), \old(x) + 1);
728 ensures
729 ko: l_assoc_naming:
730 (P ⇒ Q) ∧ (¬P ⇒ (R: S)) ⇔ (P ⇒ (Q: R)) ∧ (¬P ⇒ S);
731 ensures
732 r_precedence_ite_naming:
733 (P ⇒ Q) ∧ (¬P ⇒ (R: S)) ⇔ (P ⇒ Q) ∧ (¬P ⇒ (R: S));
734 */
735 void predicate(int x, int a, int b)
736 {
737 return;
738 }
739
740 /*@ ensures
741 chainable_lt_lt:
742 \old(p) < \old(q) < \old(r) ⇔ \old(p) < \old(q) < \old(r);
743 ensures
744 chainable_le_le:
745 \old(p) ≤ \old(q) ≤ \old(r) ⇔ \old(p) ≤ \old(q) ≤ \old(r);
746 ensures
747 chainable_gt_gt:
748 \old(p) > \old(q) > \old(r) ⇔ \old(p) > \old(q) > \old(r);
749 ensures
750 chainable_ge_ge:
751 \old(p) ≥ \old(q) ≥ \old(r) ⇔ \old(p) ≥ \old(q) ≥ \old(r);
752 ensures
753 chainable_eq_eq:
754 \old(p) ≡ \old(q) ≡ \old(r) ⇔ \old(p) ≡ \old(q) ≡ \old(r);
755 ensures
756 r_precedence_eq_and:
757 \old(p) ≡ \old(q) ∧ R ⇔ \old(p) ≡ \old(q) ∧ R;
758 ensures
759 l_precedence_eq_and:
760 P ∧ \old(q) ≡ \old(r) ⇔ P ∧ \old(q) ≡ \old(r);
761 ensures
762 ko: r_precedence_and_eq:
763 \old(p) ≡ \old(q) ∧ \old(r) ≢ 0 ⇔
764 (\old(p) ≢ 0) ≡ (\old(q) ≢ 0 ∧ \old(r) ≢ 0);
765 ensures
766 ko: l_precedence_and_eq:
767 \old(p) ≢ 0 ∧ \old(q) ≡ \old(r) ⇔
768 (\old(p) ≢ 0 ∧ \old(q) ≢ 0) ≡ (\old(r) ≢ 0);
769 ensures
770 ko: l_nonassoc_eq:
771 \old(p) ≡ \old(q) ≡ \old(r) ⇔
772 (\old(p) ≡ \old(q)) ≡ (\old(r) ≢ 0);
773 ensures
774 ko: r_nonassoc_eq:
775 \old(p) ≡ \old(q) ≡ \old(r) ⇔
776 (\old(p) ≢ 0) ≡ (\old(q) ≡ \old(r));
777 ensures
778 r_precedence_neq_and:
779 \old(p) ≢ \old(q) ∧ R ⇔ \old(p) ≢ \old(q) ∧ R;
780 ensures
781 l_precedence_neq_and:
782 P ∧ \old(q) ≢ \old(r) ⇔ P ∧ \old(q) ≢ \old(r);
783 ensures
784 ko: r_precedence_and_neq:
785 \old(p) ≢ \old(q) ∧ \old(r) ≢ 0 ⇔
786 (\old(p) ≢ 0) ≢ (\old(q) ≢ 0 ∧ \old(r) ≢ 0);
787 ensures
788 ko: l_precedence_and_neq:
789 \old(p) ≢ 0 ∧ \old(q) ≢ \old(r) ⇔
790 (\old(p) ≢ 0 ∧ \old(q) ≢ 0) ≢ (\old(r) ≢ 0);
791 */
792 void comparison(int p, int q, int r)
793 {
794 return;
795 }
796
797 /*@ ensures
798 r_precedence_and_xor:
799 ((\old(p) & \old(q)) ^ \old(r)) ≡ ((\old(p) & \old(q)) ^ \old(r));
800 ensures
801 l_precedence_and_xor:
802 (\old(p) ^ (\old(q) & \old(r))) ≡ (\old(p) ^ (\old(q) & \old(r)));
803 ensures
804 ko: l_precedence_xor_and:
805 ((\old(p) & \old(q)) ^ \old(r)) ≡ (\old(p) & (\old(q) ^ \old(r)));
806 ensures
807 ko: r_precedence_xor_and:
808 (\old(p) ^ (\old(q) & \old(r))) ≡ ((\old(p) ^ \old(q)) & \old(r));
809 ensures
810 r_precedence_xor_or:
811 ((\old(p) ^ \old(q)) | \old(r)) ≡ ((\old(p) ^ \old(q)) | \old(r));
812 ensures
813 l_precedence_xor_or:
814 (\old(p) | (\old(q) ^ \old(r))) ≡ (\old(p) | (\old(q) ^ \old(r)));
815 ensures
816 ko: l_precedence_or_xor:
817 ((\old(p) ^ \old(q)) | \old(r)) ≡ (\old(p) ^ (\old(q) | \old(r)));
818 ensures
819 ko: r_precedence_or_xor:
820 (\old(p) | (\old(q) ^ \old(r))) ≡ ((\old(p) | \old(q)) ^ \old(r));
821 ensures
822 r_precedence_or_implies:
823 (~(\old(p) | \old(q)) | \old(r)) ≡ (~(\old(p) | \old(q)) | \old(r));
824 ensures
825 l_precedence_or_implies:
826 (~\old(p) | (\old(q) | \old(r))) ≡ (~\old(p) | (\old(q) | \old(r)));
827 ensures
828 ko: l_precedence_implies_or:
829 (~(\old(p) | \old(q)) | \old(r)) ≡ (\old(p) | (~\old(q) | \old(r)));
830 ensures
831 ok: r_precedence_implies_or:
832 (~\old(p) | (\old(q) | \old(r))) ≡ ((~\old(p) | \old(q)) | \old(r));
833 ensures
834 ok: since:
835 ((~\old(p) | \old(q)) | \old(r)) ≡ ((~\old(p) | \old(q)) | \old(r));
836 ensures
837 r_assoc_implies:
838 (~\old(p) | (~\old(q) | \old(r))) ≡
839 (~\old(p) | (~\old(q) | \old(r)));
840 ensures
841 ko: l_assoc_implies:
842 (~\old(p) | (~\old(q) | \old(r))) ≡
843 (~(~\old(p) | \old(q)) | \old(r));
844 ensures
845 r_precedence_implies_equiv:
846 (~(~\old(p) | \old(q)) ^ \old(r)) ≡
847 (~(~\old(p) | \old(q)) ^ \old(r));
848 ensures
849 l_precedence_implies_equiv:
850 (~\old(p) ^ (~\old(q) | \old(r))) ≡
851 (~\old(p) ^ (~\old(q) | \old(r)));
852 ensures
853 ko: r_precedence_equiv_implies:
854 (~(~\old(p) | \old(q)) ^ \old(r)) ≡
855 (~\old(p) | (~\old(q) ^ \old(r)));
856 ensures
857 ko: l_precedence_equiv_implies:
858 (~\old(p) ^ (~\old(q) | \old(r))) ≡
859 (~(~\old(p) ^ \old(q)) | \old(r));
860 */
861 void bitwise(int p, int q, int r)
862 {
863 return;
864 }
865
866 /*@ ensures
867 r_precedence_equiv_Pand:
868 (~\old(p) ^ \old(q)) ≢ 0 ∧ R ⇔ (~\old(p) ^ \old(q)) ≢ 0 ∧ R;
869 ensures
870 l_precedence_equiv_Pand:
871 P ∧ (~\old(q) ^ \old(r)) ≢ 0 ⇔ P ∧ (~\old(q) ^ \old(r)) ≢ 0;
872 */
873 void predicate_bitwise(int p, int q, int r)
874 {
875 return;
876 }
877
878