method vglob_aux g = match g with
    | GVar(v,_init,loc) ->
        (* Make sure variable declaration is treated before definition *)
        ignore (visitFramacVarDecl (self:>frama_c_visitor) v);
        if VarinfoSet.mem v !allocvarset then
          (* Allocate memory for new reference variable *)
          let ty = VarinfoHashtbl.find var_to_array_type v in
          let elemty = element_type ty in
          let size = array_size ty in
          let ast = mkalloc_array_statement v elemty (array_size ty) loc in
          attach_globinit ast;
          (* Define a global validity invariant *)
          let p =
            Pvalid_range(
              variable_term v.vdecl (cvar_to_lvar v),
              constant_term v.vdecl 0L,
              constant_term v.vdecl (size - 1L))
          in
          let globinv =
            Cil_const.make_logic_info (unique_logic_name ("valid_" ^ v.vname)) in
          globinv.l_labels <- [ LogicLabel "Here" ];
          globinv.l_body <- LBpred (predicate v.vdecl p);
          attach_globaction (fun () -> Logic_utils.add_logic_function globinv);
          ChangeTo [g;GAnnot(Dinvariant globinv,v.vdecl)]
        else DoChildren
    | GVarDecl _ | GFun _ | GAnnot _ -> DoChildren
    | GCompTag _ | GType _ | GCompTagDecl _ | GEnumTagDecl _
    | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren