]> matita.cs.unibo.it Git - helm.git/blobdiff - components/grafite_engine/grafiteEngine.ml
new compose tactic, still undocumented.
[helm.git] / components / grafite_engine / grafiteEngine.ml
index c961c58ae611903b2d518dfbf57b2b23ca5a1202..6b34c687ccf38fcf13c168c67c3d786e066860d5 100644 (file)
@@ -86,8 +86,8 @@ let rec tactic_of_ast status ast =
      Tactics.applyS ~term ~params ~dbd:(LibraryDb.instance ())
        ~universe:status.GrafiteTypes.universe
   | GrafiteAst.Assumption _ -> Tactics.assumption
-  | GrafiteAst.Auto (_,params) ->
-      AutoTactic.auto_tac ~params ~dbd:(LibraryDb.instance ()) 
+  | GrafiteAst.AutoBatch (_,params) ->
+      Tactics.auto ~params ~dbd:(LibraryDb.instance ()) 
        ~universe:status.GrafiteTypes.universe
   | GrafiteAst.Cases (_, what, (howmany, names)) ->
       Tactics.cases_intros ?howmany ~mk_fresh_name_callback:(namer_of names)
@@ -96,6 +96,9 @@ let rec tactic_of_ast status ast =
      Tactics.change ~pattern with_what
   | GrafiteAst.Clear (_,id) -> Tactics.clear id
   | GrafiteAst.ClearBody (_,id) -> Tactics.clearbody id
+  | GrafiteAst.Compose (_,t1,t2,(howmany, names)) -> 
+      Tactics.compose t1 t2 ?howmany
+        ~mk_fresh_name_callback:(namer_of names)
   | GrafiteAst.Contradiction _ -> Tactics.contradiction
   | GrafiteAst.Constructor (_, n) -> Tactics.constructor n
   | GrafiteAst.Cut (_, ident, term) ->
@@ -682,7 +685,7 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
      status,[]
   | GrafiteAst.Print (_,"proofterm") ->
       let _,_,_,p,_, _ = GrafiteTypes.get_current_proof status in
-      print_endline (AutoTactic.pp_proofterm p);
+      print_endline (Auto.pp_proofterm p);
       status,[]
   | GrafiteAst.Print (_,_) -> status,[]
   | GrafiteAst.Qed loc ->
@@ -725,8 +728,9 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
           HLog.error (Printf.sprintf "uri %s belongs to a read-only repository" value);
           raise (ReadOnlyUri value)
         end;
-        if not (Http_getter_storage.is_empty value) && 
-           opts.clean_baseuri 
+        if (not (Http_getter_storage.is_empty value) ||
+            LibraryClean.db_uris_of_baseuri value <> [])
+           && opts.clean_baseuri 
           then begin
           HLog.message ("baseuri " ^ value ^ " is not empty");
           HLog.message ("cleaning baseuri " ^ value);