method vfunc f =
    let spec= Kernel_function.get_spec (Globals.Functions.get f.svar) in

(* Rewriting arrays carracterizing status into predicates *)
    let preds_pre  = Ltl_utils.pre_post_to_term (Data_for_ltl.get_func_pre  f.svar.vname) in
    let preds_post_bc = Data_for_ltl.get_func_post_bycase f.svar.vname in

(* if AddingOperationNameAndStatusInSpecification is set*)
(* adding the condition CALLED for pre*)
    let preds_pre_with_called_stat = fun preds_pre -> ( 

      if Ltl_to_acsl_option.AddingOperationNameAndStatusInSpecification.get() then begin
        let called_pre = Logic_const.prel (Req ,Ltl_utils.mk_term_from_vi (Data_for_ltl.get_varinfo Data_for_ltl.curOpStatus),  (Logic_utils.mk_dummy_term (TConst(Data_for_ltl.op_status_to_cenum Promelaast.Call)) Cil.intType)) in
        let called_pre_2 =  Logic_const.prel (Req ,Ltl_utils.mk_term_from_vi (Data_for_ltl.get_varinfo Data_for_ltl.curOp), (Logic_utils.mk_dummy_term (TConst(Data_for_ltl.func_to_cenum f.svar.vname)) Cil.intType)) in
        
        List.append [called_pre;called_pre_2] preds_pre                        
      end
      else
        preds_pre
    )in
    
    let preds_pre  = preds_pre_with_called_stat preds_pre in



(* Registration of the new specification *)

(*   + Pre-condition registration *)
    List.iter
      (fun p -> spec.spec_requires <- ((Logic_const.new_predicate p) :: (spec.spec_requires)) )
      preds_pre;


(*   + Post-condition registration *)
(*      If several states are associated to the same post-condition,
        then their specification is factorised. *)

    let nb_states=Data_for_ltl.getNumberOfStates() in
    let treated=ref (Array.make nb_states falsein
                



(*      the goal is to know how many behavior are created: if only one behavior is created so the assumes is not needed*)

    let nb_behavior = ref 0 in
    let save_assumes_l = ref [] in        
    (* Initialized with an empty behavior *)
    let old_behavior = ref {b_name = ""; b_assumes = []; b_ensures = []; b_assigns = []; } in
                
    Array.iteri
      (fun case preds_post ->

         if   (not (Spec_tools.is_empty_behavior preds_post) )
           && (not (!treated).(case))
         then begin
           let new_behavior =
             {
                  b_name = "Buchi_property_behavior_"^(string_of_int case); (*        name of the behavior.        *)
                  b_assumes = [] ;                    (*        assume clauses.        *)
                  b_ensures = [] ;                    (*        ensure clauses.        *)
                  b_assigns = [] ;                    (*        assignments.        *)
             }
           in

           let all_eqs_states = get_other_states_with_equivalent_post nb_states preds_post_bc case in
           let assumes_l = ref [] in
                 
                
           Array.iteri
             (fun i b -> if b then
                assumes_l:=Logic_const.prel(
                  Rneq,
                  Ltl_utils.zero_term(),
                  Ltl_utils.mk_offseted_array
                    (Logic_utils.lval_to_term_lval (Cil.var (Data_for_ltl.get_varinfo Data_for_ltl.curState)))
                    i
                )::!assumes_l
             )
             all_eqs_states;
                        
                        
(* On the first behavior's creation, we supposed that assumes are not needed*)
(* but on the second, we know that the first must be set so*)
(* we put into the first the omitting behaviors (saved in old_behavior) and all assumes (saved in save_assumes_l)*)
(* After that, the loop is classic (behavior are automatically setted)*)
           begin
             match !nb_behavior with
               | 0 -> nb_behavior:=1;
                   save_assumes_l := !assumes_l ;
                   old_behavior := new_behavior;
                   Ltl_to_acsl_option.debug "one behavior"
                     
               | 1 -> nb_behavior:=2;
                   new_behavior.b_assumes<-[Logic_const.new_predicate (Ltl_utils.mk_disjunction_named !assumes_l)];
                   (!old_behavior).b_assumes<-[Logic_const.new_predicate (Ltl_utils.mk_disjunction_named !save_assumes_l)];
                   Ltl_to_acsl_option.debug "2 behaviors"
                     
               | _ -> new_behavior.b_assumes<-[Logic_const.new_predicate (Ltl_utils.mk_disjunction_named !assumes_l)];   
           end;
                         
                                
                                
           Ltl_to_acsl_option.debug "behaviors registration";
           treated:=bool_array_or !treated all_eqs_states;

           (*
           new_behavior.b_assumes<-
             [Logic_const.new_predicate
                (Logic_const.prel(
                   Rneq,
                   Ltl_utils.zero_term(),
                   Ltl_utils.mk_offseted_array
                     (Logic_const.lval_to_term_lval (Cil.var (Data_for_ltl.get_varinfo Data_for_ltl.curState)))
                     case))];*)




           let preds_list = Ltl_utils.pre_post_to_term (preds_post,(snd preds_post_bc).(case)) in
           List.iter
             (fun p -> new_behavior.b_ensures <- ((Logic_const.new_predicate p) :: (new_behavior.b_ensures)) )
             preds_list;
           spec.spec_behavior <- new_behavior::spec.spec_behavior

         end
      )
      (fst preds_post_bc);
(*      spec.spec_complete_behaviors <- new_behavior.b_name::spec.spec_complete_behaviors;*)


    (* if bycase is set*)
    (* adding require called and behavior ensures return *)
    let preds_post_with_return_status  =  fun spec -> ( 
      if Ltl_to_acsl_option.AddingOperationNameAndStatusInSpecification.get() then begin
        let called_post = Logic_const.new_predicate (Logic_const.prel (Req ,Ltl_utils.mk_term_from_vi (Data_for_ltl.get_varinfo Data_for_ltl.curOpStatus),  (Logic_utils.mk_dummy_term (TConst(Data_for_ltl.op_status_to_cenum Promelaast.Return)) Cil.intType))) in
        let called_post_2 = Logic_const.new_predicate (Logic_const.prel (Req ,Ltl_utils.mk_term_from_vi (Data_for_ltl.get_varinfo Data_for_ltl.curOp), (Logic_utils.mk_dummy_term (TConst(Data_for_ltl.func_to_cenum f.svar.vname)) Cil.intType))) in
        let new_behavior =
          {
            b_name = "Buchi_property_behavior_function_states"(* name of the behavior.   *)
            b_assumes = [] ;                    (*   assume clauses. *)
            b_ensures = [called_post;called_post_2] ;                    (*   ensure clauses. *)
            b_assigns = [] ;                    (*   assignments.    *)
          }
        in        
        spec.spec_behavior <- new_behavior::spec.spec_behavior
          
      end
      else
        ()
    )in
    preds_post_with_return_status spec;
    
    DoChildren