]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaEngine.ml
Asts generalized: a lot of tactics where restricted to identifiers in place
[helm.git] / helm / matita / matitaEngine.ml
index 669d7b62f182adf55dbc4d9c7f753d66b725a58a..522a5157053161e990ebdef8172cef7070e2b5a7 100644 (file)
@@ -77,11 +77,11 @@ let tactic_of_ast = function
         EqualityTactics.rewrite_tac ~where:pattern ~term:t ()
       else
         EqualityTactics.rewrite_back_tac ~where:pattern ~term:t ()
-  | TacticAst.FwdSimpl (_, name) -> 
-     Tactics.fwd_simpl ~hyp:(Cic.Name name) ~dbd:(MatitaDb.instance ())
-  | TacticAst.LApply (_, term, substs) ->
+  | TacticAst.FwdSimpl (_, term) -> 
+     Tactics.fwd_simpl ~term ~dbd:(MatitaDb.instance ())
+  | TacticAst.LApply (_, term) ->
      let f (name, term) = Cic.Name name, term in
-     Tactics.lapply ~substs:(List.map f substs) term
+     Tactics.lapply term
 
 let eval_tactical status tac =
   let apply_tactic tactic =
@@ -404,10 +404,11 @@ let disambiguate_tactic status = function
       let status, cic1 = disambiguate_term status what in
       let status, cic2 = disambiguate_term status with_what in
       status, TacticAst.Replace (loc, cic1, cic2)
-  | TacticAst.Change (loc, what, with_what, ident) -> 
+  | TacticAst.Change (loc, what, with_what, pattern) -> 
       let status, cic1 = disambiguate_term status what in
       let status, cic2 = disambiguate_term status with_what in
-      status, TacticAst.Change (loc, cic1, cic2, ident)
+      let pattern = disambiguate_pattern status.aliases pattern in
+      status, TacticAst.Change (loc, cic1, cic2, pattern)
   | TacticAst.Generalize (loc,term,pattern) ->
       let status,term = disambiguate_term status term in
       let pattern = disambiguate_pattern status.aliases pattern in
@@ -448,15 +449,12 @@ let disambiguate_tactic status = function
   | TacticAst.Split loc -> status, TacticAst.Split loc
   | TacticAst.Symmetry loc -> status, TacticAst.Symmetry loc
   | TacticAst.Goal (loc, g) -> status, TacticAst.Goal (loc, g)
-  | TacticAst.FwdSimpl (loc, name) -> status, TacticAst.FwdSimpl (loc, name)  
-  | TacticAst.LApply (loc, term, substs) ->
-     let f (status, substs) (name, term) =
-        let status, term = disambiguate_term status term in
-       status, (name, term) :: substs
-     in
+  | TacticAst.FwdSimpl (loc, term) ->
+     let status, term = disambiguate_term status term in
+     status, TacticAst.FwdSimpl (loc, term)  
+  | TacticAst.LApply (loc, term) ->
      let status, term = disambiguate_term status term in
-     let status, substs = List.fold_left f (status, []) substs in 
-     status, TacticAst.LApply (loc, term, substs)
+     status, TacticAst.LApply (loc, term)
 
 let rec disambiguate_tactical status = function 
   | TacticAst.Tactic (loc, tactic) ->