let display ~file ?edge_txt cfg =
  let edge_txt = match edge_txt with None -> (fun _e -> ""| Some f -> f in
  let utf8 = !Cil.print_utf8 in Cil.print_utf8 := false;
  let module P = Printer (struct let edge_txt = edge_txt endin
  let module GPrint = Graph.Graphviz.Dot(Pin
  let oc = open_out file in
  GPrint.output_graph oc (cfg_graph cfg, edge_txt);
  close_out oc;
  Cil.print_utf8 := utf8