- addDebugItem "interactive user uri choice" (fun _ ->
- try
- let uris =
- interactive_user_uri_choice ~gui ~selection_mode:`MULTIPLE
- ~msg:"messaggio" ~nonvars_button:true
- ["cic:/uno.con"; "cic:/due.var"; "cic:/tre.con"; "cic:/quattro.con";
- "cic:/cinque.var"]
- in
- List.iter prerr_endline uris
- with MatitaGtkMisc.Cancel -> MatitaTypes.error "no choice");
- addDebugItem "toggle auto disambiguation" (fun _ ->
- Helm_registry.set_bool "matita.auto_disambiguation"
- (not (Helm_registry.get_bool "matita.auto_disambiguation")));
- addDebugItem "mono line text input" (fun _ ->
- prerr_endline (ask_text ~gui ~title:"title" ~msg:"message" ()));
- addDebugItem "multi line text input" (fun _ ->
- prerr_endline
- (ask_text ~gui ~title:"title" ~multiline:true ~msg:"message" ()));
+ 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))