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] Problem with ACSL annotations

Hello Initisar,

Yes, It is a good idea to look at ACSL tutorial recommended by Jens.

But, just looking at these two lines of your previous mail :
> This new version is verifiable:
> ensures \exists int e; 0<=e && (\forall int i; 0<=i<15 && e > queue[i]) && ( (e >= 5) || (e >= 10) ) ==> \result == 0;
I can see that you didn't fully understand the answer of Virgile.

That ensures is almost equivalent to:
  ensures false ==> what_ever;
This is always true what ever does your code!

The ensures of your first mail is almost equivalent to
   ensures what_ever ==> false;
A function doing the impossible can be compliant with this specification.
That is difficult to implement!
An alternative is to implement a function which doesn't terminate (while(true);).
I guess your code is not like that.

So, in addition to the tutorial, look again more carefully at the answer of Virgile.
That should help you in understanding why your specification is equivalent to what I say.


Patrick Baudin, DILS/LSL, B?t. 862,
Point Courrier n? 174
CEA Saclay Nano-INNOV,
91191 Gif-sur-Yvette cedex, France.
tel: +33 (0)1 6908 2072