Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Unable to prove the example code in ACSL documentation


2014-10-23 10:12 GMT+02:00 gg lee <georgeleeliangwei at>:

> int x;
> //@ ghost int* const ghost_ptr_x = &x;
> //@ assigns x;
> int g()
> {
>     return x;
> }
> //@ assigns *ghost_ptr_x;
> int f(int x) {
>     // ...
>     return g();
> }
> surprisingly I am not able to prove the code completely. Please help me on
> this as I have been stuck on this for a few days. Thanks.

Lo?c's answer explains how ACSL should be extended to deal with your
issue. However, if we go back to your concrete example, my guess is
that you're just missing the -wp-init-const option on the command
line, that tells WP to assume that global const variables always have
their initial values (const specifier is so easily abused that this
option is not on by default).

Best regards,
E tutto per oggi, a la prossima volta