X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita.ml;h=1645184264b6e446f35b196da1aae353daa7b1df;hb=d58cc529245e2d7ced43044947313244f190e054;hp=58b7de9f34c2a9f02d94b39cc0ac589e5d0ecc8d;hpb=2128fab91157cc06157cede44f8aa95a1acd453d;p=helm.git diff --git a/matita/matita.ml b/matita/matita.ml index 58b7de9f3..164518426 100644 --- a/matita/matita.ml +++ b/matita/matita.ml @@ -149,6 +149,31 @@ let _ = (MatitaScript.current ())#proofMetasenv)); prerr_endline ("stack: " ^ Continuationals.Stack.pp (GrafiteTypes.get_stack (MatitaScript.current ())#grafite_status))); + addDebugItem "Print current proof term" + (fun _ -> + HLog.debug + (CicPp.ppterm + (match + (MatitaScript.current ())#grafite_status.GrafiteTypes.proof_status + with + | GrafiteTypes.No_proof -> (Cic.Implicit None) + | Incomplete_proof i -> let _,_,p,_ = i.GrafiteTypes.proof in p + | Proof p -> let _,_,p,_ = p in p + | Intermediate _ -> assert false))); + addDebugItem "Print current proof (natural language) to stderr" + (fun _ -> + prerr_endline + (ObjPp.obj_to_string 120 + (match + (MatitaScript.current ())#grafite_status.GrafiteTypes.proof_status + with + | GrafiteTypes.No_proof -> assert false + | Incomplete_proof i -> + let _,m,p,ty = i.GrafiteTypes.proof in + Cic.CurrentProof ("current (incomplete) proof",m,p,ty,[],[]) + | Proof (_,m,p,ty) -> + Cic.CurrentProof ("current proof",m,p,ty,[],[]) + | Intermediate _ -> assert false))); (* addDebugItem "ask record choice" (fun _ -> HLog.debug (string_of_int @@ -176,26 +201,19 @@ let _ = (fun _ -> GrafiteDisambiguator.only_one_pass := true); addDebugSeparator (); addDebugItem "enable coercions hiding" - (fun _ -> TermAcicContent.hide_coercions := true); + (fun _ -> Acic2content.hide_coercions := true); addDebugItem "disable coercions hiding" - (fun _ -> TermAcicContent.hide_coercions := false); + (fun _ -> Acic2content.hide_coercions := false); + addDebugItem "show coercions graph" (fun _ -> + let c = MatitaMathView.cicBrowser () in + c#load (`About `Coercions)); addDebugItem "dump coercions Db" (fun _ -> List.iter - (fun (s,t,u) -> + (fun (s,t,ul) -> HLog.debug - (UriManager.name_of_uri u ^ ":" + ((String.concat "," (List.map UriManager.name_of_uri ul)) ^ ":" ^ 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"