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: Pascal.Cuoq at cea.fr (Pascal Cuoq)
- Date: Thu, 21 Jan 2010 12:56:56 +0100
- In-reply-to: <1264073651.20367.22.camel@valin.toulouse.it.atosorigin.com>
- References: <1264073651.20367.22.camel@valin.toulouse.it.atosorigin.com>
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 -------------- section suivante -------------- Une pi?ce jointe HTML a ?t? enlev?e... URL: http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20100121/503c4b6c/attachment.htm
- Follow-Ups:
- [Frama-c-discuss] annotations and value analysis
- From: stephane.duprat at atosorigin.com (Stephane DUPRAT)
- [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
- 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):