| 1 |
# frama-c -wp [...] |
| 2 |
[kernel] Parsing pointer.i (no preprocessing) |
| 3 |
[wp] Running WP plugin... |
| 4 |
[wp] Warning: Missing RTE guards |
| 5 |
[wp] pointer.i:50: Warning: Uncomparable locations p_0 and mem:t.(0) |
| 6 |
[wp] pointer.i:49: Warning: Uncomparable locations p_0 and mem:t.(0) |
| 7 |
[wp] pointer.i:48: Warning: Uncomparable locations p_0 and mem:t.(0) |
| 8 |
[wp] pointer.i:47: Warning: Uncomparable locations p_0 and mem:t.(0) |
| 9 |
[wp] pointer.i:46: Warning: Uncomparable locations p_0 and mem:t.(0) |
| 10 |
[wp] pointer.i:45: Warning: Uncomparable locations p_0 and mem:t.(0) |
| 11 |
------------------------------------------------------------ |
| 12 |
Function absurd |
| 13 |
------------------------------------------------------------ |
| 14 |
|
| 15 |
Goal Post-condition 'qed_ko,Base_oracle_ko' in 'absurd': |
| 16 |
Assume { |
| 17 |
(* Heap *) |
| 18 |
Type: (region(G_t_21) <= 0) /\ (region(q.base) <= 0). |
| 19 |
(* Goal *) |
| 20 |
When: q.offset < p.offset. |
| 21 |
(* Pre-condition *) |
| 22 |
Have: p.base = G_t_21. |
| 23 |
} |
| 24 |
Prove: addr_lt(q, p). |
| 25 |
|
| 26 |
------------------------------------------------------------ |
| 27 |
|
| 28 |
Goal Post-condition 'qed_ko,Comp_oracle_ko' in 'absurd': |
| 29 |
Assume { |
| 30 |
(* Heap *) |
| 31 |
Type: region(G_t_21) <= 0. |
| 32 |
(* Goal *) |
| 33 |
When: i_1 <= i. |
| 34 |
(* Pre-condition *) |
| 35 |
Have: p.base = G_t_21. |
| 36 |
} |
| 37 |
Prove: i <= i_1. |
| 38 |
|
| 39 |
------------------------------------------------------------ |
| 40 |
------------------------------------------------------------ |
| 41 |
Function array |
| 42 |
------------------------------------------------------------ |
| 43 |
|
| 44 |
Goal Post-condition 'Lt' in 'array': |
| 45 |
Prove: true. |
| 46 |
|
| 47 |
------------------------------------------------------------ |
| 48 |
|
| 49 |
Goal Post-condition 'Le' in 'array': |
| 50 |
Prove: true. |
| 51 |
|
| 52 |
------------------------------------------------------------ |
| 53 |
|
| 54 |
Goal Post-condition 'Eq' in 'array': |
| 55 |
Prove: true. |
| 56 |
|
| 57 |
------------------------------------------------------------ |
| 58 |
------------------------------------------------------------ |
| 59 |
Function compare |
| 60 |
------------------------------------------------------------ |
| 61 |
|
| 62 |
Goal Post-condition 'qed_ok,Lt' in 'compare': |
| 63 |
Let x = q.base. |
| 64 |
Let x_1 = p.base. |
| 65 |
Assume { |
| 66 |
(* Heap *) |
| 67 |
Type: (region(x_1) <= 0) /\ (region(x) <= 0). |
| 68 |
(* Goal *) |
| 69 |
When: q.offset < p.offset. |
| 70 |
(* Pre-condition *) |
| 71 |
Have: x = x_1. |
| 72 |
} |
| 73 |
Prove: addr_lt(q, p). |
| 74 |
|
| 75 |
------------------------------------------------------------ |
| 76 |
|
| 77 |
Goal Post-condition 'qed_ok,Le' in 'compare': |
| 78 |
Let x = q.base. |
| 79 |
Let x_1 = p.base. |
| 80 |
Assume { |
| 81 |
(* Heap *) |
| 82 |
Type: (region(x_1) <= 0) /\ (region(x) <= 0). |
| 83 |
(* Goal *) |
| 84 |
When: q.offset <= p.offset. |
| 85 |
(* Pre-condition *) |
| 86 |
Have: x = x_1. |
| 87 |
} |
| 88 |
Prove: addr_le(q, p). |
| 89 |
|
| 90 |
------------------------------------------------------------ |
| 91 |
|
| 92 |
Goal Post-condition 'qed_ok,Eq' in 'compare': |
| 93 |
Let x = q.base. |
| 94 |
Let x_1 = p.base. |
| 95 |
Assume { |
| 96 |
(* Heap *) |
| 97 |
Type: (region(x_1) <= 0) /\ (region(x) <= 0). |
| 98 |
(* Goal *) |
| 99 |
When: q.offset = p.offset. |
| 100 |
(* Pre-condition *) |
| 101 |
Have: x = x_1. |
| 102 |
} |
| 103 |
Prove: q = p. |
| 104 |
|
| 105 |
------------------------------------------------------------ |
| 106 |
------------------------------------------------------------ |
| 107 |
Function mixed_array_pointer |
| 108 |
------------------------------------------------------------ |
| 109 |
|
| 110 |
Goal Post-condition 'qed_ok,Lt' in 'mixed_array_pointer': |
| 111 |
pointer.i:45: warning from Reference Variable Model: |
| 112 |
- Warning: Hide sub-term definition |
| 113 |
Reason: Uncomparable locations p_0 and mem:t.(0) |
| 114 |
Assume { |
| 115 |
(* Heap *) |
| 116 |
Type: region(G_t_21) <= 0. |
| 117 |
(* Goal *) |
| 118 |
When: 0 < w. |
| 119 |
(* Pre-condition *) |
| 120 |
Have: p.base = G_t_21. |
| 121 |
} |
| 122 |
Prove: addr_lt(shift_sint32(global(G_t_21), 0), p). |
| 123 |
|
| 124 |
------------------------------------------------------------ |
| 125 |
|
| 126 |
Goal Post-condition 'qed_ok,Le' in 'mixed_array_pointer': |
| 127 |
pointer.i:46: warning from Reference Variable Model: |
| 128 |
- Warning: Hide sub-term definition |
| 129 |
Reason: Uncomparable locations p_0 and mem:t.(0) |
| 130 |
Assume { |
| 131 |
(* Heap *) |
| 132 |
Type: region(G_t_21) <= 0. |
| 133 |
(* Goal *) |
| 134 |
When: 0 <= w. |
| 135 |
(* Pre-condition *) |
| 136 |
Have: p.base = G_t_21. |
| 137 |
} |
| 138 |
Prove: addr_le(shift_sint32(global(G_t_21), 0), p). |
| 139 |
|
| 140 |
------------------------------------------------------------ |
| 141 |
|
| 142 |
Goal Post-condition 'qed_ok,Eq' in 'mixed_array_pointer': |
| 143 |
pointer.i:47: warning from Reference Variable Model: |
| 144 |
- Warning: Hide sub-term definition |
| 145 |
Reason: Uncomparable locations p_0 and mem:t.(0) |
| 146 |
Assume { |
| 147 |
(* Heap *) |
| 148 |
Type: region(G_t_21) <= 0. |
| 149 |
(* Pre-condition *) |
| 150 |
Have: p.base = G_t_21. |
| 151 |
} |
| 152 |
Prove: shift_sint32(global(G_t_21), 0) = p. |
| 153 |
|
| 154 |
------------------------------------------------------------ |
| 155 |
|
| 156 |
Goal Post-condition 'qed_ok,Ne' in 'mixed_array_pointer': |
| 157 |
pointer.i:48: warning from Reference Variable Model: |
| 158 |
- Warning: Hide sub-term definition |
| 159 |
Reason: Uncomparable locations p_0 and mem:t.(0) |
| 160 |
Assume { |
| 161 |
(* Heap *) |
| 162 |
Type: region(G_t_21) <= 0. |
| 163 |
(* Goal *) |
| 164 |
When: w != 0. |
| 165 |
(* Pre-condition *) |
| 166 |
Have: p.base = G_t_21. |
| 167 |
} |
| 168 |
Prove: shift_sint32(global(G_t_21), 0) != p. |
| 169 |
|
| 170 |
------------------------------------------------------------ |
| 171 |
|
| 172 |
Goal Post-condition 'qed_ko,Le_oracle_ko' in 'mixed_array_pointer': |
| 173 |
pointer.i:49: warning from Reference Variable Model: |
| 174 |
- Warning: Hide sub-term definition |
| 175 |
Reason: Uncomparable locations p_0 and mem:t.(0) |
| 176 |
Assume { |
| 177 |
(* Heap *) |
| 178 |
Type: region(G_t_21) <= 0. |
| 179 |
(* Goal *) |
| 180 |
When: 0 <= w. |
| 181 |
(* Pre-condition *) |
| 182 |
Have: p.base = G_t_21. |
| 183 |
} |
| 184 |
Prove: addr_lt(shift_sint32(global(G_t_21), 0), p). |
| 185 |
|
| 186 |
------------------------------------------------------------ |
| 187 |
|
| 188 |
Goal Post-condition 'qed_ko,Lt_oracle_ko' in 'mixed_array_pointer': |
| 189 |
pointer.i:50: warning from Reference Variable Model: |
| 190 |
- Warning: Hide sub-term definition |
| 191 |
Reason: Uncomparable locations p_0 and mem:t.(0) |
| 192 |
Assume { |
| 193 |
(* Heap *) |
| 194 |
Type: region(G_t_21) <= 0. |
| 195 |
(* Goal *) |
| 196 |
When: 0 < w. |
| 197 |
(* Pre-condition *) |
| 198 |
Have: p.base = G_t_21. |
| 199 |
} |
| 200 |
Prove: addr_le(p, shift_sint32(global(G_t_21), 0)). |
| 201 |
|
| 202 |
------------------------------------------------------------ |
| 203 |
------------------------------------------------------------ |
| 204 |
Function null |
| 205 |
------------------------------------------------------------ |
| 206 |
|
| 207 |
Goal Post-condition 'qed_ok,Bool' in 'null': |
| 208 |
Let x = int_of_addr(p). |
| 209 |
Assume { Type: is_sint32(x). (* Heap *) Type: region(p.base) <= 0. } |
| 210 |
Prove: (x != 0) <-> (null != p). |
| 211 |
|
| 212 |
------------------------------------------------------------ |
| 213 |
|
| 214 |
Goal Post-condition 'qed_ok,NotNull' in 'null': |
| 215 |
Let x = int_of_addr(p). |
| 216 |
Assume { |
| 217 |
Type: is_sint32(x). |
| 218 |
(* Heap *) |
| 219 |
Type: region(p.base) <= 0. |
| 220 |
(* Goal *) |
| 221 |
When: null != p. |
| 222 |
} |
| 223 |
Prove: x != 0. |
| 224 |
|
| 225 |
------------------------------------------------------------ |
| 226 |
|
| 227 |
Goal Post-condition 'qed_ok,IsNull' in 'null': |
| 228 |
Prove: true. |
| 229 |
|
| 230 |
------------------------------------------------------------ |
| 231 |
------------------------------------------------------------ |
| 232 |
Function pointer |
| 233 |
------------------------------------------------------------ |
| 234 |
|
| 235 |
Goal Post-condition 'qed_ok,Lt' in 'pointer': |
| 236 |
Prove: true. |
| 237 |
|
| 238 |
------------------------------------------------------------ |
| 239 |
|
| 240 |
Goal Post-condition 'qed_ok,Le' in 'pointer': |
| 241 |
Prove: true. |
| 242 |
|
| 243 |
------------------------------------------------------------ |
| 244 |
|
| 245 |
Goal Post-condition 'qed_ok,Eq' in 'pointer': |
| 246 |
Prove: true. |
| 247 |
|
| 248 |
------------------------------------------------------------ |
| 249 |
|
| 250 |
Goal Post-condition 'qed_ok,Eq_0' in 'pointer': |
| 251 |
Prove: true. |
| 252 |
|
| 253 |
------------------------------------------------------------ |
| 254 |
|
| 255 |
Goal Post-condition 'qed_ok,Eq_0_bis' in 'pointer': |
| 256 |
Prove: true. |
| 257 |
|
| 258 |
------------------------------------------------------------ |
| 259 |
|
| 260 |
Goal Post-condition 'qed_ko,Le_oracle_ko' in 'pointer': |
| 261 |
Assume { (* Goal *) When: i <= i_1. } |
| 262 |
Prove: i < i_1. |
| 263 |
|
| 264 |
------------------------------------------------------------ |
| 265 |
|
| 266 |
Goal Post-condition 'qed_ko,Eq_oracle_ko' in 'pointer': |
| 267 |
Prove: false. |
| 268 |
|
| 269 |
------------------------------------------------------------ |
| 270 |
[wp] pointer.i:63: Warning: |
| 271 |
Memory model hypotheses for function 'compare': |
| 272 |
/*@ behavior wp_typed: |
| 273 |
requires \separated(q + (..), &p); */ |
| 274 |
void compare(int *q); |
| 275 |
[wp] pointer.i:73: Warning: |
| 276 |
Memory model hypotheses for function 'absurd': |
| 277 |
/*@ behavior wp_typed: |
| 278 |
requires \separated(q + (..), &p); */ |
| 279 |
void absurd(int *q); |