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] Help with -wp-init-const and static evaluation of constants


  • Subject: [Frama-c-discuss] Help with -wp-init-const and static evaluation of constants
  • From: loic.correnson at cea.fr (Loïc Correnson)
  • Date: Mon, 19 Aug 2019 12:31:22 +0200
  • In-reply-to: <82be3036-b7b6-a753-8047-b7c325d7585e@proteancode.com>
  • References: <c5309feb-8597-c141-6dd2-48da2b49e048@proteancode.com> <CA+yPOVjhCvkoyLc1y1y+35cPX-e_P=-4pqyG8FQb=cxp9zZS8w@mail.gmail.com> <82be3036-b7b6-a753-8047-b7c325d7585e@proteancode.com>

Thanks for the feedback,

As Virgile said, this is a bug in our heuristics responsible for removing all « unused » definitions from the proof context.
Sorry for the inconvenience.

Regarding the init-const option, it is very likely to set by default (and removed) in future versions, since assigning a « const » variable is considered to be an error by the kernel.

Regards, L.

> Le 18 juil. 2019 à 10:59, Roderick Chapman <rod at proteancode.com> a écrit :
> 
> On 18/07/2019 07:14, Virgile Prevosto wrote:
>> //@ assert c1 == 300;
>> 
>> at the beginning of the function and everything gets proved.
> That seems to work, but is unacceptable - the whole point of having named constants (especially a set of them where the values depend on each other) is to avoid having literal "magic numbers" all over the place.
> 
>  - Rod
> 
> 
> 
> _______________________________________________
> Frama-c-discuss mailing list
> Frama-c-discuss at lists.gforge.inria.fr
> https://lists.gforge.inria.fr/mailman/listinfo/frama-c-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20190819/fa3d6199/attachment.html>