--- layout: fc_discuss_archives title: Message 43 from Frama-C-discuss on January 2009 ---
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