X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Ftactics%2Fdeclarative.ml;h=b1b38a9492e76cb5526c24c870382696a5f50314;hb=b0612e00b2a905510439d9a6e8908497c1b74c61;hp=ef052cfcbec5e2db9394eb603978d8a3577e792e;hpb=346c502bf7c78629e75e49f8d9ca379144fdb5df;p=helm.git diff --git a/components/tactics/declarative.ml b/components/tactics/declarative.ml index ef052cfcb..b1b38a949 100644 --- a/components/tactics/declarative.ml +++ b/components/tactics/declarative.ml @@ -45,10 +45,10 @@ let suppose t id ty = (fun _ metasenv ugraph -> ty,metasenv,ugraph)) ;; -let by_term_we_proved ~dbd t ty id ty' = +let by_term_we_proved ~dbd ~universe t ty id ty' = let just = match t with - None -> Tactics.auto ~dbd ~params:[] + None -> Tactics.auto ~dbd ~params:[] ~universe | Some t -> Tactics.apply t in match id with @@ -59,7 +59,7 @@ let by_term_we_proved ~dbd t ty id ty' = Tacticals.then_ ~start:(Tactics.change ~pattern:(ProofEngineTypes.conclusion_pattern None) - (fun _ metasenv ugraph -> ty',metasenv,ugraph)) + (fun _ metasenv ugraph -> ty,metasenv,ugraph)) ~continuation:just ) | Some id -> @@ -77,10 +77,10 @@ let by_term_we_proved ~dbd t ty id ty' = ~continuations:[ continuation ; just ] ;; -let bydone ~dbd t = +let bydone ~dbd ~universe t = let just = match t with - None -> Tactics.auto ~dbd ~params:[] + None -> Tactics.auto ~dbd ~params:[] ~universe | Some t -> Tactics.apply t in just @@ -134,7 +134,7 @@ let existselim t id1 t1 id2 t2 = let andelim = existselim;; -let rewritingstep ~dbd lhs rhs just conclude = +let rewritingstep ~dbd ~universe lhs rhs just conclude = let aux ((proof,goal) as status) = let (curi,metasenv,proofbo,proofty) = proof in let _,context,_ = CicUtil.lookup_meta goal metasenv in @@ -149,9 +149,8 @@ let rewritingstep ~dbd lhs rhs just conclude = let just = match just with None -> - Tactics.auto ~dbd - ~params:["paramodulation","1"; "timeout","3"] - | Some just -> Tactics.apply just + Tactics.auto ~dbd ~params:["paramodulation","1"; "timeout","3"] ~universe + | Some just -> Tactics.apply just in match lhs with None -> @@ -176,7 +175,9 @@ let rewritingstep ~dbd lhs rhs just conclude = ~continuations: [ Tactics.apply prhs ; Tactics.apply (Cic.Rel 1) ; - just]) status + Tacticals.then_ + ~start:(Tactics.clear ~hyps:[last_hyp_name]) + ~continuation:just]) status | Some name -> let mk_fresh_name_callback = fun metasenv context _ ~typ -> @@ -194,7 +195,9 @@ let rewritingstep ~dbd lhs rhs just conclude = ~continuations: [ Tactics.apply prhs ; Tactics.apply (Cic.Rel 1) ; - just] + Tacticals.then_ + ~start:(Tactics.clear ~hyps:[last_hyp_name]) + ~continuation:just] ]) status) | Some lhs -> match conclude with @@ -238,10 +241,12 @@ let case id ~params = let thesisbecomes t = let ty = None in - (*BUG here: missing check on t *) match ty with - None -> Tacticals.id_tac + None -> + Tactics.change ~pattern:(None,[],Some (Cic.Implicit (Some `Hole))) + (fun _ metasenv ugraph -> t,metasenv,ugraph) | Some ty -> + (*BUG here: missing check on t *) Tactics.change ~pattern:(None,[],Some (Cic.Implicit (Some `Hole))) (fun _ metasenv ugraph -> ty,metasenv,ugraph) ;;