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] annotations and value analysis
- Subject: [Frama-c-discuss] annotations and value analysis
- From: stephane.duprat at atosorigin.com (Stephane DUPRAT)
- Date: Thu, 21 Jan 2010 15:20:32 +0100
- In-reply-to: <0D5A0133-3275-40EC-ABC2-4D674A8C3E3F@cea.fr>
- References: <1264073651.20367.22.camel@valin.toulouse.it.atosorigin.com> <0D5A0133-3275-40EC-ABC2-4D674A8C3E3F@cea.fr>
Ok, Good news. Thank you for improving this great tool! I understand that it works fine with global vars and it will be working soon with \result. I guess it will be same with output parameters of the function (gest_index(int cmd, int* pindex). Can you confirm ? And what about annotation on declaration of the function without definition ? Using annotation on a declaration function without definition could be very valuable. It could avoid us making some stubs for some function API that we don't have source code. What is your opinion ? regards, St?phane Pascal Cuoq a ?crit : > Hello, St?phane, > >> 1/ does requires are checked by the value analysis considering the >> calling context ? >> 2/ does requires are hypothesis for the body of the function ? >> 3/ does the ensures are checked by the value analysis ? >> 4/ does the ensures of a called function are taken into account for >> the analysis of the caller ? >> Using the tool, I would answer yes for all except for 4/. > > In fact, it is "yes" for all 4 in the development version > of Frama-C. On the other hand, the value analysis > does not yet support \result in post-conditions. > > Changing your example thus: > > int R; > > /*@ > @ requires 0<=cmd<5; > @ ensures 0<=\result<200; > @ ensures 0 <= R < 200 ; > @*/ > int get_index(int /* in */ cmd) > { > int v = cmd; > int ret = (unsigned int)Frama_C_interval(0,1000); > R = ret; > return ret; > } > > void main(x) > { > get_index(x); > return R; > } > > you get: > > [value] Values for function main: > R ? [0..199] > > Part of the restructuration necessary to handle \result > in post-conditions has already been done, but it is > not complete at this time. > > Pascal > -- ----------------------------------------------- Stephane DUPRAT Innovation et Bureau m?thode R?gion Midi-Pyr?n?es - Agence de Toulouse 6 Impasse Alice Guy B.P. 43045 31024 - Toulouse Cedex 03 T?l : 05 34 36 32 78 Fax : 05 34 36 31 00 mailto :stephane.duprat at atosorigin.com ======================================================================= Ce message electronique est confidentiel. Il peut contenir des informations protegees par le secret professionnel, le secret de fabrication ou autres regles legales. Si vous recevez ce message par erreur, il vous est interdit de le reproduire ou de le distribuer en tout ou en partie, ou de le divulguer de quelque maniere que ce soit a quelque personne que ce soit. Nous vous prions de bien vouloir en informer Atos Origin, par telephone ou par retour d'e-mail puis de detruire le message et toutes copies de votre systeme informatique. Le contenu de ce message ne reflete pas necessairement ni les opinions d'Atos Origin ni celle des membres de son groupe. Bien que l'emetteur de ce message ait fait tout son possible pour maintenir son systeme informatique sans virus, il ne peut garantir que cette transmission ne comporte aucun virus et il ne pourra etre tenu pour responsable de quelque dommage que ce soit resultant de la transmission d'un virus. ======================================================================= This electronic transmission is confidential. It may contain information that is covered by legal professional privilege, work product immunity or other legal rules. If you have received this transmission in error, you must not copy or distribute this message or any part of it or otherwise disclose its contents to anyone. Please notify Atos Origin Legal Services by telephone or return E-mail, and then delete this transmission and any copies of it from your computer system. The views expressed in this electronic transmission do not necessarily reflect those of Atos Origin SA or any member of its group. Although the sender endeavours to maintain a computer virus free network, the sender does not warrant that this transmission is virus free and will not be liable for any damages resulting from any virus transmitted. =======================================================================
- Follow-Ups:
- [Frama-c-discuss] annotations and value analysis
- From: Pascal.Cuoq at cea.fr (Pascal Cuoq)
- [Frama-c-discuss] annotations and value analysis
- References:
- [Frama-c-discuss] annotations and value analysis
- From: stephane.duprat at atosorigin.com (Stéphane Duprat)
- [Frama-c-discuss] annotations and value analysis
- From: Pascal.Cuoq at cea.fr (Pascal Cuoq)
- [Frama-c-discuss] annotations and value analysis
- Prev by Date: [Frama-c-discuss] annotations and value analysis
- Next by Date: [Frama-c-discuss] annotations and value analysis
- Previous by thread: [Frama-c-discuss] annotations and value analysis
- Next by thread: [Frama-c-discuss] annotations and value analysis
- Index(es):