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] wp <==> problem


  • Subject: [Frama-c-discuss] wp <==> problem
  • From: Claude.Marche at inria.fr (Claude Marche)
  • Date: Wed, 13 Jul 2011 12:10:35 +0200
  • In-reply-to: <CAE6MND50AYmUrv3TZ7XSNqDTww90LEJZQ=LREZcAs3NotgHf-A@mail.gmail.com>
  • References: <CAE6MND50AYmUrv3TZ7XSNqDTww90LEJZQ=LREZcAs3NotgHf-A@mail.gmail.com>

Hi,

On 13/07/2011 11:50, mars Gu wrote:
> Hi,
>
> i find a problem with the wp plugin in Frama-C, whose version is "Frama-C
> Carbon-20110201+dev".
> I start Frama-C with the following command: "frama-c-gui -wp  -wp-proof
> alt-ergo binary_search2.c &".
>
> In the file " binary_search2.c",  Frama-c can prove  line 46,47,49, but
> line 51.
> If line 46,46,49 can be proved, line 51 should be proved.
> Because if
> 1:a<==>b
> 2:b<==>c
> 3:( a<==>b && b<==>c) ==> (a<==>c)
> is true, then
> 4: a<==>c
> should also be true.


Your b in 1 and in 2 are not the same: please be careful with "<=" 
versus "<"

Generally speaking, I don't think you need to use so many <==> in 
specifications. See for example

http://proval.lri.fr/gallery/BinarySearchACSL.en.html

for a correct ASL-annotated binary search function

- Claude