| 1 |
# frama-c -wp [...] |
| 2 |
[kernel] Parsing unit_bit_test.c (with preprocessing) |
| 3 |
[wp] Running WP plugin... |
| 4 |
[wp] Warning: Missing RTE guards |
| 5 |
------------------------------------------------------------ |
| 6 |
Function rotate_left |
| 7 |
------------------------------------------------------------ |
| 8 |
|
| 9 |
Goal Post-condition 'bit_zero' in 'rotate_left': |
| 10 |
Prove: true. |
| 11 |
|
| 12 |
------------------------------------------------------------ |
| 13 |
|
| 14 |
Goal Post-condition 'other_bits' in 'rotate_left': |
| 15 |
Let x_1 = lsr(x, 31). |
| 16 |
Assume { |
| 17 |
Type: is_uint32(x) /\ is_uint32(x_1). |
| 18 |
(* Goal *) |
| 19 |
When: (0 <= i) /\ (i <= 30). |
| 20 |
} |
| 21 |
Prove: (land(lor(x_1, to_uint32(lsl(x, 1))), lsl(1, 1 + i)) != 0) <-> |
| 22 |
(land(x, lsl(1, i)) != 0). |
| 23 |
|
| 24 |
------------------------------------------------------------ |
| 25 |
------------------------------------------------------------ |
| 26 |
Function sum |
| 27 |
------------------------------------------------------------ |
| 28 |
|
| 29 |
Goal Post-condition 'ok' in 'sum': |
| 30 |
Prove: true. |
| 31 |
|
| 32 |
------------------------------------------------------------ |
| 33 |
|
| 34 |
Goal Post-condition 'ko' in 'sum': |
| 35 |
Assume { Type: is_sint8(a) /\ is_sint8(b). } |
| 36 |
Prove: (bit_test(a, 1) \/ bit_test(b, 1)) <-> |
| 37 |
(bit_test(a, 1) /\ bit_test(b, 1)). |
| 38 |
|
| 39 |
------------------------------------------------------------ |