]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/tactics/tacticals.ml
A few other tactics made available to matita.
[helm.git] / helm / ocaml / tactics / tacticals.ml
index 62f1ce322c4a98be3b42ef890700b6588e903de5..3c89150adb96f80b1e1721e433eccce810c0d3e4 100644 (file)
@@ -194,7 +194,7 @@ let try_tactic ~tactic =
   mk_tactic (try_tactic ~tactic)
 ;;
 
-let fail = mk_tactic (fun _ -> raise (Fail "fail tactical"))
+let fail_tac = mk_tactic (fun _ -> raise (Fail "fail tactical"))
 
 (* This tries tactics until one of them doesn't _solve_ the goal *)
 (* TODO: si puo' unificare le 2(due) chiamate ricorsive? *)
@@ -226,55 +226,3 @@ let solve_tactics ~tactics =
  in
   mk_tactic (solve_tactics ~tactics)
 ;;
-
-
-
-
-
-
-
-
-
-
-  (** tattica di prova per debuggare i tatticali *)
-(*
-let thens' ~start ~continuations status =
- let (proof,new_goals) = start status in
-  try
-   List.fold_left2
-    (fun (proof,goals) goal tactic ->
-      let (proof',new_goals') = tactic (proof,goal) in
-       (proof',goals@new_goals')
-    ) (proof,[]) new_goals continuations
-  with
-   Invalid_argument _ -> raise (Fail "thens: wrong number of new goals")
-
-let prova_tac =
- let apply_T_tac status =
-  let (proof, goal) = status in
-  let curi,metasenv,pbo,pty = proof in
-  let metano,context,gty = CicUtil.lookup_meta goal metasenv in
-   let rel =
-    let rec find n =
-     function
-        [] -> assert false
-      | (Some (Cic.Name name,_))::_ when name = "T" -> n
-      | _::tl -> find (n+1) tl
-    in
-     debug_print ("eseguo find");
-     find 1 context
-   in
-    debug_print ("eseguo apply");    
-    apply_tac ~term:(Cic.Rel rel) status
- in
-(*  do_tactic ~n:2 *)
-  repeat_tactic
-   ~tactic:
-    (then_
-      ~start:(intros_tac ~name:"pippo")
-      ~continuation:(thens' ~start:apply_T_tac ~continuations:[id_tac ; apply_tac ~term:(Cic.Rel 1)]))
-(* id_tac *)
-;;
-*)
-
-