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: Local variables leading to
- Subject: [Frama-c-discuss] Jessie: Local variables leading to
- From: Claude.Marche at inria.fr (Claude Marche)
- Date: Mon, 18 Oct 2010 09:18:16 +0200
- In-reply-to: <2098318039.131518.1287333300127.JavaMail.root@zmbs1.inria.fr>
- References: <201010171700.49736.mueller@uni-trier.de> <AANLkTimedC0EbbRomeYC9e3qPyF4WX3qckFRCEtKEXec@mail.gmail.com> <2098318039.131518.1287333300127.JavaMail.root@zmbs1.inria.fr>
Hi, Changing the contract of my_changes into /*@ requires \valid(s); assigns s->i; ensures s->i == s->j; */ would probably be better. Generaly rule of thumb: Jessie does not support well direct structures, it is better to mention only pointers to structures. About the failure when separation analysis is on: yes, I'm afraid this analysis has bugs when taking adresses of local variables. - Claude On 10/17/2010 06:35 PM, Pascal Cuoq wrote: > #pragma SeparationPolicy(none) > > typedef struct _my_type {int i; int j;} my_type; > > /*@ > requires \valid(s); > assigns (*s); > ensures s->i == \old(s->j); > */ > void my_changes (my_type* s){s->i = s->j;}; > > /*@ > assigns \result; > ensures \result == n; > */ > int my_main (int n){ > my_type t; > t.j=n; > my_changes(&t); > return t.i; > } > -- 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 |
- Follow-Ups:
- [Frama-c-discuss] Jessie: Local variables leading to
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- [Frama-c-discuss] Jessie: Local variables leading to
- References:
- [Frama-c-discuss] Jessie: Local variables leading to
- From: mueller at uni-trier.de (Norbert Müller)
- [Frama-c-discuss] Jessie: Local variables leading to
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- [Frama-c-discuss] Jessie: Local variables leading to
- Prev by Date: [Frama-c-discuss] a value analysis case studie
- Next by Date: [Frama-c-discuss] Jessie: Local variables leading to
- Previous by thread: [Frama-c-discuss] Jessie: Local variables leading to
- Next by thread: [Frama-c-discuss] Jessie: Local variables leading to
- Index(es):