| 1 |
# frama-c -wp [...] |
| 2 |
[kernel] Parsing terminates_formulae.i (no preprocessing) |
| 3 |
[wp] Running WP plugin... |
| 4 |
[wp] Warning: Missing RTE guards |
| 5 |
[wp:hypothesis] terminates_formulae.i:84: Warning: |
| 6 |
'Rel' relation must be well-founded |
| 7 |
[wp:hypothesis] terminates_formulae.i:67: Warning: |
| 8 |
'Rel' relation must be well-founded |
| 9 |
[wp] [CFG] Goal general_variant_terminates : Valid (Trivial) |
| 10 |
[wp] [CFG] Goal variant_terminates : Valid (Trivial) |
| 11 |
[wp] terminates_formulae.i:90: Warning: |
| 12 |
No 'decreases' clause on recursive function 'no_decreases', cannot prove termination |
| 13 |
------------------------------------------------------------ |
| 14 |
Function base_call |
| 15 |
------------------------------------------------------------ |
| 16 |
|
| 17 |
Goal Termination-condition (file terminates_formulae.i, line 22) in 'base_call': |
| 18 |
Call Effect at line 24 |
| 19 |
Assume { (* Heap *) Type: is_sint32(a). (* Goal *) When: P_Q. } |
| 20 |
Prove: P_P(a). |
| 21 |
|
| 22 |
------------------------------------------------------------ |
| 23 |
------------------------------------------------------------ |
| 24 |
Function call_change |
| 25 |
------------------------------------------------------------ |
| 26 |
|
| 27 |
Goal Termination-condition (file terminates_formulae.i, line 32) in 'call_change': |
| 28 |
Call Effect at line 35 |
| 29 |
Assume { (* Heap *) Type: is_sint32(a). (* Goal *) When: P_P(a). } |
| 30 |
Prove: P_P(0). |
| 31 |
|
| 32 |
------------------------------------------------------------ |
| 33 |
------------------------------------------------------------ |
| 34 |
Function call_param_change |
| 35 |
------------------------------------------------------------ |
| 36 |
|
| 37 |
Goal Termination-condition (file terminates_formulae.i, line 48) in 'call_param_change': |
| 38 |
Call Effect at line 51 |
| 39 |
Let x = Mint_0[p]. |
| 40 |
Assume { |
| 41 |
Type: is_sint32(x). |
| 42 |
(* Heap *) |
| 43 |
Type: region(p.base) <= 0. |
| 44 |
(* Goal *) |
| 45 |
When: x != 0. |
| 46 |
} |
| 47 |
Prove: false. |
| 48 |
|
| 49 |
------------------------------------------------------------ |
| 50 |
------------------------------------------------------------ |
| 51 |
Function call_param_same |
| 52 |
------------------------------------------------------------ |
| 53 |
|
| 54 |
Goal Termination-condition (file terminates_formulae.i, line 43) in 'call_param_same': |
| 55 |
Call Effect at line 45 |
| 56 |
Prove: true. |
| 57 |
|
| 58 |
------------------------------------------------------------ |
| 59 |
------------------------------------------------------------ |
| 60 |
Function call_same |
| 61 |
------------------------------------------------------------ |
| 62 |
|
| 63 |
Goal Termination-condition (file terminates_formulae.i, line 27) in 'call_same': |
| 64 |
Call Effect at line 29 |
| 65 |
Prove: true. |
| 66 |
|
| 67 |
------------------------------------------------------------ |
| 68 |
------------------------------------------------------------ |
| 69 |
Function decreases |
| 70 |
------------------------------------------------------------ |
| 71 |
|
| 72 |
Goal Termination-condition (file terminates_formulae.i, line 77) in 'decreases': |
| 73 |
Prove: true. |
| 74 |
|
| 75 |
------------------------------------------------------------ |
| 76 |
|
| 77 |
Goal Recursion variant: |
| 78 |
Call Effect at line 80 |
| 79 |
Assume { Type: is_uint32(n). (* Goal *) When: P_Q. (* Then *) Have: n != 0. } |
| 80 |
Prove: (0 <= n) /\ (to_uint32(n - 1) < n). |
| 81 |
|
| 82 |
------------------------------------------------------------ |
| 83 |
------------------------------------------------------------ |
| 84 |
Function general_decreases |
| 85 |
------------------------------------------------------------ |
| 86 |
|
| 87 |
Goal Termination-condition (file terminates_formulae.i, line 83) in 'general_decreases': |
| 88 |
Prove: true. |
| 89 |
|
| 90 |
------------------------------------------------------------ |
| 91 |
|
| 92 |
Goal Recursion variant: |
| 93 |
Call Effect at line 86 |
| 94 |
Assume { Type: is_uint32(n). (* Goal *) When: P_Q. (* Then *) Have: n != 0. } |
| 95 |
Prove: P_Rel(n, to_uint32(n - 1)). |
| 96 |
|
| 97 |
------------------------------------------------------------ |
| 98 |
------------------------------------------------------------ |
| 99 |
Function general_variant |
| 100 |
------------------------------------------------------------ |
| 101 |
|
| 102 |
Goal Loop assigns (file terminates_formulae.i, line 66): |
| 103 |
Prove: true. |
| 104 |
|
| 105 |
------------------------------------------------------------ |
| 106 |
|
| 107 |
Goal Follows relation Loop variant at loop (file terminates_formulae.i, line 68): |
| 108 |
Assume { Type: is_uint32(x). (* Goal *) When: P_Q. (* Then *) Have: 0 < x. } |
| 109 |
Prove: P_Rel(x, to_uint32(x - 1)). |
| 110 |
|
| 111 |
------------------------------------------------------------ |
| 112 |
------------------------------------------------------------ |
| 113 |
Function no_decreases |
| 114 |
------------------------------------------------------------ |
| 115 |
|
| 116 |
Goal Termination-condition (file terminates_formulae.i, line 89) in 'no_decreases' (1/2): |
| 117 |
Prove: true. |
| 118 |
|
| 119 |
------------------------------------------------------------ |
| 120 |
|
| 121 |
Goal Termination-condition (file terminates_formulae.i, line 89) in 'no_decreases' (2/2): |
| 122 |
Call Result at line 92 |
| 123 |
Prove: false. |
| 124 |
|
| 125 |
------------------------------------------------------------ |
| 126 |
------------------------------------------------------------ |
| 127 |
Function no_variant |
| 128 |
------------------------------------------------------------ |
| 129 |
|
| 130 |
Goal Termination-condition (file terminates_formulae.i, line 71) in 'no_variant': |
| 131 |
Effect at line 74 |
| 132 |
Prove: !P_Q. |
| 133 |
|
| 134 |
------------------------------------------------------------ |
| 135 |
|
| 136 |
Goal Loop assigns (file terminates_formulae.i, line 73): |
| 137 |
Prove: true. |
| 138 |
|
| 139 |
------------------------------------------------------------ |
| 140 |
------------------------------------------------------------ |
| 141 |
Function variant |
| 142 |
------------------------------------------------------------ |
| 143 |
|
| 144 |
Goal Loop assigns (file terminates_formulae.i, line 56): |
| 145 |
Prove: true. |
| 146 |
|
| 147 |
------------------------------------------------------------ |
| 148 |
|
| 149 |
Goal Decreasing of Loop variant at loop (file terminates_formulae.i, line 59): |
| 150 |
Assume { Type: is_uint32(i). (* Goal *) When: P_Q. (* Then *) Have: 0 < i. } |
| 151 |
Prove: to_uint32(i - 1) < i. |
| 152 |
|
| 153 |
------------------------------------------------------------ |
| 154 |
|
| 155 |
Goal Positivity of Loop variant at loop (file terminates_formulae.i, line 59): |
| 156 |
Prove: true. |
| 157 |
|
| 158 |
------------------------------------------------------------ |