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: Jean-Christophe.Filliatre at (Jean-Christophe Filliâtre)
  • Date: Fri, 23 Jan 2009 13:05:10 +0100
  • In-reply-to: <004301c97d4e$73532640$59f972c0$@com>
  • References: <004301c97d4e$73532640$59f972c0$@com>

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,