(*
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 =
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
| [] -> ""
| head :: tail ->
inputt#delete_text 0 inputlen;
- MQueryGenerator.locate head
+ MQueryGenerator.locate_html head
with
e -> "<h1 color=\"red\">" ^ Printexc.to_string e ^ "</h1>"
)
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:"<html><body bgColor=\"white\"></body></html>"
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))
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 ();