1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
[kernel] Parsing share/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/value/bug0196.c (with preprocessing)
[value] Analyzing a complete application starting at main
[value] Computing initial state
[value] Initial state computed
[value:initial-state] Values of globals at initialization
[value] computing for function fact <- main.
Called from tests/value/bug0196.c:16.
tests/value/bug0196.c:7:[value] entering loop for the first time
tests/value/bug0196.c:8:[value] assertion got status valid.
tests/value/bug0196.c:11:[value] cannot evaluate ACSL term, \at() on a C label is unsupported
tests/value/bug0196.c:11:[value] warning: assertion got status unknown.
tests/value/bug0196.c:10:[value] warning: signed overflow. assert r * tmp ≤ 2147483647;
(tmp from n--)
[value] Recording results for fact
[value] Done for function fact
[value] Recording results for main
[value] done for function main
[value] ====== VALUES COMPUTED ======
[value:final-states] Values at end of function fact:
n ∈ {0}
r ∈ [1..2147483647]
[value:final-states] Values at end of function main:
[from] Computing for function fact
[from] Done for function fact
[from] Computing for function main
[from] Done for function main
[from] ====== DEPENDENCIES COMPUTED ======
These dependencies hold at termination for the executions that terminate:
[from] Function fact:
\result FROM n
[from] Function main:
\result FROM \nothing
[from] ====== END OF DEPENDENCIES ======
[inout] Out (internal) for function fact:
n; r; tmp
[inout] Inputs for function fact:
\nothing
[inout] Out (internal) for function main:
tmp
[inout] Inputs for function main:
\nothing
/* Generated by Frama-C */
int fact(int n)
{
int r;
r = 1;
while (n > 0) {
int tmp;
/*@ assert n > 0; */ ;
before:
{ /* sequence */
tmp = n;
n --;
/*@ assert Value: signed_overflow: r * tmp ≤ 2147483647; */
r *= tmp;
}
/*@ assert r ≡ \at(r * n,before); */ ;
}
while_0_break: ;
return r;
}
int main(void)
{
int tmp;
tmp = fact(3);
return tmp;
}
|