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: not_assigns and mutable parameter
- Subject: [Frama-c-discuss] Frama-C/Jessie: not_assigns and mutable parameter
- From: Claude.Marche at inria.fr (Claude Marche)
- Date: Wed, 15 Jul 2009 17:25:11 +0200
- In-reply-to: <A6FD74D4A6DA4247AD801E394363406303756F9F@sctex002.st-cloud.dassault-avion.fr>
- References: <A6FD74D4A6DA4247AD801E394363406303756F9F@sctex002.st-cloud.dassault-avion.fr>
Pariente Dillon wrote: > Hello, > > Please, what is wrong with this annotated code for which the default > behavior post-condition PO can not be discharged by Jessie/Why/ATPs (a > mutable_p var seems to be unexploitable in the hypotheses): > /*@ requires \valid(p) && \valid(q); > assigns *\at(p,Post),p; > */ > int main1(int* p,int* q) { p = q; *p = 1; return 1; } > A general rule: function parameters are not modifiable l-values from the caller's point of view. In other words, the caller cannot see that the implementation uses p as a modifiable local variable. In the contract: /*@ requires \valid(p) && \valid(q); assigns *\at(p,Post),p; */ int main1(int* p,int* q) ; p is just a parameter and cannot be assigned. assigns p is useless. \at(p,Post) is the same as p. assigns *\at(p,Post) is wrong because equivalent to assigns *p - Claude -- Claude March? | tel: +33 1 72 92 59 69 INRIA Saclay - ?le-de-France | mobile: +33 6 33 14 57 93 Parc Orsay Universit? | fax: +33 1 74 85 42 29 4, rue Jacques Monod - B?timent N | http://www.lri.fr/~marche/ F-91893 ORSAY Cedex |
- References:
- [Frama-c-discuss] Frama-C/Jessie: not_assigns and mutable parameter
- From: Dillon.Pariente at dassault-aviation.com (Pariente Dillon)
- [Frama-c-discuss] Frama-C/Jessie: not_assigns and mutable parameter
- Prev by Date: [Frama-c-discuss] Frama-C/Jessie: not_assigns and mutable parameter
- Next by Date: [Frama-c-discuss] How to compil Frama-C with an existing Why installation
- Previous by thread: [Frama-c-discuss] Frama-C/Jessie: not_assigns and mutable parameter
- Next by thread: [Frama-c-discuss] Problems with division in lemmas
- Index(es):