let cfg_dot msg dotname cfg restbl =
  let dotname = (dotname ^ ".dot"in
    Wp_parameters.result "export %s in %s@." msg dotname;
    let _ = match restbl with 
      | None -> Cil2cfg.display ~file:dotname cfg
      | Some (pp_edge) ->
          let edge_txt e =
            try Pretty_utils.sfprintf "%a" pp_edge e
            with Not_found -> "(none)"
          in Cil2cfg.display ~file:dotname ~edge_txt cfg
    in dotname