| 1 |
# frama-c -wp [...] |
| 2 |
[kernel] Parsing decreases.i (no preprocessing) |
| 3 |
[wp] Running WP plugin... |
| 4 |
[wp] Warning: Missing RTE guards |
| 5 |
[wp:hypothesis] decreases.i:44: Warning: 'Rel' relation must be well-founded |
| 6 |
[wp:hypothesis] decreases.i:25: Warning: 'Rel' relation must be well-founded |
| 7 |
[wp:hypothesis] decreases.i:30: Warning: 'Rel' relation must be well-founded |
| 8 |
[wp] decreases.i:71: Warning: No decreases clause for missing_2 |
| 9 |
[wp:hypothesis] decreases.i:107: Warning: 'Wrong' relation must be well-founded |
| 10 |
[wp] decreases.i:109: Warning: |
| 11 |
On call to mw1, relation (Wrong) does not match caller (Rel) |
| 12 |
[wp:hypothesis] decreases.i:103: Warning: 'Rel' relation must be well-founded |
| 13 |
[wp] decreases.i:105: Warning: |
| 14 |
On call to mw2, relation (Rel) does not match caller (Wrong) |
| 15 |
------------------------------------------------------------ |
| 16 |
Function fact |
| 17 |
------------------------------------------------------------ |
| 18 |
|
| 19 |
Goal Termination-condition (file decreases.i, line 14) in 'fact': |
| 20 |
Prove: true. |
| 21 |
|
| 22 |
------------------------------------------------------------ |
| 23 |
|
| 24 |
Goal Recursion variant: |
| 25 |
Call Effect at line 17 |
| 26 |
Assume { Type: is_uint32(n). (* Else *) Have: n != 0. } |
| 27 |
Prove: (0 <= n) /\ (to_uint32(n - 1) < n). |
| 28 |
|
| 29 |
------------------------------------------------------------ |
| 30 |
------------------------------------------------------------ |
| 31 |
Function fact_i |
| 32 |
------------------------------------------------------------ |
| 33 |
|
| 34 |
Goal Termination-condition (file decreases.i, line 37) in 'fact_i' (1/2): |
| 35 |
Prove: true. |
| 36 |
|
| 37 |
------------------------------------------------------------ |
| 38 |
|
| 39 |
Goal Termination-condition (file decreases.i, line 37) in 'fact_i' (2/2): |
| 40 |
Call Effect at line 40 |
| 41 |
Assume { |
| 42 |
Type: is_sint32(n). |
| 43 |
(* Goal *) |
| 44 |
When: 0 <= n. |
| 45 |
(* Else *) |
| 46 |
Have: n != 0. |
| 47 |
} |
| 48 |
Prove: 0 < n. |
| 49 |
|
| 50 |
------------------------------------------------------------ |
| 51 |
|
| 52 |
Goal Recursion variant: |
| 53 |
Call Effect at line 40 |
| 54 |
Prove: true. |
| 55 |
|
| 56 |
------------------------------------------------------------ |
| 57 |
------------------------------------------------------------ |
| 58 |
Function facto_gen |
| 59 |
------------------------------------------------------------ |
| 60 |
|
| 61 |
Goal Recursion variant: |
| 62 |
Call Effect at line 27 |
| 63 |
Assume { Type: is_uint32(n). (* Else *) Have: n != 0. } |
| 64 |
Prove: P_Rel(n, to_uint32(n - 1)). |
| 65 |
|
| 66 |
------------------------------------------------------------ |
| 67 |
------------------------------------------------------------ |
| 68 |
Function fails_fact |
| 69 |
------------------------------------------------------------ |
| 70 |
|
| 71 |
Goal Recursion variant: |
| 72 |
Call Effect at line 22 |
| 73 |
Assume { Type: is_uint32(n). (* Else *) Have: n != 0. } |
| 74 |
Prove: false. |
| 75 |
|
| 76 |
------------------------------------------------------------ |
| 77 |
------------------------------------------------------------ |
| 78 |
Function fails_fact_i |
| 79 |
------------------------------------------------------------ |
| 80 |
|
| 81 |
Goal Termination-condition (file decreases.i, line 43) in 'fails_fact_i' (1/2): |
| 82 |
Prove: true. |
| 83 |
|
| 84 |
------------------------------------------------------------ |
| 85 |
|
| 86 |
Goal Termination-condition (file decreases.i, line 43) in 'fails_fact_i' (2/2): |
| 87 |
Call Effect at line 46 |
| 88 |
Assume { |
| 89 |
Type: is_sint32(n). |
| 90 |
(* Goal *) |
| 91 |
When: (-1) <= n. |
| 92 |
(* Else *) |
| 93 |
Have: n != 0. |
| 94 |
} |
| 95 |
Prove: 0 <= n. |
| 96 |
|
| 97 |
------------------------------------------------------------ |
| 98 |
|
| 99 |
Goal Recursion variant: |
| 100 |
Call Effect at line 46 |
| 101 |
Assume { |
| 102 |
Type: is_sint32(n). |
| 103 |
(* Goal *) |
| 104 |
When: (-1) <= n. |
| 105 |
(* Else *) |
| 106 |
Have: n != 0. |
| 107 |
} |
| 108 |
Prove: P_Rel(n, n - 1). |
| 109 |
|
| 110 |
------------------------------------------------------------ |
| 111 |
------------------------------------------------------------ |
| 112 |
Function fails_facto_gen |
| 113 |
------------------------------------------------------------ |
| 114 |
|
| 115 |
Goal Recursion variant: |
| 116 |
Call Effect at line 32 |
| 117 |
Assume { Type: is_uint32(n). (* Else *) Have: n != 0. } |
| 118 |
Prove: P_Rel(n, n). |
| 119 |
|
| 120 |
------------------------------------------------------------ |
| 121 |
------------------------------------------------------------ |
| 122 |
Function m1 |
| 123 |
------------------------------------------------------------ |
| 124 |
|
| 125 |
Goal Recursion variant: |
| 126 |
Call Effect at line 55 |
| 127 |
Assume { Type: is_uint32(n). (* Then *) Have: n != 0. } |
| 128 |
Prove: (0 <= n) /\ (to_uint32(n - 1) < n). |
| 129 |
|
| 130 |
------------------------------------------------------------ |
| 131 |
------------------------------------------------------------ |
| 132 |
Function m2 |
| 133 |
------------------------------------------------------------ |
| 134 |
|
| 135 |
Goal Recursion variant (1/2): |
| 136 |
Call Effect at line 59 |
| 137 |
Assume { Type: is_uint32(x). (* Then *) Have: x != 0. } |
| 138 |
Prove: (0 <= x) /\ (to_uint32(x - 1) < x). |
| 139 |
|
| 140 |
------------------------------------------------------------ |
| 141 |
|
| 142 |
Goal Recursion variant (2/2): |
| 143 |
Call Effect at line 60 |
| 144 |
Assume { Type: is_uint32(x). (* Then *) Have: 11 <= x. } |
| 145 |
Prove: (0 <= x) /\ (to_uint32(x - 1) < x). |
| 146 |
|
| 147 |
------------------------------------------------------------ |
| 148 |
------------------------------------------------------------ |
| 149 |
Function missing |
| 150 |
------------------------------------------------------------ |
| 151 |
|
| 152 |
Goal Recursion variant (1/2): |
| 153 |
Call Effect at line 71 |
| 154 |
decreases.i:71: warning from wp: |
| 155 |
- Warning: Considering non decreasing call, looking for context inconsistency |
| 156 |
Reason: No decreases clause for missing_2 |
| 157 |
Assume { Type: is_uint32(n). (* Then *) Have: n != 0. } |
| 158 |
Prove: false. |
| 159 |
|
| 160 |
------------------------------------------------------------ |
| 161 |
|
| 162 |
Goal Recursion variant (2/2): |
| 163 |
Call Effect at line 72 |
| 164 |
Assume { Type: is_uint32(n). (* Then *) Have: 31 <= n. } |
| 165 |
Prove: (0 <= n) /\ (to_uint32(n - 1) < n). |
| 166 |
|
| 167 |
------------------------------------------------------------ |
| 168 |
------------------------------------------------------------ |
| 169 |
Function mt1 |
| 170 |
------------------------------------------------------------ |
| 171 |
|
| 172 |
Goal Termination-condition (file decreases.i, line 83) in 'mt1' (1/2): |
| 173 |
Prove: true. |
| 174 |
|
| 175 |
------------------------------------------------------------ |
| 176 |
|
| 177 |
Goal Termination-condition (file decreases.i, line 83) in 'mt1' (2/2): |
| 178 |
Call Effect at line 86 |
| 179 |
Assume { Type: is_uint32(n). (* Then *) Have: n != 0. } |
| 180 |
Prove: to_uint32(n - 1) <= 10. |
| 181 |
|
| 182 |
------------------------------------------------------------ |
| 183 |
|
| 184 |
Goal Recursion variant: |
| 185 |
Call Effect at line 86 |
| 186 |
Assume { Type: is_uint32(n). (* Then *) Have: n != 0. } |
| 187 |
Prove: (0 <= n) /\ (to_uint32(n - 1) < n). |
| 188 |
|
| 189 |
------------------------------------------------------------ |
| 190 |
------------------------------------------------------------ |
| 191 |
Function mt2 |
| 192 |
------------------------------------------------------------ |
| 193 |
|
| 194 |
Goal Termination-condition (file decreases.i, line 88) in 'mt2' (1/2): |
| 195 |
Prove: true. |
| 196 |
|
| 197 |
------------------------------------------------------------ |
| 198 |
|
| 199 |
Goal Termination-condition (file decreases.i, line 88) in 'mt2' (2/2): |
| 200 |
Call Effect at line 92 |
| 201 |
Prove: true. |
| 202 |
|
| 203 |
------------------------------------------------------------ |
| 204 |
|
| 205 |
Goal Recursion variant (1/2): |
| 206 |
Call Effect at line 91 |
| 207 |
Assume { |
| 208 |
Type: is_uint32(x). |
| 209 |
(* Goal *) |
| 210 |
When: x <= 10. |
| 211 |
(* Then *) |
| 212 |
Have: x != 0. |
| 213 |
} |
| 214 |
Prove: (0 <= x) /\ (to_uint32(x - 1) < x). |
| 215 |
|
| 216 |
------------------------------------------------------------ |
| 217 |
|
| 218 |
Goal Recursion variant (2/2): |
| 219 |
Call Effect at line 92 |
| 220 |
Prove: true. |
| 221 |
|
| 222 |
------------------------------------------------------------ |
| 223 |
------------------------------------------------------------ |
| 224 |
Function mw1 |
| 225 |
------------------------------------------------------------ |
| 226 |
|
| 227 |
Goal Recursion variant: |
| 228 |
Call Effect at line 105 |
| 229 |
decreases.i:105: warning from wp: |
| 230 |
- Warning: Considering non decreasing call, looking for context inconsistency |
| 231 |
Reason: On call to mw2, relation (Rel) does not match caller (Wrong) |
| 232 |
Assume { Type: is_uint32(n). (* Then *) Have: n != 0. } |
| 233 |
Prove: false. |
| 234 |
|
| 235 |
------------------------------------------------------------ |
| 236 |
------------------------------------------------------------ |
| 237 |
Function mw2 |
| 238 |
------------------------------------------------------------ |
| 239 |
|
| 240 |
Goal Recursion variant (1/2): |
| 241 |
Call Effect at line 109 |
| 242 |
decreases.i:109: warning from wp: |
| 243 |
- Warning: Considering non decreasing call, looking for context inconsistency |
| 244 |
Reason: On call to mw1, relation (Wrong) does not match caller (Rel) |
| 245 |
Assume { Type: is_uint32(x). (* Then *) Have: x != 0. } |
| 246 |
Prove: false. |
| 247 |
|
| 248 |
------------------------------------------------------------ |
| 249 |
|
| 250 |
Goal Recursion variant (2/2): |
| 251 |
Call Effect at line 110 |
| 252 |
Assume { Type: is_uint32(x). (* Then *) Have: 11 <= x. } |
| 253 |
Prove: P_Wrong(x, to_uint32(x - 1)). |
| 254 |
|
| 255 |
------------------------------------------------------------ |
| 256 |
------------------------------------------------------------ |
| 257 |
Function se |
| 258 |
------------------------------------------------------------ |
| 259 |
|
| 260 |
Goal Recursion variant: |
| 261 |
Call Effect at line 123 |
| 262 |
Prove: true. |
| 263 |
|
| 264 |
------------------------------------------------------------ |