]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite_engine/grafiteEngine.ml
...
[helm.git] / helm / software / components / grafite_engine / grafiteEngine.ml
index a0fdb92d7e9f1319c5b5746ddd775e55e09d2855..1c918ac50bbb1693dc7bef890fd775994464ca91 100644 (file)
@@ -604,6 +604,9 @@ let eval_ng_tac (text, prefix_len, tac) =
            ) hyps,
           (text,prefix_len,concl))
        ) seqs)
+  | GrafiteAst.NAuto (_loc, (l,a)) ->
+      NTactics.auto_tac
+       ~params:(List.map (fun x -> "",0,x) l,a)
   | GrafiteAst.NCases (_loc, what, where) ->
       NTactics.cases_tac 
         ~what:(text,prefix_len,what)
@@ -760,8 +763,7 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
       let name = UriManager.name_of_uri uri in
       let obj = Cic.Constant (name,Some (Lazy.force bo),ty,[],attrs) in
       let status, lemmas = add_obj uri obj status in
-       {status with 
-         GrafiteTypes.proof_status = GrafiteTypes.No_proof},
+       {status with GrafiteTypes.proof_status = GrafiteTypes.No_proof},
         (*CSC: I throw away the arities *)
         `Old (uri::lemmas)
   | GrafiteAst.NQed loc ->
@@ -769,30 +771,29 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
        | GrafiteTypes.ProofMode
           { NTacStatus.istatus =
              {NTacStatus.pstatus = pstatus; lstatus=lexicon_status} } ->
-            let uri,height,menv,subst,obj = pstatus in
+            let uri,height,menv,subst,obj_kind = pstatus in
              if menv <> [] then
               raise
                (GrafiteTypes.Command_error"You can't Qed an incomplete theorem")
              else
-              let obj =
-prerr_endline "CSC: here we should fix the height!!!";
-               (uri,height,[],[],
-                NCicUntrusted.map_obj_kind 
-                  (NCicUntrusted.apply_subst subst [])
-                 obj) in
-              NCicTypeChecker.typecheck_obj obj;
-              NCicLibrary.add_obj uri obj;
-              let objs = NCicElim.mk_elims obj in
-              let uris =
-               uri::
-                List.map
-                 (fun (uri,_,_,_,_) as obj ->
-                   NCicTypeChecker.typecheck_obj obj;
-                   NCicLibrary.add_obj uri obj;
-                   uri
-                 ) objs
-              in
-               {status with 
+              let obj_kind =
+               NCicUntrusted.map_obj_kind 
+                (NCicUntrusted.apply_subst subst []) obj_kind in
+              let height = NCicTypeChecker.height_of_obj_kind uri obj_kind in
+              let obj = uri,height,[],[],obj_kind in
+               NCicTypeChecker.typecheck_obj obj;
+               NCicLibrary.add_obj uri obj;
+               let objs = NCicElim.mk_elims obj in
+               let uris =
+                uri::
+                 List.map
+                  (fun (uri,_,_,_,_) as obj ->
+                    NCicTypeChecker.typecheck_obj obj;
+                    NCicLibrary.add_obj uri obj;
+                    uri
+                  ) objs
+               in
+                {status with 
                  GrafiteTypes.ng_status = 
                   GrafiteTypes.CommandMode lexicon_status },`New uris
        | _ -> raise (GrafiteTypes.Command_error "Not in proof mode"))