+ addDebugItem "dump coercions Db" (fun _ ->
+ List.iter
+ (fun (s,t,u) ->
+ HLog.debug
+ (UriManager.name_of_uri u ^ ":"
+ ^ CoercDb.name_of_carr s ^ " -> " ^ CoercDb.name_of_carr t))
+ (CoercDb.to_list ()));
+ addDebugItem "show coercions graph" (fun _ ->
+ let str = CoercGraph.generate_dot_file () in
+ let filename, oc = Filename.open_temp_file "xx" ".dot" in
+ output_string oc str;
+ close_out oc;
+ let ps = Filename.temp_file "yy" ".png" in
+ ignore (Unix.system ("/usr/bin/dot -Tpng -o" ^ ps ^ " " ^ filename));
+ ignore (Unix.system ("/usr/bin/display " ^ ps));
+ Sys.remove ps;
+ Sys.remove filename);
+ addDebugSeparator ();
+ let mview () = (MatitaMathView.sequentsViewer_instance ())#cicMathView in
+(* addDebugItem "save (sequent) MathML to matita.xml"
+ (fun _ -> ignore ((Gdome.domImplementation ())#saveDocumentToFile
+ ~doc:(HExtlib.unopt (mview ())#get_document) ~name:"matita.xml" ())); *)
+ addDebugItem "load (sequent) MathML from matita.xml"
+ (fun _ -> (mview ())#load_uri ~filename:"matita.xml");