[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/aorai/test_boucle1.c (with preprocessing)
[aorai] Welcome to the Aorai plugin
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing /tmp/aorai_test_boucle10.i (no preprocessing)
/* Generated by Frama-C */
enum aorai_ListOper {
    op_commit_trans = 2,
    op_init_trans = 1,
    op_main = 0
};
enum aorai_OpStatusList {
    aorai_Terminated = 1,
    aorai_Called = 0
};
int cpt = 3;
/*@ global invariant inv_cpt: 0 ≤ cpt ≤ 3;
 */
int status = 0;
/*@ global invariant inv_status: 0 ≤ status ≤ 1;
 */
/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */
/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */
/*@ ghost int accept_S1 = 0; */
/*@ ghost int accept_S2 = 0; */
/*@ ghost int accept_S3 = 0; */
/*@ ghost int accept_S4 = 0; */
/*@ ghost int accept_init = 1; */
/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_commit_trans;
    assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2,
            accept_S3, accept_S4, accept_init;
    
    behavior buch_state_accept_S1_out:
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_in:
      assumes 1 ≡ accept_S4;
      ensures 1 ≡ accept_S2;
    
    behavior buch_state_accept_S2_out:
      assumes 0 ≡ accept_S4;
      ensures 0 ≡ accept_S2;
    
    behavior buch_state_accept_S3_out:
      ensures 0 ≡ accept_S3;
    
    behavior buch_state_accept_S4_out:
      ensures 0 ≡ accept_S4;
    
    behavior buch_state_accept_init_out:
      ensures 0 ≡ accept_init;
 */
extern void commit_trans_pre_func(void);

/*@ requires
      1 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧
      0 ≡ accept_S4 ∧ 0 ≡ accept_init;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_commit_trans;
    assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2,
            accept_S3, accept_S4, accept_init;
    
    behavior buch_state_accept_S1_out:
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_in:
      assumes 1 ≡ accept_S2;
      ensures 1 ≡ accept_S2;
    
    behavior buch_state_accept_S2_out:
      assumes 0 ≡ accept_S2;
      ensures 0 ≡ accept_S2;
    
    behavior buch_state_accept_S3_out:
      ensures 0 ≡ accept_S3;
    
    behavior buch_state_accept_S4_out:
      ensures 0 ≡ accept_S4;
    
    behavior buch_state_accept_init_out:
      ensures 0 ≡ accept_init;
 */
extern void commit_trans_post_func(int res);

/*@ requires
      1 ≡ accept_S4 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧
      0 ≡ accept_S3 ∧ 0 ≡ accept_init;
    requires \true;
    
    behavior a:
      ensures 0 ≤ \result ≤ 1;
    
    behavior Buchi_property_behavior:
      ensures
        0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_S4 ∧
        0 ≡ accept_init;
      ensures 1 ≡ accept_S2;
 */
int commit_trans(void)
{
  int __retres;
  commit_trans_pre_func();
  __retres = 1;
  commit_trans_post_func(__retres);
  return __retres;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_init_trans;
    assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2,
            accept_S3, accept_S4, accept_init;
    
    behavior buch_state_accept_S1_out:
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_in:
      assumes 1 ≡ accept_S2;
      ensures 1 ≡ accept_S2;
    
    behavior buch_state_accept_S2_out:
      assumes 0 ≡ accept_S2;
      ensures 0 ≡ accept_S2;
    
    behavior buch_state_accept_S3_out:
      ensures 0 ≡ accept_S3;
    
    behavior buch_state_accept_S4_out:
      ensures 0 ≡ accept_S4;
    
    behavior buch_state_accept_init_out:
      ensures 0 ≡ accept_init;
 */
extern void init_trans_pre_func(void);

/*@ requires
      1 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧
      0 ≡ accept_S4 ∧ 0 ≡ accept_init;
    requires 1 ≡ accept_S2 ⇒ status ≡ 0 ∨ status ≢ 0;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_init_trans;
    assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2,
            accept_S3, accept_S4, accept_init;
    
    behavior buch_state_accept_S1_out:
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_in:
      assumes 1 ≡ accept_S2 ∧ status ≡ 0;
      ensures 1 ≡ accept_S2;
    
    behavior buch_state_accept_S2_out:
      assumes 0 ≡ accept_S2 ∨ ¬(status ≡ 0);
      ensures 0 ≡ accept_S2;
    
    behavior buch_state_accept_S3_out:
      ensures 0 ≡ accept_S3;
    
    behavior buch_state_accept_S4_in:
      assumes 1 ≡ accept_S2 ∧ status ≢ 0;
      ensures 1 ≡ accept_S4;
    
    behavior buch_state_accept_S4_out:
      assumes 0 ≡ accept_S2 ∨ status ≡ 0;
      ensures 0 ≡ accept_S4;
    
    behavior buch_state_accept_init_out:
      ensures 0 ≡ accept_init;
 */
extern void init_trans_post_func(int res);

/*@ requires
      1 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧
      0 ≡ accept_S4 ∧ 0 ≡ accept_init;
    requires \true;
    
    behavior a:
      ensures 0 ≤ \result ≤ 1;
    
    behavior Buchi_property_behavior:
      ensures
        (1 ≡ accept_S2 ⇒ status ≡ 0) ∧
        (1 ≡ accept_S4 ⇒ status ≢ 0);
      ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2;
      ensures 1 ≡ accept_S4 ∨ 0 ≡ accept_S4;
      ensures 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧ 0 ≡ accept_init;
      ensures 1 ≡ accept_S2 ∨ 1 ≡ accept_S4;
 */
int init_trans(void)
{
  int __retres;
  init_trans_pre_func();
  __retres = 1;
  init_trans_post_func(__retres);
  return __retres;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2,
            accept_S3, accept_S4, accept_init;
    
    behavior buch_state_accept_S1_out:
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_in:
      assumes 1 ≡ accept_init;
      ensures 1 ≡ accept_S2;
    
    behavior buch_state_accept_S2_out:
      assumes 0 ≡ accept_init;
      ensures 0 ≡ accept_S2;
    
    behavior buch_state_accept_S3_out:
      ensures 0 ≡ accept_S3;
    
    behavior buch_state_accept_S4_out:
      ensures 0 ≡ accept_S4;
    
    behavior buch_state_accept_init_out:
      ensures 0 ≡ accept_init;
 */
extern void main_pre_func(void);

/*@ requires
      1 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S3 ∧
      0 ≡ accept_S4 ∧ 0 ≡ accept_init;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, accept_S1, accept_S2,
            accept_S3, accept_S4, accept_init;
    
    behavior buch_state_accept_S1_in:
      assumes 1 ≡ accept_S2;
      ensures 1 ≡ accept_S1;
    
    behavior buch_state_accept_S1_out:
      assumes 0 ≡ accept_S2;
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_in:
      assumes 1 ≡ accept_S2;
      ensures 1 ≡ accept_S2;
    
    behavior buch_state_accept_S2_out:
      assumes 0 ≡ accept_S2;
      ensures 0 ≡ accept_S2;
    
    behavior buch_state_accept_S3_in:
      assumes 1 ≡ accept_S2;
      ensures 1 ≡ accept_S3;
    
    behavior buch_state_accept_S3_out:
      assumes 0 ≡ accept_S2;
      ensures 0 ≡ accept_S3;
    
    behavior buch_state_accept_S4_out:
      ensures 0 ≡ accept_S4;
    
    behavior buch_state_accept_init_out:
      ensures 0 ≡ accept_init;
 */
extern void main_post_func(int res);

/*@ requires
      1 ≡ accept_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2 ∧
      0 ≡ accept_S3 ∧ 0 ≡ accept_S4;
    requires \true;
    
    behavior a:
      ensures 0 ≤ \result ≤ 1;
    
    behavior aorai_acceptance:
      ensures
        1 ≡ accept_S1 ∨ 1 ≡ accept_S2 ∨ 1 ≡ accept_S3 ∨
        1 ≡ accept_S4 ∨ 1 ≡ accept_init;
    
    behavior Buchi_property_behavior:
      ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1;
      ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2;
      ensures 1 ≡ accept_S3 ∨ 0 ≡ accept_S3;
      ensures 0 ≡ accept_S4 ∧ 0 ≡ accept_init;
      ensures 1 ≡ accept_S1 ∨ 1 ≡ accept_S2 ∨ 1 ≡ accept_S3;
 */
int main(void)
{
  int aorai_Loop_Init_32;
  int __retres;
  main_pre_func();
  cpt = 3;
  status = 0;
  /*@ ghost aorai_Loop_Init_32 = 1; */
  aorai_loop_32:
    /*@ loop invariant
          i:
            0 ≤ status ≤ 1 ∧ 0 ≤ cpt ≤ 3 ∧
            (cpt ≡ 0 ⇒ status ≡ 0);
        loop invariant Aorai: 0 ≡ accept_S1;
        loop invariant Aorai: 1 ≡ accept_S2;
        loop invariant Aorai: 0 ≡ accept_S3;
        loop invariant Aorai: 0 ≡ accept_S4;
        loop invariant Aorai: 0 ≡ accept_init;
    */
    while (1) {
      if (! (cpt > 0)) goto while_0_break;
      /*@ ghost aorai_Loop_Init_32 = 0; */
      status = init_trans();
      if (status) {
        status = commit_trans();
        if (status) goto label_ok;
      }
      cpt --;
    }
  while_0_break: ;
  __retres = 0;
  goto return_label;
  label_ok: __retres = 1;
  return_label: main_post_func(__retres);
  return __retres;
}


