]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite_engine/grafiteEngine.ml
tactic cases works! delift clears tags
[helm.git] / helm / software / components / grafite_engine / grafiteEngine.ml
index b8310f3fca7a1d930d5673010d7971038f62f0f3..af8b086bfb58a256999d28a49fbe34cc72990f44 100644 (file)
@@ -586,9 +586,20 @@ let eval_ng_punct (_text, _prefix_len, punct) =
 let eval_ng_tac (text, prefix_len, tac) =
   match tac with
   | GrafiteAst.NApply (_loc, t) -> NTactics.apply_tac (text,prefix_len,t) 
-  | GrafiteAst.NChange (_loc, w,ww) -> 
-      NTactics.change_tac (text,prefix_len,w) (text,prefix_len,ww) 
-  | GrafiteAst.NId _ -> fun x -> x
+  | GrafiteAst.NCases (_loc, what, where) ->
+      NTactics.cases_tac 
+        ~what:(text,prefix_len,what)
+        ~where:(text,prefix_len,where)
+  | GrafiteAst.NCase1 (_loc,n) -> NTactics.case1_tac n
+  | GrafiteAst.NChange (_loc, pat, ww) -> 
+      NTactics.change_tac 
+       ~where:(text,prefix_len,pat) ~with_what:(text,prefix_len,ww) 
+  | GrafiteAst.NElim (_loc, what, where) ->
+      NTactics.elim_tac 
+        ~what:(text,prefix_len,what)
+        ~where:(text,prefix_len,where)
+  | GrafiteAst.NId _ -> (fun x -> x)
+  | GrafiteAst.NIntro (_loc,n) -> NTactics.intro_tac n
 ;;
 
 let rec eval_command = {ec_go = fun ~disambiguate_command opts status
@@ -708,9 +719,9 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
      prerr_endline ("nuovo lemma: " ^ NCicPp.ppmetasenv ~subst:nsubst nmenv);
      { status with
         GrafiteTypes.ng_status = 
-           GrafiteTypes.ProofMode { NTactics.gstatus = ninitial_stack; 
+           GrafiteTypes.ProofMode { NTacStatus.gstatus = ninitial_stack; 
           istatus = { 
-            NTactics.pstatus = 
+            NTacStatus.pstatus = 
              NUri.uri_of_string suri, 0, nmenv, nsubst, 
               (NCic.Constant ([],"",Some nbo,nty,(`Provided,`Definition,`Regular)));
             lstatus = nlexicon_status} }   
@@ -813,7 +824,7 @@ let rec eval_command = {ec_go = fun ~disambiguate_command opts status
       | GrafiteTypes.ProofMode nstatus ->
          let nstatus = eval_ng_tac (text,prefix_len,tac) nstatus in
          let nstatus = eval_ng_punct (text,prefix_len,punct) nstatus in
-         NTactics.pp_tac_status nstatus;
+         NTacStatus.pp_tac_status nstatus;
          { status with GrafiteTypes.ng_status = GrafiteTypes.ProofMode nstatus }, [])
   | GrafiteAst.NonPunctuationTactical (_, tac, punct) ->
      let status =