X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FgTopLevel%2FgTopLevel.ml;h=da00761f932f2aa7842149c940e3fcd576839ee4;hb=7f0a6628f37ee3514abaee39a2407fcab8b9cf27;hp=563c8818670507e8844a183e9a3b184065319127;hpb=d45449ce9166ba5c323dfafcc653bc301d6c7a54;p=helm.git diff --git a/helm/gTopLevel/gTopLevel.ml b/helm/gTopLevel/gTopLevel.ml index 563c88186..da00761f9 100644 --- a/helm/gTopLevel/gTopLevel.ml +++ b/helm/gTopLevel/gTopLevel.ml @@ -248,7 +248,7 @@ prerr_endline ("Offending sequent: " ^ SequentPp.TextualPp.print_sequent current (* ignore(domImpl#saveDocumentToFile ~doc:sequent_doc - ~name:"/public/sacerdot/guruguru1" ~indent:true ()) ; + ~name:"/home/galata/miohelm/guruguru1" ~indent:true ()) ; *) let mml_of_cic_term metano term = @@ -682,6 +682,8 @@ let clear rendering_window = call_tactic_with_hypothesis_input ProofEngine.clear rendering_window ;; +let fourier rendering_window = call_tactic ProofEngine.fourier rendering_window;; + let whd_in_scratch scratch_window = call_tactic_with_goal_input_in_scratch ProofEngine.whd_in_scratch @@ -1094,7 +1096,7 @@ let locate rendering_window () = | [] -> "" | head :: tail -> inputt#delete_text 0 inputlen; - MQueryGenerator.locate head + MQueryGenerator.locate_html head with e -> "

" ^ Printexc.to_string e ^ "

" ) @@ -1428,6 +1430,9 @@ class rendering_window output proofw (label : GMisc.label) = let clearb = GButton.button ~label:"Clear" ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in + let fourierb = + GButton.button ~label:"Fourier" + ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in let outputhtml = GHtml.xmhtml ~source:"" @@ -1481,6 +1486,7 @@ object(self) ignore(ringb#connect#clicked (ring self)) ; ignore(clearbodyb#connect#clicked (clearbody self)) ; ignore(clearb#connect#clicked (clear self)) ; + ignore(fourierb#connect#clicked (fourier self)) ; ignore(introsb#connect#clicked (intros self)) ; Logger.log_callback := (Logger.log_to_html ~print_and_flush:(output_html outputhtml)) @@ -1502,7 +1508,35 @@ let initialize_everything () = let _ = CicCooking.init () ; - if !usedb then MQueryGenerator.init () ; + if !usedb then + begin + MQueryGenerator.init () ; + CicTextualParser0.set_locate_object + (function id -> + let MathQL.MQRefs uris = MQueryGenerator.locate id in + let uri = + match uris with + [] -> None + | [uri] -> Some uri + | _ -> None (* here we must let the user choose one uri *) + in + match uri with + Some uri' -> + if String.sub uri' (String.length uri' - 4) 4 = ".con" then +(*CSC: what cooking number? Here I always use 0, which may be bugged *) + Some (Cic.Const (UriManager.uri_of_string uri',0)) + else + let uri'',typeno = +(*CSC: the locate query now looks only for inductive type blocks ;-( *) +(*CSC: when it will be correctly implemented we will have to work *) +(*CSC: here on the fragment identifier *) + uri',0 + in +(*CSC: what cooking number? Here I always use 0, which may be bugged *) + Some (Cic.MutInd (UriManager.uri_of_string uri'',0,typeno)) + | None -> None + ) + end ; ignore (GtkMain.Main.init ()) ; initialize_everything () ; if !usedb then MQueryGenerator.close ();