method vglob_aux g =
    match g with
      | GVarDecl(_,v,_) when 
          Cil.isFunctionType v.vtype
          && not (Kernel_function.is_definition (Extlib.the self#current_kf))
        ->
        let my_kf = Extlib.the self#current_kf in
        (* don't use get_spec, as we'd generate default assigns,
           while we'll fill the spec just below. *)

        let spec = my_kf.spec in
        let vi = Kernel_function.get_vi my_kf in
        begin
          match kind_of_func vi with
            | Pre_func kf ->
              (* must advance the automaton according to current call. *)
              let bhvs = mk_pre_fct_spec kf in
              let bhvs =
                Visitor.visitFramacBehaviors (new change_formals kf my_kf) bhvs
              in
              spec.spec_behavior <- bhvs;
              ChangeDoChildrenPost([g],fun x -> x)
            | Post_func kf ->
              (* must advance the automaton according to return event. *)
              let (rt, _, _, _) = 
                Cil.splitFunctionTypeVI (Kernel_function.get_vi kf)
              in
              let bhvs = mk_post_fct_spec kf in
              let bhvs =
                (* if return type is not void, convert \result in the formal
                   arg of current kf. Otherwise, there's no conversion to do.
                 *)

                if Cil.isVoidType rt then bhvs
                else
                  Visitor.visitFramacBehaviors (new change_result my_kf) bhvs
              in
              spec.spec_behavior <- bhvs;
              ChangeDoChildrenPost([g], fun x -> x)
            | Not_auto_func -> DoChildren (* they are not considered here. *)
        end
      | _ -> DoChildren