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] \at in ACSL assertions


  • Subject: [Frama-c-discuss] \at in ACSL assertions
  • From: pascal.cuoq at gmail.com (Pascal Cuoq)
  • Date: Mon, 15 Nov 2010 13:24:19 +0100

Dear Frama-C discussers,

I submit to you the program below. It raises three questions:

a- should the commented functions main and f be parsable by the
front-end? Currently, they can't be parsed with either Boron or the
development version. The error message is similar to "u.c:14:[kernel]
user error: logic label `cond' not found in annotation"

b- if they were parsable, should the assertion in each function be provable?

c- should the assertion in parsable function g be provable?

Pascal
___

#if 0
int main(void)
{
  int i, j;
  for (i=0; i<=4; i++)
    {
      j=i;
    cond:
      if (i%2)
	{
	odd:
	  j=1;
	}
    }
  /*@ assert \at( \at(j, odd), cond) == 3; */
  return 0;
}

int f(int c, int d)
{
  int i, j;
  if (c)
    i=d;
  if (c)
    {
    then:
      j=1;
    }
  /*@ assert \at(i-d, then) == 0; */
  return 0;
}
#endif


int g(int c, int d)
{
  int i, j;
  if (c) goto next1;
    i=d;
 next1:
    if (c) goto next2;
 then:
    j=1;
 next2:
  /*@ assert \at(i-d, then) == 0; */
  return 0;
}