| Incomplete_proof ((proof, goal) as status) ->
sequents_viewer#load_sequents status;
sequents_viewer#goto_sequent goal
- | _ -> ()
+ | Proof proof ->
+ prerr_endline "sequents_viewer#load_logo_with_qed (no proof)"; ()
+ | No_proof ->
+ prerr_endline "sequents_viewer#load_logo (no proof)"; ()
+ | Intermediate _ ->
+ assert false (* only the engine may be in this state *)
in
script#addObserver sequents_observer;
script#addObserver browser_observer
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 "print selected terms" (fun () ->
let i = ref 0 in
List.iter
mathView#load_root (MatitaMisc.empty_mathml ())#get_documentElement
method private home () =
- if self#script#onGoingProof () then
- let ((uri, metasenv, bo, ty), _) = self#script#proofStatus in
- let name = UriManager.name_of_uri (MatitaMisc.unopt uri) in
- let obj = Cic.CurrentProof (name, metasenv, bo, ty, [], []) in
- self#loadObj obj
- else
- self#blank ()
+ match self#script#status.proof_status with
+ | Proof (uri, metasenv, bo, ty) ->
+ let name = UriManager.name_of_uri (MatitaMisc.unopt uri) in
+ let obj = Cic.CurrentProof (name, metasenv, bo, ty, [], []) in
+ self#loadObj obj
+ | Incomplete_proof ((uri, metasenv, bo, ty), _) ->
+ let name = UriManager.name_of_uri (MatitaMisc.unopt uri) in
+ let obj = Cic.CurrentProof (name, metasenv, bo, ty, [], []) in
+ self#loadObj obj
+ | _ -> self#blank ()
(** loads a cic uri from the environment
* @param uri UriManager.uri *)