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] RE : [wp] type conversion check is less strict than Jessie?
- Subject: [Frama-c-discuss] RE : [wp] type conversion check is less strict than Jessie?
- From: loic.correnson at cea.fr (CORRENSON Loic 218851)
- Date: Mon, 9 Dec 2013 14:33:53 +0000
- In-reply-to: <BAY169-W53ACB8A0A8736E8656A8DC97D30@phx.gbl>
- References: <BAY169-W53ACB8A0A8736E8656A8DC97D30@phx.gbl>
Hi, This is because you are casting a constant int into a pointer, which makes a valid physical address. However, you can not do pointer arithmetics on such values, say, you **can not prove** that (int *) 0x100 shifted by one (on 64-bit machine) leads to (int *) 0x108. By the way, I'm surprise by the output of WP you report here. Which version are you using ? I suggest you to move to Fluorine, where the memory model of wp offers more options on pointers and casts. Regards. ________________________________ De : frama-c-discuss-bounces at lists.gforge.inria.fr [frama-c-discuss-bounces at lists.gforge.inria.fr] de la part de Xiao-lei Cui [x_cui at hotmail.com] Date d'envoi : lundi 9 d?cembre 2013 07:02 ? : frama-c-discuss at lists.gforge.inria.fr Objet : [Frama-c-discuss] [wp] type conversion check is less strict than Jessie? Hi all, I used Jessie plug-in before I tried wp. Jessie will not tolerate the following situation where a int constant is to be converted to unsigned int* -------------------------------------------------------------- #define ARTAR ( (unsigned int * )0x01f800e0) ) unsigned int sr; sr = ARTAR; -------------------------------------------------------------- [jessie] failure: Casting from type int to type struct unsigned_intP * not allowed However, as I run wp plug-in over the same C file: $ frama-c -pp-annot -wp -wp-rte -wp-prover why3ide file.c I did not get any complaints from wp, and the VCs( very simple though) seems proved already: [wp] Running WP plugin... [wp] Collecting axiomatic usage [rte] annotating function SerialBaud [wp] Goal typed_SB_b1_post : trivial [wp] Goal typed_SB_b2_post : trivial Jessie and WP behaves so differently in type conversion check (for this case) ? Is it that type check is turned off by default in WP? or I did not invoke wp in the correct way.. Any hints would be appreciated. Thanks.. cheers xiao-lei -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20131209/c3ae11f7/attachment.html>
- Follow-Ups:
- [Frama-c-discuss] RE : [wp] type conversion check is less strict than Jessie?
- From: x_cui at hotmail.com (Xiao-lei Cui)
- [Frama-c-discuss] RE : [wp] type conversion check is less strict than Jessie?
- References:
- [Frama-c-discuss] [wp] type conversion check is less strict than Jessie?
- From: x_cui at hotmail.com (Xiao-lei Cui)
- [Frama-c-discuss] [wp] type conversion check is less strict than Jessie?
- Prev by Date: [Frama-c-discuss] JFLA14 - Dernier appel à participation
- Next by Date: [Frama-c-discuss] how to modify stmt in AST by using a visitor
- Previous by thread: [Frama-c-discuss] [wp] type conversion check is less strict than Jessie?
- Next by thread: [Frama-c-discuss] RE : [wp] type conversion check is less strict than Jessie?
- Index(es):