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: assigns needed to prove function contract?
- Subject: [Frama-c-discuss] WP: assigns needed to prove function contract?
- From: dmentre at linux-france.org (David MENTRE)
- Date: Tue, 10 Sep 2013 08:23:46 +0200
- In-reply-to: <144F3E63-8728-4B79-A483-4F6444C5AB9A@cea.fr>
- References: <CAC3Lx=YTKV0RzY7RvsEKJ5fSjJJV_=G2wepgd9pjheFcRcOfGQ@mail.gmail.com> <144F3E63-8728-4B79-A483-4F6444C5AB9A@cea.fr>
Hello Lo?c, 2013/9/9 Lo?c Correnson <loic.correnson at cea.fr>: > However, modifying [v] at each loop that your loop invariant are to weak : they do not relate a[..] values with the v at the Pre state of the function, but with the current value of v at each loop iteration. > > But, the value of v occurring in the post state is the one of the formal parameter, aka \at(v,Pre). > The same remark applies to variables a and n. > > You can add the following invariants : > > loop invariant n == \at(n,Pre); > loop invariant a == \at(a,Pre); > loop invariant v == \at(v,Pre); > > to make your post-conditions provable, even with a missing loop assigns clause. Thank you for the clear explanation. > Jessie makes this kind of analysis and the (non-distributed) plugin GenAssigns infer missing assigns clauses like those. Maybe it would be interesting for WP to gain such capabilities, at least from a user point of view. ;-) Or maybe you have some use case in mind that need some manual writing of loop assigns. Sincerely yours, david
- Follow-Ups:
- [Frama-c-discuss] WP: assigns needed to prove function contract?
- From: loic.correnson at cea.fr (Loïc Correnson)
- [Frama-c-discuss] WP: assigns needed to prove function contract?
- References:
- [Frama-c-discuss] WP: assigns needed to prove function contract?
- From: dmentre at linux-france.org (David MENTRE)
- [Frama-c-discuss] WP: assigns needed to prove function contract?
- From: loic.correnson at cea.fr (Loïc Correnson)
- [Frama-c-discuss] WP: assigns needed to prove function contract?
- Prev by Date: [Frama-c-discuss] WP: assigns needed to prove function contract?
- Next by Date: [Frama-c-discuss] Proving a simple property on bitshift with WP
- Previous by thread: [Frama-c-discuss] WP: assigns needed to prove function contract?
- Next by thread: [Frama-c-discuss] WP: assigns needed to prove function contract?
- Index(es):