[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/aorai/other.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_other0.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
};
int x = 0;
/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */
/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */
/*@ ghost int init = 1; */
/*@ ghost int last = 0; */
/*@ ghost int step1 = 0; */
/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_f;
    assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1;
    
    behavior buch_state_init_in:
      assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3);
      ensures 1 ≡ init;
    
    behavior buch_state_init_out:
      assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3));
      ensures 0 ≡ init;
    
    behavior buch_state_last_in:
      assumes
        (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3);
      ensures 1 ≡ last;
    
    behavior buch_state_last_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧
        (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3));
      ensures 0 ≡ last;
    
    behavior buch_state_step1_in:
      assumes
        (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨
        (1 ≡ init ∧ x ≡ 3);
      ensures 1 ≡ step1;
    
    behavior buch_state_step1_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧
        (0 ≡ init ∨ ¬(x ≡ 3));
      ensures 0 ≡ step1;
 */
extern void f_pre_func(void);

/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1;
    requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_f;
    assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1;
    
    behavior buch_state_init_in:
      assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3);
      ensures 1 ≡ init;
    
    behavior buch_state_init_out:
      assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3));
      ensures 0 ≡ init;
    
    behavior buch_state_last_in:
      assumes
        (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3);
      ensures 1 ≡ last;
    
    behavior buch_state_last_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧
        (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3));
      ensures 0 ≡ last;
    
    behavior buch_state_step1_in:
      assumes
        (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨
        (1 ≡ init ∧ x ≡ 3);
      ensures 1 ≡ step1;
    
    behavior buch_state_step1_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧
        (0 ≡ init ∨ ¬(x ≡ 3));
      ensures 0 ≡ step1;
 */
extern void f_post_func(void);

/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1;
    requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3;
    requires 1 ≡ step1 ∨ 0 ≡ step1;
    requires 1 ≡ last ∨ 0 ≡ last;
    requires 1 ≡ init ∨ 0 ≡ init;
    
    behavior Buchi_behavior_in_0:
      assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3);
      ensures
        (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧
        (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧
        (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4);
      ensures 1 ≡ init ∨ 0 ≡ init;
      ensures 1 ≡ step1 ∨ 0 ≡ step1;
      ensures 1 ≡ init ∨ 1 ≡ step1;
    
    behavior Buchi_behavior_in_1:
      assumes
        (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3);
      ensures
        (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧
        (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧
        (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4);
      ensures 1 ≡ init ∨ 0 ≡ init;
      ensures 1 ≡ last ∨ 0 ≡ last;
      ensures 1 ≡ step1 ∨ 0 ≡ step1;
      ensures 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1;
    
    behavior Buchi_behavior_in_2:
      assumes
        (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨
        (1 ≡ init ∧ x ≡ 3);
      ensures
        (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧
        (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧
        (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4);
      ensures 1 ≡ last ∨ 0 ≡ last;
      ensures 1 ≡ step1 ∨ 0 ≡ step1;
      ensures 1 ≡ last ∨ 1 ≡ step1;
    
    behavior Buchi_behavior_out_0:
      assumes
        (0 ≡ last ∨ (x ≡ 3 ∧ x ≢ 4)) ∧
        (0 ≡ step1 ∨ x ≢ 4) ∧ (0 ≡ init ∨ x ≡ 3);
      ensures 0 ≡ init;
    
    behavior Buchi_behavior_out_1:
      assumes
        0 ≡ step1 ∧ (0 ≡ init ∨ x ≢ 3) ∧
        (0 ≡ last ∨ (x ≢ 3 ∧ x ≡ 4));
      ensures 0 ≡ last;
    
    behavior Buchi_behavior_out_2:
      assumes 0 ≡ last ∧ 0 ≡ init ∧ 0 ≡ step1;
      ensures 0 ≡ step1;
 */
void f(void)
{
  f_pre_func();
  x = 3;
  f_post_func();
  return;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_g;
    assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1;
    
    behavior buch_state_init_in:
      assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3);
      ensures 1 ≡ init;
    
    behavior buch_state_init_out:
      assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3));
      ensures 0 ≡ init;
    
    behavior buch_state_last_in:
      assumes
        (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3);
      ensures 1 ≡ last;
    
    behavior buch_state_last_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧
        (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3));
      ensures 0 ≡ last;
    
    behavior buch_state_step1_in:
      assumes
        (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨
        (1 ≡ init ∧ x ≡ 3);
      ensures 1 ≡ step1;
    
    behavior buch_state_step1_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧
        (0 ≡ init ∨ ¬(x ≡ 3));
      ensures 0 ≡ step1;
 */
extern void g_pre_func(void);

/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1;
    requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_g;
    assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1;
    
    behavior buch_state_init_in:
      assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3);
      ensures 1 ≡ init;
    
    behavior buch_state_init_out:
      assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3));
      ensures 0 ≡ init;
    
    behavior buch_state_last_in:
      assumes
        (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3);
      ensures 1 ≡ last;
    
    behavior buch_state_last_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧
        (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3));
      ensures 0 ≡ last;
    
    behavior buch_state_step1_in:
      assumes
        (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨
        (1 ≡ init ∧ x ≡ 3);
      ensures 1 ≡ step1;
    
    behavior buch_state_step1_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧
        (0 ≡ init ∨ ¬(x ≡ 3));
      ensures 0 ≡ step1;
 */
extern void g_post_func(void);

/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1;
    requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3;
    requires 1 ≡ step1 ∨ 0 ≡ step1;
    requires 1 ≡ last ∨ 0 ≡ last;
    requires 1 ≡ init ∨ 0 ≡ init;
    
    behavior Buchi_behavior_in_0:
      assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3);
      ensures
        (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧
        (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧
        (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4);
      ensures 1 ≡ init ∨ 0 ≡ init;
      ensures 1 ≡ step1 ∨ 0 ≡ step1;
      ensures 1 ≡ init ∨ 1 ≡ step1;
    
    behavior Buchi_behavior_in_1:
      assumes
        (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3);
      ensures
        (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧
        (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧
        (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4);
      ensures 1 ≡ init ∨ 0 ≡ init;
      ensures 1 ≡ last ∨ 0 ≡ last;
      ensures 1 ≡ step1 ∨ 0 ≡ step1;
      ensures 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1;
    
    behavior Buchi_behavior_in_2:
      assumes
        (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨
        (1 ≡ init ∧ x ≡ 3);
      ensures
        (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧
        (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧
        (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4);
      ensures 1 ≡ last ∨ 0 ≡ last;
      ensures 1 ≡ step1 ∨ 0 ≡ step1;
      ensures 1 ≡ last ∨ 1 ≡ step1;
    
    behavior Buchi_behavior_out_0:
      assumes
        (0 ≡ last ∨ (x ≡ 3 ∧ x ≢ 4)) ∧
        (0 ≡ step1 ∨ x ≢ 4) ∧ (0 ≡ init ∨ x ≡ 3);
      ensures 0 ≡ init;
    
    behavior Buchi_behavior_out_1:
      assumes
        0 ≡ step1 ∧ (0 ≡ init ∨ x ≢ 3) ∧
        (0 ≡ last ∨ (x ≢ 3 ∧ x ≡ 4));
      ensures 0 ≡ last;
    
    behavior Buchi_behavior_out_2:
      assumes 0 ≡ last ∧ 0 ≡ init ∧ 0 ≡ step1;
      ensures 0 ≡ step1;
 */
void g(void)
{
  g_pre_func();
  x = 4;
  g_post_func();
  return;
}

/*@ ensures aorai_CurOpStatus ≡ aorai_Called;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1;
    
    behavior buch_state_init_in:
      assumes 1 ≡ init ∧ x ≢ 3;
      ensures 1 ≡ init;
    
    behavior buch_state_init_out:
      assumes 0 ≡ init ∨ ¬(x ≢ 3);
      ensures 0 ≡ init;
    
    behavior buch_state_last_out:
      ensures 0 ≡ last;
    
    behavior buch_state_step1_out:
      ensures 0 ≡ step1;
 */
extern void main_pre_func(void);

/*@ requires 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1;
    requires 1 ≡ last ⇒ x ≡ 4 ∨ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 3;
    ensures aorai_CurOpStatus ≡ aorai_Terminated;
    ensures aorai_CurOperation ≡ op_main;
    assigns aorai_CurOpStatus, aorai_CurOperation, init, last, step1;
    
    behavior buch_state_init_in:
      assumes (1 ≡ last ∧ x ≡ 4) ∨ (1 ≡ init ∧ x ≢ 3);
      ensures 1 ≡ init;
    
    behavior buch_state_init_out:
      assumes (0 ≡ last ∨ ¬(x ≡ 4)) ∧ (0 ≡ init ∨ ¬(x ≢ 3));
      ensures 0 ≡ init;
    
    behavior buch_state_last_in:
      assumes
        (1 ≡ step1 ∧ x ≡ 4) ∨ (1 ≡ last ∧ x ≢ 4 ∧ x ≢ 3);
      ensures 1 ≡ last;
    
    behavior buch_state_last_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≡ 4)) ∧
        (0 ≡ last ∨ ¬(x ≢ 4 ∧ x ≢ 3));
      ensures 0 ≡ last;
    
    behavior buch_state_step1_in:
      assumes
        (1 ≡ step1 ∧ x ≢ 4) ∨ (1 ≡ last ∧ x ≡ 3) ∨
        (1 ≡ init ∧ x ≡ 3);
      ensures 1 ≡ step1;
    
    behavior buch_state_step1_out:
      assumes
        (0 ≡ step1 ∨ ¬(x ≢ 4)) ∧ (0 ≡ last ∨ ¬(x ≡ 3)) ∧
        (0 ≡ init ∨ ¬(x ≡ 3));
      ensures 0 ≡ step1;
 */
extern void main_post_func(int res);

/*@ requires 1 ≡ init ∧ 0 ≡ last ∧ 0 ≡ step1;
    requires 1 ≡ init ⇒ x ≢ 3;
    
    behavior aorai_acceptance:
      ensures 1 ≡ last;
    
    behavior Buchi_property_behavior:
      ensures
        (1 ≡ init ⇒ x ≢ 3 ∨ x ≡ 4) ∧
        (1 ≡ last ⇒ (x ≢ 4 ∧ x ≢ 3) ∨ x ≡ 4) ∧
        (1 ≡ step1 ⇒ x ≡ 3 ∨ x ≢ 4);
      ensures 1 ≡ init ∨ 0 ≡ init;
      ensures 1 ≡ last ∨ 0 ≡ last;
      ensures 1 ≡ step1 ∨ 0 ≡ step1;
      ensures \true;
      ensures 1 ≡ init ∨ 1 ≡ last ∨ 1 ≡ step1;
 */
int main(void)
{
  main_pre_func();
  f();
  g();
  f();
  g();
  main_post_func(x);
  return x;
}


