--- layout: fc_discuss_archives title: Message 41 from Frama-C-discuss on January 2009 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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