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 wp, when changing the position between "<==>"


  • Subject: [Frama-c-discuss] Problem with wp, when changing the position between "<==>"
  • From: loic.correnson at cea.fr (Loïc Correnson)
  • Date: Tue, 19 Jul 2011 13:48:00 +0200
  • In-reply-to: <CAE6MND5RCEcTjJH5iqYL+mWXBrqyuVvrHqpNUZvg+=jhOAStng@mail.gmail.com>
  • References: <CAE6MND5RCEcTjJH5iqYL+mWXBrqyuVvrHqpNUZvg+=jhOAStng@mail.gmail.com>

Hi,
It is actually a bug in the treatment of (<==>).
Thanks for the report. It is now corrected.
However, you should pay attention to the fact that, in your example,  
the WP will prove the second assertion thanks to the first one.
More generally, with the following piece of code :

//@ requires R ;
<Stmt>
//@ assert A ;
//@ assert B ;

WP generates 2 proof obilgations :
[1] proof obligation for A : R => <effects of Stmt> => A
[2] proof obilgation for B : R => <effects of Stmt> => A => B

The bug in your version makes A and B to be different, but without the  
bug, B <=> A and A => B is a tautology !

Regards,
	L.

Le 13 juil. 11 ? 15:40, mars Gu a ?crit :

> Hi,
>
> i really appreciate your help for the last problem about "<==>",  
> which is already solved.
>
> But when I continue to prove, a problem occurs, which makes me  
> confused.
> In the file "binary_search3.c",
> in line 46, "HasValue(a, n, val) <==> r;" can be proved by WP,
> while in line 47, " r <==> HasValue(a, n, val);" cannot.
>
> The only difference between line 46 and 47 is, that the left and the  
> right side is exchanged.
> It will be better, if WP can prove this specification.
>
>
> My Frama-C's Version is "Frama-C Carbon-20110201+dev".
> I start Frama-C with the following command:  "frama-c-gui -wp  -wp- 
> proof alt-ergo binary_search3.c &".
>
>
> Liangliang Gu
> <binary_search3.c>_______________________________________________
> Frama-c-discuss mailing list
> Frama-c-discuss at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20110719/04f9cc70/attachment.htm>