let show_cfg (main_ui:Design.main_window_extension_points) with_annot kf =
  let kf_name = Kernel_function.get_name kf in
    main_ui#annot_window#buffer#insert ("[cfg] compute for "^kf_name^"\n");
  let select_init_env = ViewGraph_utils.create_graph_win (kf_name ^ " CFG"in
  let filename = Register.wp_cfg_dot with_annot kf in
    match filename with
      | None ->
      GToolbox.message_box "Error"
        (Format.sprintf "Didn't succed to build the CFG of %s\nSorry !" 
           kf_name)
      | Some filename ->
  let env = () in
    try
      let _graph = V.open_dot_file env select_init_env filename in
        ()
    with ViewGraph.DotError _ ->
      GToolbox.message_box "Error"
        (Printf.sprintf "Didn't succed to build graph for %s\nSorry !" filename)