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: moy at adacore.com (Yannick Moy)
  • Date: Fri, 13 Apr 2012 11:12:19 +0200
  • In-reply-to: <CAOH62JgyUC8+2cHf-bsPmVnWcL+JxyV88mnVo9gHc0j5Ym=JqQ@mail.gmail.com>
  • References: <CAFaEDLCHYJtescjnsqs6gE5q_Nx5+CWSg_3AD=f9pN_AHhq4=w@mail.gmail.com> <CAOH62JgyUC8+2cHf-bsPmVnWcL+JxyV88mnVo9gHc0j5Ym=JqQ@mail.gmail.com>

On 04/13/2012 11:03 AM, Pascal Cuoq wrote:
> To answer your question, you cannot prove the kind of functional
> property you desire with the value analysis. On the other hand,
> for your example, either Jessie or Wp look like they have a good
> chance.

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?
Then its transition function could be modeled more precisely I guess, 
which would allow value analysis to prove both assertions, right?

What about the postconditions, would value analysis be able to prove 
them? I guess it could if you analyze each behavior separately 
(otherwise you'd need a disjunctive domain), maybe that's what you do 
already?

-- 
Yannick Moy, Senior Software Engineer, AdaCore