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] Semantics of \valid
- Subject: [Frama-c-discuss] Semantics of \valid
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- Date: Mon, 15 Jun 2009 14:05:36 +0200
- In-reply-to: <DC233AF9-57DE-498B-9EB5-1C6B490C7B4D@first.fraunhofer.de>
- References: <FC0686BB6178BC43B9DC035287A11A7208195A4006@SI-MBX12.de.bosch.com> <20090610174519.04dc429d@is005115> <FC0686BB6178BC43B9DC035287A11A7208195A44E7@SI-MBX12.de.bosch.com> <DC233AF9-57DE-498B-9EB5-1C6B490C7B4D@first.fraunhofer.de>
>As a minor remark about \valid_range, I would like to add that I find it always a bit odd >that I have to specify >\valid_range(a, 0, n-1) >to express an array of length n. I would prefer "\valid_range(a, 0, n)" or even shorter "\valid_range(a, n)". >In other words, I think that right open ranges fit better to C. The same is true for \valid, you have to specify \valid(a+(0..n-1)). However, I prefer it this way. I believe it makes the range of indices more explicit. Spec# has a range operator (0:a.Length) = {k | 0 <= k < a.Length}. I find it a bit confusing that the first element is included in the range, but not the last. If however \valid_range is not part of ACSL every user can define it in a way he preferes. Regards, Boris
- References:
- [Frama-c-discuss] Semantics of \valid
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- [Frama-c-discuss] Semantics of \valid
- From: virgile.prevosto at cea.fr (Virgile Prevosto)
- [Frama-c-discuss] Semantics of \valid
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- [Frama-c-discuss] Semantics of \valid
- From: jens.gerlach at first.fraunhofer.de (Jens Gerlach)
- [Frama-c-discuss] Semantics of \valid
- Prev by Date: [Frama-c-discuss] Semantics of \valid
- Next by Date: [Frama-c-discuss] Frama-C limit ?
- Previous by thread: [Frama-c-discuss] Semantics of \valid
- Next by thread: [Frama-c-discuss] A tentative FAQ...
- Index(es):