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? (Dharmalingam Ganesan)


  • Subject: [Frama-c-discuss] Frama-C: Detecting unreachable code? (Dharmalingam Ganesan)
  • From: jens.gerlach at fokus.fraunhofer.de (Gerlach, Jens)
  • Date: Sat, 25 Jan 2014 11:30:57 +0000
  • In-reply-to: <mailman.29.1390647739.11169.frama-c-discuss@lists.gforge.inria.fr>
  • References: <mailman.29.1390647739.11169.frama-c-discuss@lists.gforge.inria.fr>

Hello Dharma,

I think your function satisfies its contract.
So, what shall Frama-C do?

Maybe, your issue is that the function also satisfies the following simpler contract?

Jens

int MAX_VALUE = 100;

float x = 0.0;

int status = 0;

/*@
  requires MAX_VALUE == 100;
  assigns status;
  ensures status == -1;
*/
int main()
{

  if((x > MAX_VALUE) ||
     (x <= MAX_VALUE))
  {
     status = -1;
  }
}