method vstmt_aux stmt =
    let treat_loop body_ref stmt =

      (* varinfo of the init_var associated to this loop *)
      let vi_init = Data_for_ltl.get_varinfo (Data_for_ltl.loopInit^"_"^(string_of_int stmt.sid)) in


(*    1) The associated init variable is set to 0 in first position
         (or in second position if the first stmt is a if)*)


      let stmt_varset = Cil.mkStmtOneInstr (Set((Var(vi_init),NoOffset), Ltl_utils.mk_int_exp 0, Cilutil.locUnknown)) in
      stmt_varset.sid<-(Cil.Sid.next ());
      stmt_varset.ghost<-true;

      begin
        (* Function adaptated from the cil printer *)
        try
          let rec skipEmpty = function
              [] -> []
            | {skind=Instr (Skip _);labels=[]} :: rest -> skipEmpty rest
            | x -> x
          in

          match skipEmpty !body_ref.bstmts with
            | {skind=If(_,tb,fb,_)} as head:: _ ->
                begin
                  match skipEmpty tb.bstmts, skipEmpty fb.bstmts with
                    | [], {skind=Break _}:: _
                    | [], {skind=Goto _} :: _
                    | {skind=Goto _} :: _, []
                    | {skind=Break _} :: _, [] ->
                        !body_ref.bstmts<-head::(stmt_varset::(List.tl !body_ref.bstmts))

                    | _ ->
                        raise Not_found
                end
            | _ -> raise Not_found

        with
          | Not_found ->
              !body_ref.bstmts<-stmt_varset::!body_ref.bstmts
      end;


(*    2) The associated init variable is set to 1 before the loop *)
      let new_loop = mkStmt stmt.skind in
      new_loop.sid<-(Cil.Sid.next ());
      let stmt_varset = Cil.mkStmtOneInstr (Set((Var(vi_init),NoOffset), Ltl_utils.mk_int_exp 1, Cilutil.locUnknown)) in
      stmt_varset.sid<-(Cil.Sid.next ());
      stmt_varset.ghost<-true;
      let block = mkBlock [stmt_varset;new_loop] in
      stmt.skind<-Block(block);



(*    3) Generation of the loop invariant *)
(* The loop invariant is :
     (c  => Pre2)
   & (!c => Post1) !! -> Since loops are while (1), this case seems to be useless
   & (Init => Pre1)
   & (not Init => Post2)
   (init : fresh variable which indicates if the iteration is the first one).
   (c :  fresh variable allowing multiple read of the condition even if its expression includes some side effects.)
*)


      let global_loop_inv =
        double_bool_array_or
          (double_bool_array_or
             (Spec_tools.pre_flattening (Data_for_ltl.get_loop_int_pre_bycase (ref stmt)))
             (Spec_tools.pre_flattening (Data_for_ltl.get_loop_ext_pre_bycase (ref stmt))))
          (Spec_tools.pre_flattening (Data_for_ltl.get_loop_int_post_bycase (ref stmt)))
      in
      condition_to_invariant global_loop_inv (ref new_loop);

      let p1 = Ltl_utils.force_condition_to_predicate global_loop_inv (Spec_tools.pre_flattening (Data_for_ltl.get_loop_int_pre_bycase (ref stmt)))  in
      if p1<>Cil_types.Ptrue then
        predicate_to_invariant (ref new_loop) (Logic_const.unamed p1);

(*      force_condition_to_predicate global_loop_inv (Data_for_ltl.get_loop_ext_post (ref stmt))*)

      let p2= Ltl_utils.force_condition_to_predicate global_loop_inv (Spec_tools.pre_flattening (Data_for_ltl.get_loop_ext_pre_bycase (ref stmt))) in
      if p2<>Cil_types.Ptrue then
        predicate_to_invariant
          (ref new_loop)
          (Logic_const.unamed (Pimplies (Logic_const.unamed (Prel(Rneq,Ltl_utils.mk_term_from_vi vi_init,Ltl_utils.zero_term())),Logic_const.unamed p2)));

      let p3= Ltl_utils.force_condition_to_predicate global_loop_inv (Spec_tools.pre_flattening (Data_for_ltl.get_loop_int_post_bycase (ref stmt))) in
      if p3<>Cil_types.Ptrue then
        predicate_to_invariant
          (ref new_loop)
          (Logic_const.unamed (Pimplies (Logic_const.unamed (Prel(Req,Ltl_utils.mk_term_from_vi vi_init,Ltl_utils.zero_term())),Logic_const.unamed p3)));



(*    4) Keeping old annotations *)
      Hashtbl.add post_treatment_loops (ref stmt) (ref new_loop);


(*    5) Updated stmt is returned *)
          stmt
    in
    if treatloops then
      match stmt.skind with
        | Loop (_,block,_,_,_) ->
            ChangeDoChildrenPost(stmt, treat_loop (ref block))

        | _ -> DoChildren
    else
      DoChildren