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] WP - Verifiable annotations with some types but not others
- Subject: [Frama-c-discuss] WP - Verifiable annotations with some types but not others
- From: arnaud.dieumegard at enseeiht.fr (Arnaud Dieumegard)
- Date: Mon, 9 Jul 2012 09:35:06 +0200
- In-reply-to: <CA+yPOVgq3kOjzca2w5Z-aJmd_0XR8MsT8iYvYdO6mtgKr9tBVA@mail.gmail.com>
- References: <1341236500.2183.49.camel@iti27.informatik.htw-dresden.de> <47C0712F-E281-48EB-991E-263D6EADC271@enseeiht.fr> <1341564914.2095.2.camel@iti27.informatik.htw-dresden.de> <32B125A8-65E4-4455-B854-6CAE75E29A38@enseeiht.fr> <223E4B1A-AD1D-4314-B139-E679A0BC2BA1@first.fraunhofer.de> <EBAD3BAB-9682-4876-9636-9D4518495C95@enseeiht.fr> <1CF4D9E8-5E16-430B-AF5A-72F1ECE42E80@enseeiht.fr> <CA+yPOVgq3kOjzca2w5Z-aJmd_0XR8MsT8iYvYdO6mtgKr9tBVA@mail.gmail.com>
Hi Virgile, About the requires clause proving it's quite logical and I did not thought about it while asking. Thanks for the precisions and for your help. Arnaud On Jul 6, 2012, at 1:43 PM, Virgile Prevosto wrote: > Hello, > > 2012/7/6 Arnaud Dieumegard <arnaud.dieumegard at enseeiht.fr>: >> Sorry about that but I did a mistake on my last message. >> The correct clause was: >> >> requires \forall unsigned char n; 0 <= n < 2 ==> \valid_range(&b.val[n],0,1); >> or >> requires \forall unsigned char n; 0 <= n < 2 ==> \valid(&b.val[n]+(0..1)); >> >> This still does the trick but I can't prove it. >> > > First, just a remark: \valid_range is deprecated (use \valid and .. as > you did in the latter version of your requires). > More importantly, you shouldn't need this requirement: your argument > is a struct which contains an array, > so b.val is always a valid block of 4 doubles. In fact all annotations > are proved with Nitrogen and alt-ergo. > In addition, you cannot prove a requires clause directly: it leads to > a proof obligation on the callers of the function > (to ensure that they meet the requirements set up by the function). > Since there is no caller of init in your code, there's nothing to be > proved for the requires. > > Best regards, > -- > E tutto per oggi, a la prossima volta > Virgile > > _______________________________________________ > 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 Cordialement, Arnaud Dieumegard PhD Student IRIT-ENSEEIHT / ACADIE 2 rue Charles CAMICHEL BP 7122 31071 TOULOUSE cedex 07 arnaud.dieumegard at enseeiht.fr Tel: 05.34.32.21.64
- References:
- [Frama-c-discuss] Predicates fully supported in WP?
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] WP - Verifiable annotations with some types but not others
- From: arnaud.dieumegard at enseeiht.fr (Arnaud Dieumegard)
- [Frama-c-discuss] WP - Verifiable annotations with some types but not others
- From: hollas at informatik.htw-dresden.de (Boris Hollas)
- [Frama-c-discuss] WP - Verifiable annotations with some types but not others
- From: arnaud.dieumegard at enseeiht.fr (Arnaud Dieumegard)
- [Frama-c-discuss] WP - Verifiable annotations with some types but not others
- From: jens.gerlach at first.fraunhofer.de (Jens Gerlach)
- [Frama-c-discuss] WP - Verifiable annotations with some types but not others
- From: arnaud.dieumegard at enseeiht.fr (Arnaud Dieumegard)
- [Frama-c-discuss] WP - Verifiable annotations with some types but not others
- From: arnaud.dieumegard at enseeiht.fr (Arnaud Dieumegard)
- [Frama-c-discuss] WP - Verifiable annotations with some types but not others
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Predicates fully supported in WP?
- Prev by Date: [Frama-c-discuss] Using generated globals in the source code
- Next by Date: [Frama-c-discuss] Using generated globals in the source code
- Previous by thread: [Frama-c-discuss] WP - Verifiable annotations with some types but not others
- Next by thread: [Frama-c-discuss] Aliasing
- Index(es):