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] WG: Label to refer to a state of the prior iteration
- Subject: [Frama-c-discuss] WG: Label to refer to a state of the prior iteration
- From: Claude.Marche at inria.fr (Claude Marche)
- Date: Thu, 09 Jul 2009 10:00:19 +0200
- In-reply-to: <42050C88D59E144CA358159FF0E6018B09055D@TITAN.first.fraunhofer.de>
- References: <AD320CBF59AF4406AD0FBD74C093F955@AHARDPLACE> <42050C88D59E144CA358159FF0E6018B09055D@TITAN.first.fraunhofer.de>
the "state in the previous iteration" for a loop invariant is not completely defined: it is meaningless at the first iteration. However, you might want to specifying properties where the initialization is unimportant. In such a case, you might succeeds by using ghost variables, e.g int i; //@ ghost int old_i; i = 0; /*@ loop invariant i > 0 ==> old_i == i -1; @*/ while (i < 10) { ... //@ ghost old_i = i; i++; } Hope this helps, - Claude Kerstin Hartig wrote: > On Christoph Weber's request I forward the following mail: > ------ > > Hello, > > I am experimenting to prove an algorithm similar to binary_search (lower_bound). > Currently I would like to "compare" a Variable to itself in the state of the previous iteration. > > I would like to know, if such a Label would be of any interest to be implemented or if the concept of adressing the variable in the previous iteration is flawed and should not longer be regarded. > > I hope I made my question clear. > > Sincerely > > Christoph Weber > > > _______________________________________________ > Frama-c-discuss mailing list > Frama-c-discuss at lists.gforge.inria.fr > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/frama-c-discuss > -- 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] WG: Label to refer to a state of the prior iteration
- From: kerstin.hartig at first.fraunhofer.de (Kerstin Hartig)
- [Frama-c-discuss] WG: Label to refer to a state of the prior iteration
- Prev by Date: [Frama-c-discuss] WG: binary_search example
- Next by Date: [Frama-c-discuss] [from] patch to get the dependencies of any statement
- Previous by thread: [Frama-c-discuss] WG: Label to refer to a state of the prior iteration
- Next by thread: [Frama-c-discuss] [from] patch to get the dependencies of any statement
- Index(es):