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] Jessie question


  • Subject: [Frama-c-discuss] Jessie question
  • From: jsp at di.uminho.pt (Jorge Sousa Pinto)
  • Date: Wed, 28 Apr 2010 00:01:35 +0100

Hi, consider the program

/*@ requires \valid(c);
   @ ensures *c == 10 && y == 20;
   @*/
void q(int *c)
{
  y = 20;
  *c = 10;
}

The program is proved correct with my installation of Frama-C, but now  
suppose the precondition is strengthened as follows

/*@ requires \valid(c) && c==&y;
   @ ensures *c == 10 && y == 20;
   @*/
void q(int *c)
{
  y = 20;
  *c = 10;
}

Now the postcondition cannot be discharged, as expected. But doesn't  
this mean that the first program should not be considered correct?

Thanks, best regards
Jorge Sousa Pinto