[kernel] Parsing share/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/rte/postcond.c (with preprocessing)
[rte] annotating function f
[rte] annotating function g
tests/rte/postcond.c:33:[kernel] warning: keeping only assigns from behaviors: pos, neg
[rte] annotating function main
tests/rte/postcond.c:40:[kernel] warning: keeping only assigns from behaviors: pos, neg
/* Generated by Frama-C */
/*@ ensures \result ≡ -\old(x);
    
    behavior pos:
      assumes first_bhv: x ≥ 0;
      ensures \result ≤ 0;
      assigns *y;
    
    behavior neg:
      assumes second_bhv: x < 0;
      ensures \result > 0;
      assigns \nothing;
    
    complete behaviors pos, neg;
    disjoint behaviors pos, neg;
 */
int f(int x, int *y)
{
  int __retres;
  if (x >= 0) *y = x;
  __retres = - x;
  return __retres;
}

/*@ ensures *\old(x) ≡ \old(y);
    assigns *x; */
void g(int y, int *x)
{
  /*@ assigns *x, y;
      
      behavior pre_f:
        ensures *x ≡ -\old(y);
      
      behavior pre_f_pos:
        assumes first_bhv: y ≥ 0;
        ensures *x ≤ 0;
        assigns *x, y;
      
      behavior pre_f_neg:
        assumes second_bhv: y < 0;
        ensures *x > 0;
        assigns *x;
  */
  *x = f(y,& y);
  return;
}

int main(void)
{
  int a;
  int c;
  int b;
  a = 5;
  /*@ assigns b, c;
      
      behavior pre_f:
        ensures b ≡ -\old(a);
      
      behavior pre_f_pos:
        assumes first_bhv: a ≥ 0;
        ensures b ≤ 0;
        assigns b, c;
      
      behavior pre_f_neg:
        assumes second_bhv: a < 0;
        ensures b > 0;
        assigns b;
  */
  b = f(a,& c);
  /*@ behavior pre_g:
        ensures a ≡ \old(b);
        assigns a; */
  g(b,& a);
  b += a;
  return b;
}


