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] Frama-C: Detecting unreachable code?
- Subject: [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: dganesan at fc-md.umd.edu (Dharmalingam Ganesan)
- Date: Sat, 25 Jan 2014 15:17:47 -0500
- In-reply-to: <CAOH62JgQWFnHP0tW8H-ti7JYj48qRJzM-jJ0AqBNOAATSDYFvA@mail.gmail.com>
- References: <B517F47C2F6D914AA8121201F9EBEE6701C7660449A7@Mail1.FCMD.local> <52E0C26F.2000605@linux-france.org> <20140123082550.GA7256@opentech.at> <CAOH62JhyfqOmKmw5iKjx1CSifK2X6ajxZBxd--h4_nK-3OxmrA@mail.gmail.com> <52E0D85C.3060504@cea.fr> <CAOH62Jj=TOozP8yxRV7-ECSUknpVhe6_eeMwPuQGOJTYJD+5fg@mail.gmail.com> <B517F47C2F6D914AA8121201F9EBEE6701C7660449A8@Mail1.FCMD.local> <0B8A5A42-5BB3-4C9C-99A6-A07AC39A84AB@cea.fr> <B517F47C2F6D914AA8121201F9EBEE6701C7660449A9@Mail1.FCMD.local> <20140125190009.351e083d@gavalla> <B517F47C2F6D914AA8121201F9EBEE6701C7660449AC@Mail1.FCMD.local>, <CAOH62JgQWFnHP0tW8H-ti7JYj48qRJzM-jJ0AqBNOAATSDYFvA@mail.gmail.com>
Yes, I refer "Integer Promotion" for my course at UMD. I was thinking of using Frama-C for my course to demonstrate some examples. For this below function, the value plugin says the [value] Values at end of function myFun: i ? [--..--] In my understanding [--, --] refers to all possible integers. But, the value of i for this function can never be below zero. --- unsigned int i = 0; void myFun() { i++; } -- [formal_verification]$ frama-c -val unint.c -main myFun -lib-entry [kernel] preprocessing with "gcc -C -E -I. unint.c" [value] Analyzing an incomplete application starting at myFun [value] Computing initial state [value] Initial state computed [value] Values of globals at initialization i ? [--..--] unint.c:5:[value] assigning non deterministic value for the first time [value] Recording results for myFun [value] done for function myFun [value] ====== VALUES COMPUTED ====== [value] Values at end of function myFun: i ? [--..--] ________________________________________ From: frama-c-discuss-bounces at lists.gforge.inria.fr [frama-c-discuss-bounces at lists.gforge.inria.fr] On Behalf Of Pascal Cuoq [pascal.cuoq at gmail.com] Sent: Saturday, January 25, 2014 3:00 PM To: Frama-C public discussion Subject: Re: [Frama-c-discuss] Frama-C: Detecting unreachable code? On Sat, Jan 25, 2014 at 8:47 PM, Dharmalingam Ganesan <dganesan at fc-md.umd.edu<mailto:dganesan at fc-md.umd.edu>> wrote: I looked at the code generated by RTE. I wonder why it casts unsigned int into int types? Because this is how the C language works Please see http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf<http://cp.mcafee.com/d/1jWVIe6x8e6jqb9EVKUZuX3VKVJeXObP33WapJeXObP33Xz9JeXObP33Wb1JeXOrBS4TAPq17ovjo0FSNtl3CRkeZ1ISXoKGxPqG7uwSr8uehoZd_HYyCOejd7b_nKnjpuvV4QsFzHKfYJt6OaqJXEYG7DR8OJMddECQjt-jpspspspsodTdw0GHv0Liq700s4pShOBAQYc4kmcaoxmRcwy-eLOO3FJSeGWnIngBiPta5O5mUm-wafBite8Kw0vWk8OTDoCT1P3NI5-Aq83iSbNRniZyW4GmrFgQKCy0nzGKBN98Qg1TP-QVg8Cy1K4vSNfi1_Cy2Rkf96XCYL4R> , especially ?integer promotions? in section 6.3. Is it a bug in RTE? No.
- Follow-Ups:
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: dmentre at linux-france.org (David MENTRE)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- References:
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: dganesan at fc-md.umd.edu (Dharmalingam Ganesan)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: dmentre at linux-france.org (David MENTRE)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: der.herr at hofr.at (Nicholas Mc Guire)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: nicky.williams at cea.fr (Nicky Williams)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: dganesan at fc-md.umd.edu (Dharmalingam Ganesan)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: loic.correnson at cea.fr (Loïc Correnson)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: dganesan at fc-md.umd.edu (Dharmalingam Ganesan)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: dganesan at fc-md.umd.edu (Dharmalingam Ganesan)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- [Frama-c-discuss] Frama-C: Detecting unreachable code?
- Prev by Date: [Frama-c-discuss] Frama-C: Detecting unreachable code?
- Next by Date: [Frama-c-discuss] problem with matrix pointer
- Previous by thread: [Frama-c-discuss] Frama-C: Detecting unreachable code?
- Next by thread: [Frama-c-discuss] Frama-C: Detecting unreachable code?
- Index(es):