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 - problem with an example
- Subject: [Frama-c-discuss] Jessie - problem with an example
- From: virgile.prevosto at cea.fr (Virgile Prevosto)
- Date: Wed, 9 Sep 2009 11:09:37 +0200
- In-reply-to: <42050C88D59E144CA358159FF0E6018B09056D@TITAN.first.fraunhofer.de>
- References: <42050C88D59E144CA358159FF0E6018B09056D@TITAN.first.fraunhofer.de>
Hello Kerstin, Le mer. 09 sept. 2009 10:31:23 CEST, "Kerstin Hartig" <kerstin.hartig at first.fraunhofer.de> a ?crit : > behavior yes: > assumes data->a <= data->b + 10; > assigns data->b; > ensures data->b <= data->a; > */ > void refresh(struct MyData* data) I guess your issue lies here: there is no post-condition saying that data->b is positive. We only know that it is less than or equal to data->a (By the way, your indentation is a bit misleading: the ensures relates only to the behavior 'yes', not to all behaviors). It is thus not possible to conclude that data->b is positive in the main loop after the call to refresh. Remember that function calls are seen as some kind of black box and that the only things which are known outside of the function body are the clauses of the contract. -- Virgile Prevosto Ing?nieur-Chercheur, CEA, LIST Laboratoire de S?ret? des Logiciels +33/0 1 69 08 71 83
- Follow-Ups:
- [Frama-c-discuss] Jessie - problem with an example
- From: kerstin.hartig at first.fraunhofer.de (Kerstin Hartig)
- [Frama-c-discuss] Jessie - problem with an example
- References:
- [Frama-c-discuss] Jessie - problem with an example
- From: kerstin.hartig at first.fraunhofer.de (Kerstin Hartig)
- [Frama-c-discuss] Jessie - problem with an example
- Prev by Date: [Frama-c-discuss] Jessie - problem with an example
- Next by Date: [Frama-c-discuss] Jessie - problem with an example
- Previous by thread: [Frama-c-discuss] Jessie - problem with an example
- Next by thread: [Frama-c-discuss] Jessie - problem with an example
- Index(es):