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] Frama-C / Jessie-Plugin


  • Subject: [Frama-c-discuss] Frama-C / Jessie-Plugin
  • From: barbaraisabelvieira at gmail.com (Bárbara Vieira)
  • Date: Fri, 23 Jan 2009 12:17:50 -0000
  • In-reply-to: <4979B276.6070406@lri.fr>
  • References: <004301c97d4e$73532640$59f972c0$@com> <4979B276.6070406@lri.fr>

Hi Jean-Christophe,

Thanks a lot, your help was precious :-)  
I did not realized that the if(i) could generate two branches! It makes sense. 
So using the option -fast-wp, only one branch is taken in account, is this correct?! 

Best regards,
B?rbara 

 

-----Original Message-----
From: frama-c-discuss-bounces at lists.gforge.inria.fr [mailto:frama-c-discuss-bounces at lists.gforge.inria.fr] On Behalf Of Jean-Christophe Filli?tre
Sent: sexta-feira, 23 de Janeiro de 2009 12:05
To: Frama-C public discussion
Subject: Re: [Frama-c-discuss] Frama-C / Jessie-Plugin

Hi B?rbara,

> In this code I don?t understand the proof-obligations that are generated
> related with the post-conditions too, because they seem to appear
> duplicated. Probably there is some inconsistence in the code, because
> the last proof-obligation is mysteriously proved using Simplify, and I
> don?t understand how it is provable.

The reason why you're observing VCs duplication is related to the
conditional if(i) in your program. Because of that, there are two
different paths to reach the assertion and the postcondition. Thus it
results in

- two VCs for the assertion

- and two VCs for the post-condition

But since you are using Why's option -split-user-conj, it results instead in

- 6 VCs for the assertion (because it is a conjunction of 3 atoms)

- and 4 VCs for the post-condition (because it is a conjunction of 2 atoms)

I guess Why is silently discharging the trivial VC i==0 in the case
where one does enter the loop (and thus where i==0). Consequently, it
finally makes 5 VCs for the assertion.

That said, you may want to avoid this duplication related to different
paths in the control-flow graph. To do that, add Why's option -fast-wp
(with -why-opt), which will make a more compact VC without duplication.

Hope this helps,
-- 
Jean-Christophe

_______________________________________________
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