[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/aorai/deterministic.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_deterministic0.i (no preprocessing)
/* Generated by Frama-C */
enum aorai_States {
    aorai_reject_state = -2,
    S0 = 0,
    S1 = 1,
    S2 = 2,
    S3 = 3,
    S4 = 4,
    S5 = 5,
    Sf = 6,
    Si = 7
};
enum aorai_ListOper {
    op_f = 3,
    op_g = 2,
    op_main = 1,
    op_real_main = 0
};
enum aorai_OpStatusList {
    aorai_Terminated = 1,
    aorai_Called = 0
};
/*@ lemma Si_deterministic_trans{L}: \true;
 */
/*@ lemma Sf_deterministic_trans{L}: \true;
 */
/*@ lemma S5_deterministic_trans{L}: \true;
 */
/*@ lemma S4_deterministic_trans{L}: \true;
 */
/*@ lemma S2_deterministic_trans{L}: \true;
 */
int X;
int Y;
/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */
/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */
/*@
lemma S3_deterministic_trans{L}:
  ∀ int x;
    ¬(\at(aorai_CurOperation,L) ≡ op_g ∧
       \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ x ≡ 5 ∧
       \at(aorai_CurOperation,L) ≡ op_g ∧
       \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ x ≡ 4);
 */
/*@
lemma S1_deterministic_trans{L}:
  ∀ int __retres_f, int x;
    ¬(\at(X,L) ≡ 5 ∧ \at(aorai_CurOperation,L) ≡ op_f ∧
       \at(aorai_CurOpStatus,L) ≡ aorai_Terminated ∧ __retres_f ≡ 0 ∧
       \at(aorai_CurOperation,L) ≡ op_f ∧
       \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ x ≡ 4);
 */
/*@
lemma S0_deterministic_trans{L}:
  ∀ int c;
    ¬(\at(aorai_CurOperation,L) ≡ op_real_main ∧
       \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ c ≢ 0 ∧
       \at(aorai_CurOperation,L) ≡ op_real_main ∧
       \at(aorai_CurOpStatus,L) ≡ aorai_Called ∧ c ≡ 0);
 */
/*@ ghost int aorai_CurStates = Si; */
/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_g;
    assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates;
    
    behavior buch_state_S0_out:
      ensures aorai_CurStates ≢ S0;
    
    behavior buch_state_S1_out:
      ensures aorai_CurStates ≢ S1;
    
    behavior buch_state_S2_out:
      ensures aorai_CurStates ≢ S2;
    
    behavior buch_state_S3_out:
      ensures aorai_CurStates ≢ S3;
    
    behavior buch_state_S4_in:
      assumes aorai_CurStates ≡ S3 ∧ x ≡ 4;
      ensures aorai_CurStates ≡ S4;
    
    behavior buch_state_S4_out:
      assumes aorai_CurStates ≢ S3 ∨ ¬(x ≡ 4);
      ensures aorai_CurStates ≢ S4;
    
    behavior buch_state_S5_in:
      assumes aorai_CurStates ≡ S3 ∧ x ≡ 5;
      ensures aorai_CurStates ≡ S5;
    
    behavior buch_state_S5_out:
      assumes aorai_CurStates ≢ S3 ∨ ¬(x ≡ 5);
      ensures aorai_CurStates ≢ S5;
    
    behavior buch_state_Sf_out:
      ensures aorai_CurStates ≢ Sf;
    
    behavior buch_state_Si_out:
      ensures aorai_CurStates ≢ Si;
 */
extern void g_pre_func(int x);

/*@ requires aorai_CurStates ≡ S4 ∨ aorai_CurStates ≡ S5;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_g;
    assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates;
    
    behavior buch_state_S0_out:
      ensures aorai_CurStates ≢ S0;
    
    behavior buch_state_S1_in:
      assumes aorai_CurStates ≡ S5;
      ensures aorai_CurStates ≡ S1;
    
    behavior buch_state_S1_out:
      assumes aorai_CurStates ≢ S5;
      ensures aorai_CurStates ≢ S1;
    
    behavior buch_state_S2_out:
      ensures aorai_CurStates ≢ S2;
    
    behavior buch_state_S3_in:
      assumes aorai_CurStates ≡ S4;
      ensures aorai_CurStates ≡ S3;
    
    behavior buch_state_S3_out:
      assumes aorai_CurStates ≢ S4;
      ensures aorai_CurStates ≢ S3;
    
    behavior buch_state_S4_out:
      ensures aorai_CurStates ≢ S4;
    
    behavior buch_state_S5_out:
      ensures aorai_CurStates ≢ S5;
    
    behavior buch_state_Sf_out:
      ensures aorai_CurStates ≢ Sf;
    
    behavior buch_state_Si_out:
      ensures aorai_CurStates ≢ Si;
 */
extern void g_post_func(void);

/*@ requires aorai_CurStates ≡ S3;
    requires aorai_CurStates ≡ S3 ⇒ x ≡ 4 ∨ x ≡ 5;
    
    behavior Buchi_behavior_in_1:
      assumes aorai_CurStates ≡ S3 ∧ x ≡ 5;
      ensures aorai_CurStates ≡ S1;
    
    behavior Buchi_behavior_in_0:
      assumes aorai_CurStates ≡ S3 ∧ x ≡ 4;
      ensures aorai_CurStates ≡ S3;
 */
void g(int x)
{
  g_pre_func(x);
  Y = x;
  g_post_func();
  return;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_f;
    assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates;
    
    behavior buch_state_S0_out:
      ensures aorai_CurStates ≢ S0;
    
    behavior buch_state_S1_out:
      ensures aorai_CurStates ≢ S1;
    
    behavior buch_state_S2_out:
      ensures aorai_CurStates ≢ S2;
    
    behavior buch_state_S3_in:
      assumes aorai_CurStates ≡ S1 ∧ x ≡ 4;
      ensures aorai_CurStates ≡ S3;
    
    behavior buch_state_S3_out:
      assumes aorai_CurStates ≢ S1 ∨ ¬(x ≡ 4);
      ensures aorai_CurStates ≢ S3;
    
    behavior buch_state_S4_out:
      ensures aorai_CurStates ≢ S4;
    
    behavior buch_state_S5_out:
      ensures aorai_CurStates ≢ S5;
    
    behavior buch_state_Sf_out:
      ensures aorai_CurStates ≢ Sf;
    
    behavior buch_state_Si_out:
      ensures aorai_CurStates ≢ Si;
 */
extern void f_pre_func(int x);

/*@ requires aorai_CurStates ≡ S1;
    requires aorai_CurStates ≡ S1 ⇒ res ≡ 0 ∧ X ≡ 5;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_f;
    assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates;
    
    behavior buch_state_S0_out:
      ensures aorai_CurStates ≢ S0;
    
    behavior buch_state_S1_out:
      ensures aorai_CurStates ≢ S1;
    
    behavior buch_state_S2_in:
      assumes aorai_CurStates ≡ S1 ∧ X ≡ 5 ∧ res ≡ 0;
      ensures aorai_CurStates ≡ S2;
    
    behavior buch_state_S2_out:
      assumes aorai_CurStates ≢ S1 ∨ ¬(X ≡ 5 ∧ res ≡ 0);
      ensures aorai_CurStates ≢ S2;
    
    behavior buch_state_S3_out:
      ensures aorai_CurStates ≢ S3;
    
    behavior buch_state_S4_out:
      ensures aorai_CurStates ≢ S4;
    
    behavior buch_state_S5_out:
      ensures aorai_CurStates ≢ S5;
    
    behavior buch_state_Sf_out:
      ensures aorai_CurStates ≢ Sf;
    
    behavior buch_state_Si_out:
      ensures aorai_CurStates ≢ Si;
 */
extern void f_post_func(int res);

/*@ requires aorai_CurStates ≡ S1;
    requires aorai_CurStates ≡ S1 ⇒ x ≡ 4;
    
    behavior Buchi_property_behavior:
      ensures aorai_CurStates ≡ S2 ⇒ \result ≡ 0 ∧ X ≡ 5;
      ensures aorai_CurStates ≡ S2;
 */
int f(int x)
{
  int __retres;
  f_pre_func(x);
  X = x;
  g(X);
  X ++;
  g(X);
  __retres = 0;
  f_post_func(__retres);
  return __retres;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_real_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates;
    
    behavior buch_state_S0_out:
      ensures aorai_CurStates ≢ S0;
    
    behavior buch_state_S1_in:
      assumes aorai_CurStates ≡ S0 ∧ c ≢ 0;
      ensures aorai_CurStates ≡ S1;
    
    behavior buch_state_S1_out:
      assumes aorai_CurStates ≢ S0 ∨ c ≡ 0;
      ensures aorai_CurStates ≢ S1;
    
    behavior buch_state_S2_in:
      assumes aorai_CurStates ≡ S0 ∧ c ≡ 0;
      ensures aorai_CurStates ≡ S2;
    
    behavior buch_state_S2_out:
      assumes aorai_CurStates ≢ S0 ∨ ¬(c ≡ 0);
      ensures aorai_CurStates ≢ S2;
    
    behavior buch_state_S3_out:
      ensures aorai_CurStates ≢ S3;
    
    behavior buch_state_S4_out:
      ensures aorai_CurStates ≢ S4;
    
    behavior buch_state_S5_out:
      ensures aorai_CurStates ≢ S5;
    
    behavior buch_state_Sf_out:
      ensures aorai_CurStates ≢ Sf;
    
    behavior buch_state_Si_out:
      ensures aorai_CurStates ≢ Si;
 */
extern void real_main_pre_func(int c);

/*@ requires aorai_CurStates ≡ S2;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_real_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates;
    
    behavior buch_state_S0_out:
      ensures aorai_CurStates ≢ S0;
    
    behavior buch_state_S1_out:
      ensures aorai_CurStates ≢ S1;
    
    behavior buch_state_S2_out:
      ensures aorai_CurStates ≢ S2;
    
    behavior buch_state_S3_out:
      ensures aorai_CurStates ≢ S3;
    
    behavior buch_state_S4_out:
      ensures aorai_CurStates ≢ S4;
    
    behavior buch_state_S5_out:
      ensures aorai_CurStates ≢ S5;
    
    behavior buch_state_Sf_in:
      assumes aorai_CurStates ≡ S2;
      ensures aorai_CurStates ≡ Sf;
    
    behavior buch_state_Sf_out:
      assumes aorai_CurStates ≢ S2;
      ensures aorai_CurStates ≢ Sf;
    
    behavior buch_state_Si_out:
      ensures aorai_CurStates ≢ Si;
 */
extern void real_main_post_func(int res);

/*@ requires aorai_CurStates ≡ S0;
    requires aorai_CurStates ≡ S0 ⇒ c ≢ 0 ∨ c ≡ 0;
    
    behavior Buchi_property_behavior:
      ensures aorai_CurStates ≡ Sf;
 */
int real_main(int c)
{
  int __retres;
  real_main_pre_func(c);
  if (c) f(4);
  __retres = 0;
  real_main_post_func(__retres);
  return __retres;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates;
    
    behavior buch_state_S0_in:
      assumes aorai_CurStates ≡ Si;
      ensures aorai_CurStates ≡ S0;
    
    behavior buch_state_S0_out:
      assumes aorai_CurStates ≢ Si;
      ensures aorai_CurStates ≢ S0;
    
    behavior buch_state_S1_out:
      ensures aorai_CurStates ≢ S1;
    
    behavior buch_state_S2_out:
      ensures aorai_CurStates ≢ S2;
    
    behavior buch_state_S3_out:
      ensures aorai_CurStates ≢ S3;
    
    behavior buch_state_S4_out:
      ensures aorai_CurStates ≢ S4;
    
    behavior buch_state_S5_out:
      ensures aorai_CurStates ≢ S5;
    
    behavior buch_state_Sf_out:
      ensures aorai_CurStates ≢ Sf;
    
    behavior buch_state_Si_out:
      ensures aorai_CurStates ≢ Si;
 */
extern void main_pre_func(int c);

/*@ requires aorai_CurStates ≡ Sf;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates;
    
    behavior buch_state_S0_out:
      ensures aorai_CurStates ≢ S0;
    
    behavior buch_state_S1_out:
      ensures aorai_CurStates ≢ S1;
    
    behavior buch_state_S2_out:
      ensures aorai_CurStates ≢ S2;
    
    behavior buch_state_S3_out:
      ensures aorai_CurStates ≢ S3;
    
    behavior buch_state_S4_out:
      ensures aorai_CurStates ≢ S4;
    
    behavior buch_state_S5_out:
      ensures aorai_CurStates ≢ S5;
    
    behavior buch_state_Sf_in:
      assumes aorai_CurStates ≡ Sf;
      ensures aorai_CurStates ≡ Sf;
    
    behavior buch_state_Sf_out:
      assumes aorai_CurStates ≢ Sf;
      ensures aorai_CurStates ≢ Sf;
    
    behavior buch_state_Si_out:
      ensures aorai_CurStates ≢ Si;
 */
extern void main_post_func(int res);

/*@ requires aorai_CurStates ≡ Si;
    
    behavior Buchi_property_behavior:
      ensures aorai_CurStates ≡ Sf;
 */
int main(int c)
{
  int tmp;
  main_pre_func(c);
  tmp = real_main(c);
  main_post_func(tmp);
  return tmp;
}


