]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/matitaEngine.ml
Cic.term and Cic.obj unused!
[helm.git] / matita / matita / matitaEngine.ml
index c96132b8aefcd2c2134ecd071b15e6d3e252333e..ab357e5c356e72d5001605ec87bc005448746692 100644 (file)
@@ -32,14 +32,15 @@ let debug_print = if debug then prerr_endline else ignore ;;
 
 let disambiguate_command lexicon_status_ref grafite_status cmd =
  let baseuri = grafite_status#baseuri in
- let lexicon_status,metasenv,cmd =
+ let lexicon_status,cmd =
   GrafiteDisambiguate.disambiguate_command ~baseuri
-   !lexicon_status_ref (GrafiteTypes.get_proof_metasenv grafite_status) cmd
+   !lexicon_status_ref cmd
  in
   lexicon_status_ref := lexicon_status;
-  GrafiteTypes.set_metasenv metasenv grafite_status,cmd
+  grafite_status,cmd
 
 let eval_macro_screenshot (status : GrafiteTypes.status) name =
+  assert false (* MATITA 1.0
   let _,_,metasenv,subst,_ = status#obj in
   let sequent = List.hd metasenv in
   let mathml = 
@@ -56,6 +57,7 @@ let eval_macro_screenshot (status : GrafiteTypes.status) name =
     Filename.quote (name^".png")));
   HLog.debug ("generated " ^ name ^ ".png");
   status, `New []
+  *)
 ;;
 
 let eval_ast ?do_heavy_checks status (text,prefix_len,ast) =
@@ -63,16 +65,8 @@ let eval_ast ?do_heavy_checks status (text,prefix_len,ast) =
  let lexicon_status_ref = ref (status :> LexiconEngine.status) in
  let baseuri = status#baseuri in
  let new_status,new_objs =
-  match ast with 
-     | G.Executable (_, G.Command (_, G.Coercion _)) when dump ->
-(* FG: some commands can not be executed when mmas are parsed *************)
-(* To be removed when mmas will be executed                               *)
-        status, `Old []
-     | ast -> 
   GrafiteEngine.eval_ast
-   ~disambiguate_tactic:((* MATITA 1.0*) fun _ -> assert false)
    ~disambiguate_command:(disambiguate_command lexicon_status_ref)
-   ~disambiguate_macro:((* MATITA 1.0*) fun _ -> assert false)
    ?do_heavy_checks status (text,prefix_len,ast)
  in
  let new_status =
@@ -88,18 +82,11 @@ let eval_ast ?do_heavy_checks status (text,prefix_len,ast) =
      let v = LexiconAst.description_of_alias value in
      let b =
       try
-       (* this hack really sucks! *)
-       UriManager.buri_of_uri (UriManager.uri_of_string v) = baseuri
+       let NReference.Ref (uri,_) = NReference.reference_of_string v in
+        NUri.baseuri_of_uri uri = baseuri
       with
-       UriManager.IllFormedUri _ ->
-        try
-         (* this too! *)
-         let NReference.Ref (uri,_) = NReference.reference_of_string v in
-         let ouri = NCic2OCic.ouri_of_nuri uri in
-          UriManager.buri_of_uri ouri = baseuri
-        with
-         NReference.IllFormedReference _ ->
-          false (* v is a description, not a URI *)
+       NReference.IllFormedReference _ ->
+        false (* v is a description, not a URI *)
      in
       if b then 
        status,acc