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] Jessie question
- Subject: [Frama-c-discuss] Jessie question
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- Date: Wed, 28 Apr 2010 09:58:23 +0200
- In-reply-to: <E1426B89-CED2-4816-8643-AB4651E84917@di.uminho.pt>
- References: <E1426B89-CED2-4816-8643-AB4651E84917@di.uminho.pt>
Hello, On Wed, Apr 28, 2010 at 1:01 AM, Jorge Sousa Pinto <jsp at di.uminho.pt> wrote: > /*@ requires \valid(c); > ?@ ensures *c == 10 && y == 20; > ?@*/ > void q(int *c) > { > ?y = 20; > ?*c = 10; > } > > The program is proved correct with my installation of Frama-C, but now > suppose the precondition is strengthened as follows > > /*@ requires \valid(c) && c==&y; > ?@ ensures *c == 10 && y == 20; > ?@*/ > void q(int *c) > { > ?y = 20; > ?*c = 10; > } > > Now the postcondition cannot be discharged, as expected. But doesn't this > mean that the first program should not be considered correct? I hear that some of the information in this old thread is now obsolete: http://lists.gforge.inria.fr/pipermail/frama-c-discuss/2009-March/000958.html The basic fact remains that it is technically impossible to say anything at all about a C function that manipulates pointers without any hypotheses. Jessie will make these hypotheses on its own (but it will force you to prove that they apply at the call site). Although you have written the same preconditions, Jessie is not using the same hypotheses in your two examples. I think that in the first one it is assuming that you mean c and &y to be separated since you didn't specify anything. But I may have misunderstood how the new behavior works. Pascal
- Follow-Ups:
- [Frama-c-discuss] Jessie question
- From: Claude.Marche at inria.fr (Claude Marche)
- [Frama-c-discuss] Jessie question
- References:
- [Frama-c-discuss] Jessie question
- From: jsp at di.uminho.pt (Jorge Sousa Pinto)
- [Frama-c-discuss] Jessie question
- Prev by Date: [Frama-c-discuss] Jessie question
- Next by Date: [Frama-c-discuss] Jessie question
- Previous by thread: [Frama-c-discuss] Jessie question
- Next by thread: [Frama-c-discuss] Jessie question
- Index(es):