[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/aorai/test_switch3.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_switch30.i (no preprocessing)
/* Generated by Frama-C */
enum aorai_ListOper {
    op_count = 2,
    op_countOne = 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 T0_S2 = 0; */
/*@ ghost int T0_init = 1; */
/*@ ghost int accept_S1 = 0; */
/*@ ghost int accept_S2 = 0; */
/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_countOne;
    assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1,
            accept_S2;
    
    behavior buch_state_T0_S2_in:
      assumes 1 ≡ accept_S2 ∨ 1 ≡ T0_S2;
      ensures 1 ≡ T0_S2;
    
    behavior buch_state_T0_S2_out:
      assumes 0 ≡ accept_S2 ∧ 0 ≡ T0_S2;
      ensures 0 ≡ T0_S2;
    
    behavior buch_state_T0_init_out:
      ensures 0 ≡ T0_init;
    
    behavior buch_state_accept_S1_out:
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_out:
      ensures 0 ≡ accept_S2;
 */
extern void countOne_pre_func(char *argv);

/*@ requires
      1 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_countOne;
    assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1,
            accept_S2;
    
    behavior buch_state_T0_S2_in:
      assumes 1 ≡ T0_S2;
      ensures 1 ≡ T0_S2;
    
    behavior buch_state_T0_S2_out:
      assumes 0 ≡ T0_S2;
      ensures 0 ≡ T0_S2;
    
    behavior buch_state_T0_init_out:
      ensures 0 ≡ T0_init;
    
    behavior buch_state_accept_S1_out:
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_out:
      ensures 0 ≡ accept_S2;
 */
extern void countOne_post_func(int res);

/*@ requires
      (1 ≡ T0_S2 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S1;
    requires 1 ≡ accept_S2 ∨ 0 ≡ accept_S2;
    requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2;
    
    behavior Buchi_property_behavior:
      ensures 0 ≡ T0_init ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2;
      ensures 1 ≡ T0_S2;
 */
int countOne(char *argv)
{
  int r;
  countOne_pre_func(argv);
  r = 0;
  switch ((int)*(argv + 0)) {
    int tmp;
    case 0: r = 0;
    goto switch_0_break;
    case 1: case 2: case 3: default: ;
    r ++;
    tmp = countOne(argv + 1);
    r += tmp;
  }
  switch_0_break: ;
  countOne_post_func(r);
  return r;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_count;
    assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1,
            accept_S2;
    
    behavior buch_state_T0_S2_in:
      assumes 1 ≡ accept_S1;
      ensures 1 ≡ T0_S2;
    
    behavior buch_state_T0_S2_out:
      assumes 0 ≡ accept_S1;
      ensures 0 ≡ T0_S2;
    
    behavior buch_state_T0_init_out:
      ensures 0 ≡ T0_init;
    
    behavior buch_state_accept_S1_out:
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_in:
      assumes 1 ≡ T0_S2;
      ensures 1 ≡ accept_S2;
    
    behavior buch_state_accept_S2_out:
      assumes 0 ≡ T0_S2;
      ensures 0 ≡ accept_S2;
 */
extern void count_pre_func(int argc, char **argv);

/*@ requires
      (1 ≡ T0_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ accept_S2) ∧ 0 ≡ T0_init;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_count;
    assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1,
            accept_S2;
    
    behavior buch_state_T0_S2_in:
      assumes 1 ≡ accept_S1;
      ensures 1 ≡ T0_S2;
    
    behavior buch_state_T0_S2_out:
      assumes 0 ≡ accept_S1;
      ensures 0 ≡ T0_S2;
    
    behavior buch_state_T0_init_out:
      ensures 0 ≡ T0_init;
    
    behavior buch_state_accept_S1_in:
      assumes 1 ≡ accept_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ T0_S2;
      ensures 1 ≡ accept_S1;
    
    behavior buch_state_accept_S1_out:
      assumes 0 ≡ accept_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ T0_S2;
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_in:
      assumes 1 ≡ accept_S2 ∨ 1 ≡ T0_S2;
      ensures 1 ≡ accept_S2;
    
    behavior buch_state_accept_S2_out:
      assumes 0 ≡ accept_S2 ∧ 0 ≡ T0_S2;
      ensures 0 ≡ accept_S2;
 */
extern void count_post_func(int res);

/*@ requires
      (1 ≡ T0_S2 ∨ 1 ≡ accept_S1) ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S2;
    requires 1 ≡ accept_S1 ∨ 0 ≡ accept_S1;
    requires 1 ≡ T0_S2 ∨ 0 ≡ T0_S2;
    
    behavior Buchi_property_behavior:
      ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2;
      ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1;
      ensures 1 ≡ accept_S2 ∨ 0 ≡ accept_S2;
      ensures 0 ≡ T0_init;
      ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1 ∨ 1 ≡ accept_S2;
 */
int count(int argc, char **argv)
{
  int __retres;
  count_pre_func(argc,argv);
  if (argc > 0) {
    int tmp;
    int tmp_0;
    tmp = countOne(*(argv + 0));
    tmp_0 = count(argc - 1,argv + 1);
    __retres = tmp + tmp_0;
    goto return_label;
  }
  __retres = 0;
  return_label: count_post_func(__retres);
  return __retres;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1,
            accept_S2;
    
    behavior buch_state_T0_S2_in:
      assumes 1 ≡ T0_init;
      ensures 1 ≡ T0_S2;
    
    behavior buch_state_T0_S2_out:
      assumes 0 ≡ T0_init;
      ensures 0 ≡ T0_S2;
    
    behavior buch_state_T0_init_out:
      ensures 0 ≡ T0_init;
    
    behavior buch_state_accept_S1_in:
      assumes 1 ≡ T0_init;
      ensures 1 ≡ accept_S1;
    
    behavior buch_state_accept_S1_out:
      assumes 0 ≡ T0_init;
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_out:
      ensures 0 ≡ accept_S2;
 */
extern void main_pre_func(int argc, char **argv);

/*@ requires
      1 ≡ accept_S1 ∧ 0 ≡ T0_S2 ∧ 0 ≡ T0_init ∧ 0 ≡ accept_S2;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, T0_S2, T0_init, accept_S1,
            accept_S2;
    
    behavior buch_state_T0_S2_in:
      assumes 1 ≡ accept_S1;
      ensures 1 ≡ T0_S2;
    
    behavior buch_state_T0_S2_out:
      assumes 0 ≡ accept_S1;
      ensures 0 ≡ T0_S2;
    
    behavior buch_state_T0_init_out:
      ensures 0 ≡ T0_init;
    
    behavior buch_state_accept_S1_in:
      assumes 1 ≡ accept_S1;
      ensures 1 ≡ accept_S1;
    
    behavior buch_state_accept_S1_out:
      assumes 0 ≡ accept_S1;
      ensures 0 ≡ accept_S1;
    
    behavior buch_state_accept_S2_out:
      ensures 0 ≡ accept_S2;
 */
extern void main_post_func(int res);

/*@ requires
      1 ≡ T0_init ∧ 0 ≡ T0_S2 ∧ 0 ≡ accept_S1 ∧ 0 ≡ accept_S2;
    
    behavior aorai_acceptance:
      ensures 1 ≡ accept_S1 ∨ 1 ≡ accept_S2;
    
    behavior Buchi_property_behavior:
      ensures 1 ≡ T0_S2 ∨ 0 ≡ T0_S2;
      ensures 1 ≡ accept_S1 ∨ 0 ≡ accept_S1;
      ensures 0 ≡ T0_init ∧ 0 ≡ accept_S2;
      ensures 1 ≡ T0_S2 ∨ 1 ≡ accept_S1;
 */
int main(int argc, char **argv)
{
  int __retres;
  int somme;
  main_pre_func(argc,argv);
  somme = count(argc,argv);
  __retres = 1;
  main_post_func(__retres);
  return __retres;
}


