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] [Value analysis] Validating a function with behavior spec.

  • Subject: [Frama-c-discuss] [Value analysis] Validating a function with behavior spec.
  • From: pascal.cuoq at (Pascal Cuoq)
  • Date: Fri, 13 Apr 2012 11:21:29 +0200
  • In-reply-to: <>
  • References: <> <> <>

> Pascal, just to satisfy my curiosity, what is causing imprecisions in the
> value analysis in the code:
> ? ? ? ? ? ? ? ?retval = (uint8)val;
> ? ? ? ? ? ? ? ?/*@ assert retval == val; */
> Is it the cast which is treated as an unknown function?

The value analysis wouldn't work as a C interpreter on Csmith-generated
programs if it did not know how to handle casts such as (unit8), because
there are a lot of those in Csmith-generated programs

The imprecise operation here is == between non-singleton sets of
values. val can be 1 or 2, and retval can be 1 or 2, therefore the
equality may be true but cannot be guaranteed to be so.

Boris Yakobowski has more to say about the provability of the assertions in the
original example. I will let him make that other point.