[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/aorai/loop_bts1050.i (no preprocessing)
[aorai] Welcome to the Aorai plugin
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing /tmp/aorai_loop_bts10500.i (no preprocessing)
/* Generated by Frama-C */
enum aorai_ListOper {
    op_f = 2,
    op_g = 1,
    op_main = 0
};
enum aorai_OpStatusList {
    aorai_Terminated = 1,
    aorai_Called = 0
};
/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */
/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */
/*@ ghost int S0 = 1; */
/*@ ghost int Sf = 0; */
/*@ ghost int aorai_intermediate_state = 0; */
/*@ ghost int aorai_intermediate_state_0 = 0; */
/*@ ghost int aorai_intermediate_state_1 = 0; */
/*@ ghost int aorai_intermediate_state_2 = 0; */
/*@ ghost int aorai_intermediate_state_3 = 0; */
/*@ ghost int aorai_counter = 0; */
/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_f;
    assigns aorai_counter, aorai_CurOpStatus, aorai_CurOperation, S0, Sf,
            aorai_intermediate_state, aorai_intermediate_state_0,
            aorai_intermediate_state_1, aorai_intermediate_state_2,
            aorai_intermediate_state_3;
    
    behavior buch_state_S0_out:
      ensures 0 ≡ S0;
    
    behavior buch_state_Sf_out:
      ensures 0 ≡ Sf;
    
    behavior buch_state_aorai_intermediate_state_out:
      ensures 0 ≡ aorai_intermediate_state;
    
    behavior buch_state_aorai_intermediate_state_0_out:
      ensures 0 ≡ aorai_intermediate_state_0;
    
    behavior buch_state_aorai_intermediate_state_1_in_0:
      assumes 1 ≡ aorai_intermediate_state_0 ∧ aorai_counter < 5;
      ensures 1 ≡ aorai_intermediate_state_1;
      ensures aorai_counter ≡ \old(aorai_counter)+1;
    
    behavior buch_state_aorai_intermediate_state_1_in_1:
      assumes 1 ≡ aorai_intermediate_state;
      ensures 1 ≡ aorai_intermediate_state_1;
      ensures aorai_counter ≡ 1;
    
    behavior buch_state_aorai_intermediate_state_1_out:
      assumes
        (0 ≡ aorai_intermediate_state_0 ∨ ¬(aorai_counter < 5)) ∧
        0 ≡ aorai_intermediate_state;
      ensures 0 ≡ aorai_intermediate_state_1;
      ensures aorai_counter ≡ \old(aorai_counter);
    
    behavior buch_state_aorai_intermediate_state_2_out:
      ensures 0 ≡ aorai_intermediate_state_2;
    
    behavior buch_state_aorai_intermediate_state_3_out:
      ensures 0 ≡ aorai_intermediate_state_3;
 */
extern void f_pre_func(void);

/*@ requires
      1 ≡ aorai_intermediate_state_1 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧
      0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧
      0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_f;
    assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf,
            aorai_intermediate_state, aorai_intermediate_state_0,
            aorai_intermediate_state_1, aorai_intermediate_state_2,
            aorai_intermediate_state_3;
    
    behavior buch_state_S0_out:
      ensures 0 ≡ S0;
    
    behavior buch_state_Sf_out:
      ensures 0 ≡ Sf;
    
    behavior buch_state_aorai_intermediate_state_out:
      ensures 0 ≡ aorai_intermediate_state;
    
    behavior buch_state_aorai_intermediate_state_0_out:
      ensures 0 ≡ aorai_intermediate_state_0;
    
    behavior buch_state_aorai_intermediate_state_1_out:
      ensures 0 ≡ aorai_intermediate_state_1;
    
    behavior buch_state_aorai_intermediate_state_2_in:
      assumes 1 ≡ aorai_intermediate_state_1;
      ensures 1 ≡ aorai_intermediate_state_2;
    
    behavior buch_state_aorai_intermediate_state_2_out:
      assumes 0 ≡ aorai_intermediate_state_1;
      ensures 0 ≡ aorai_intermediate_state_2;
    
    behavior buch_state_aorai_intermediate_state_3_out:
      ensures 0 ≡ aorai_intermediate_state_3;
 */
extern void f_post_func(void);

/*@ requires
      (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0) ∧
      0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧
      0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3;
    requires 1 ≡ aorai_intermediate_state_0 ⇒ aorai_counter < 5;
    requires
      0 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state_0;
    requires
      1 ≡ aorai_intermediate_state_0 ∨ 0 ≡ aorai_intermediate_state_0;
    requires
      1 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state;
    
    behavior Buchi_property_behavior:
      ensures
        0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧
        0 ≡ aorai_intermediate_state_0 ∧
        0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3;
      ensures 1 ≡ aorai_intermediate_state_2;
      ensures
        \at(1 ≡ aorai_intermediate_state_0,Pre) ∧
        1 ≡ aorai_intermediate_state_2 ⇒
        aorai_counter ≡ \at(aorai_counter,Pre)+1;
      ensures
        \at(1 ≡ aorai_intermediate_state,Pre) ∧
        1 ≡ aorai_intermediate_state_2 ⇒ aorai_counter ≡ 1;
 */
void f(void)
{
  f_pre_func();
  f_post_func();
  return;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_g;
    assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf,
            aorai_intermediate_state, aorai_intermediate_state_0,
            aorai_intermediate_state_1, aorai_intermediate_state_2,
            aorai_intermediate_state_3;
    
    behavior buch_state_S0_out:
      ensures 0 ≡ S0;
    
    behavior buch_state_Sf_out:
      ensures 0 ≡ Sf;
    
    behavior buch_state_aorai_intermediate_state_out:
      ensures 0 ≡ aorai_intermediate_state;
    
    behavior buch_state_aorai_intermediate_state_0_out:
      ensures 0 ≡ aorai_intermediate_state_0;
    
    behavior buch_state_aorai_intermediate_state_1_out:
      ensures 0 ≡ aorai_intermediate_state_1;
    
    behavior buch_state_aorai_intermediate_state_2_out:
      ensures 0 ≡ aorai_intermediate_state_2;
    
    behavior buch_state_aorai_intermediate_state_3_in:
      assumes 1 ≡ aorai_intermediate_state_2;
      ensures 1 ≡ aorai_intermediate_state_3;
    
    behavior buch_state_aorai_intermediate_state_3_out:
      assumes 0 ≡ aorai_intermediate_state_2;
      ensures 0 ≡ aorai_intermediate_state_3;
 */
extern void g_pre_func(void);

/*@ requires
      1 ≡ aorai_intermediate_state_3 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧
      0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧
      0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_2;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_g;
    assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf,
            aorai_intermediate_state, aorai_intermediate_state_0,
            aorai_intermediate_state_1, aorai_intermediate_state_2,
            aorai_intermediate_state_3;
    
    behavior buch_state_S0_out:
      ensures 0 ≡ S0;
    
    behavior buch_state_Sf_out:
      ensures 0 ≡ Sf;
    
    behavior buch_state_aorai_intermediate_state_out:
      ensures 0 ≡ aorai_intermediate_state;
    
    behavior buch_state_aorai_intermediate_state_0_in:
      assumes 1 ≡ aorai_intermediate_state_3;
      ensures 1 ≡ aorai_intermediate_state_0;
    
    behavior buch_state_aorai_intermediate_state_0_out:
      assumes 0 ≡ aorai_intermediate_state_3;
      ensures 0 ≡ aorai_intermediate_state_0;
    
    behavior buch_state_aorai_intermediate_state_1_out:
      ensures 0 ≡ aorai_intermediate_state_1;
    
    behavior buch_state_aorai_intermediate_state_2_out:
      ensures 0 ≡ aorai_intermediate_state_2;
    
    behavior buch_state_aorai_intermediate_state_3_out:
      ensures 0 ≡ aorai_intermediate_state_3;
 */
extern void g_post_func(void);

/*@ requires
      1 ≡ aorai_intermediate_state_2 ∧ 0 ≡ S0 ∧ 0 ≡ Sf ∧
      0 ≡ aorai_intermediate_state ∧ 0 ≡ aorai_intermediate_state_0 ∧
      0 ≡ aorai_intermediate_state_1 ∧ 0 ≡ aorai_intermediate_state_3;
    
    behavior Buchi_property_behavior:
      ensures
        0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧
        0 ≡ aorai_intermediate_state_1 ∧
        0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3;
      ensures 1 ≡ aorai_intermediate_state_0;
 */
void g(void)
{
  g_pre_func();
  g_post_func();
  return;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf,
            aorai_intermediate_state, aorai_intermediate_state_0,
            aorai_intermediate_state_1, aorai_intermediate_state_2,
            aorai_intermediate_state_3;
    
    behavior buch_state_S0_out:
      ensures 0 ≡ S0;
    
    behavior buch_state_Sf_out:
      ensures 0 ≡ Sf;
    
    behavior buch_state_aorai_intermediate_state_in:
      assumes 1 ≡ S0;
      ensures 1 ≡ aorai_intermediate_state;
    
    behavior buch_state_aorai_intermediate_state_out:
      assumes 0 ≡ S0;
      ensures 0 ≡ aorai_intermediate_state;
    
    behavior buch_state_aorai_intermediate_state_0_out:
      ensures 0 ≡ aorai_intermediate_state_0;
    
    behavior buch_state_aorai_intermediate_state_1_out:
      ensures 0 ≡ aorai_intermediate_state_1;
    
    behavior buch_state_aorai_intermediate_state_2_out:
      ensures 0 ≡ aorai_intermediate_state_2;
    
    behavior buch_state_aorai_intermediate_state_3_out:
      ensures 0 ≡ aorai_intermediate_state_3;
 */
extern void main_pre_func(int c);

/*@ requires
      (1 ≡ aorai_intermediate_state ∨ 1 ≡ aorai_intermediate_state_0) ∧
      0 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state_1 ∧
      0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, S0, Sf,
            aorai_intermediate_state, aorai_intermediate_state_0,
            aorai_intermediate_state_1, aorai_intermediate_state_2,
            aorai_intermediate_state_3;
    
    behavior buch_state_S0_out:
      ensures 0 ≡ S0;
    
    behavior buch_state_Sf_in:
      assumes
        1 ≡ aorai_intermediate_state_0 ∨ 1 ≡ aorai_intermediate_state;
      ensures 1 ≡ Sf;
    
    behavior buch_state_Sf_out:
      assumes
        0 ≡ aorai_intermediate_state_0 ∧ 0 ≡ aorai_intermediate_state;
      ensures 0 ≡ Sf;
    
    behavior buch_state_aorai_intermediate_state_out:
      ensures 0 ≡ aorai_intermediate_state;
    
    behavior buch_state_aorai_intermediate_state_0_out:
      ensures 0 ≡ aorai_intermediate_state_0;
    
    behavior buch_state_aorai_intermediate_state_1_out:
      ensures 0 ≡ aorai_intermediate_state_1;
    
    behavior buch_state_aorai_intermediate_state_2_out:
      ensures 0 ≡ aorai_intermediate_state_2;
    
    behavior buch_state_aorai_intermediate_state_3_out:
      ensures 0 ≡ aorai_intermediate_state_3;
 */
extern void main_post_func(int res);

/*@ requires
      1 ≡ S0 ∧ 0 ≡ Sf ∧ 0 ≡ aorai_intermediate_state ∧
      0 ≡ aorai_intermediate_state_0 ∧
      0 ≡ aorai_intermediate_state_1 ∧
      0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3;
    
    behavior aorai_acceptance:
      ensures 1 ≡ Sf;
    
    behavior Buchi_property_behavior:
      ensures
        0 ≡ S0 ∧ 0 ≡ aorai_intermediate_state ∧
        0 ≡ aorai_intermediate_state_0 ∧
        0 ≡ aorai_intermediate_state_1 ∧
        0 ≡ aorai_intermediate_state_2 ∧ 0 ≡ aorai_intermediate_state_3;
      ensures 1 ≡ Sf;
      ensures
        \at(1 ≡ S0,Pre) ∧ 1 ≡ Sf ⇒
        (1 ≤ aorai_counter ≤ 5) ∨
        aorai_counter ≡ \at(aorai_counter,Pre)+0;
 */
int main(int c)
{
  int aorai_Loop_Init_37;
  int __retres;
  main_pre_func(c);
  if (c < 0) c = 0;
  if (c > 0) c = 5;
  /*@ ghost aorai_Loop_Init_37 = 1; */
  aorai_loop_37:
    /*@ loop invariant Aorai: 0 ≡ S0;
        loop invariant Aorai: 0 ≡ Sf;
        loop invariant
          Aorai:
            1 ≡ aorai_intermediate_state ∨ 0 ≡ aorai_intermediate_state;
        loop invariant
          Aorai:
            1 ≡ aorai_intermediate_state_0 ∨
            0 ≡ aorai_intermediate_state_0;
        loop invariant Aorai: 0 ≡ aorai_intermediate_state_1;
        loop invariant Aorai: 0 ≡ aorai_intermediate_state_2;
        loop invariant Aorai: 0 ≡ aorai_intermediate_state_3;
        loop invariant
          Aorai:
            1 ≡ aorai_intermediate_state ∨
            1 ≡ aorai_intermediate_state_0;
        loop invariant
          Aorai:
            aorai_Loop_Init_37 ≢ 0 ⇒
            \at(1 ≡ S0,Pre) ⇒ 0 ≡ aorai_intermediate_state_0;
        loop invariant
          Aorai: aorai_Loop_Init_37 ≡ 0 ⇒ 0 ≡ aorai_intermediate_state;
        loop invariant
          Aorai:
            \at(1 ≡ aorai_intermediate_state,aorai_loop_37) ∧
            1 ≡ aorai_intermediate_state_0 ⇒ 1 ≤ aorai_counter ≤ 5;
    */
    while (1) {
      if (! c) goto while_0_break;
      /*@ ghost aorai_Loop_Init_37 = 0; */
      f();
      g();
      c --;
    }
  while_0_break: ;
  __retres = 0;
  main_post_func(__retres);
  return __retres;
}


