+ addDebugItem "dump environment to \"env.dump\"" (fun _ ->
+ let oc = open_out "env.dump" in
+ CicEnvironment.dump_to_channel oc;
+ close_out oc);
+ addDebugItem "load environment from \"env.dump\"" (fun _ ->
+ let ic = open_in "env.dump" in
+ CicEnvironment.restore_from_channel ic;
+ close_in ic);
+ addDebugItem "dump universes" (fun _ ->
+ List.iter (fun (u,_,g) ->
+ prerr_endline (UriManager.string_of_uri u);
+ CicUniv.print_ugraph g) (CicEnvironment.list_obj ())
+ );
+ addDebugItem "dump environment content" (fun _ ->
+ List.iter (fun (u,_,_) ->
+ prerr_endline (UriManager.string_of_uri u))
+ (CicEnvironment.list_obj ()));
+ addDebugItem "print selections" (fun () ->
+ let cicMathView = MatitaMathView.cicMathView_instance () in
+ List.iter MatitaLog.debug (cicMathView#string_of_selections));
+ addDebugItem "dump getter settings" (fun _ ->
+ prerr_endline (Http_getter_env.env_to_string ()));
+ addDebugItem "getter: getalluris" (fun _ ->
+ List.iter prerr_endline (Http_getter.getalluris ()));
+ addDebugItem "dump script status" script#dump;
+ addDebugItem "dump metasenv"
+ (fun _ ->
+ if script#onGoingProof () then
+ MatitaLog.debug (CicMetaSubst.ppmetasenv script#proofMetasenv []));
+ addDebugItem "dump coercions Db" (fun _ ->
+ List.iter
+ (fun (s,t,u) ->
+ MatitaLog.debug
+ (UriManager.name_of_uri u ^ ":"
+ ^ UriManager.name_of_uri s ^ " -> " ^ UriManager.name_of_uri t))
+ (CoercDb.to_list ()));
+ addDebugItem "rotate light bulbs"
+ (fun _ ->
+ let nb = gui#main#hintNotebook in
+ nb#goto_page ((nb#current_page + 1) mod 3))
+ end
+
+ (** </DEBUGGING> *)