From 92d309b1cad63ffc1608482a966a6d0af0a51c8e Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Mon, 16 Jan 2006 16:29:49 +0000 Subject: [PATCH] Dead code removed and reindentation. --- helm/ocaml/cic_proof_checking/cicReduction.ml | 49 ++----------------- 1 file changed, 5 insertions(+), 44 deletions(-) diff --git a/helm/ocaml/cic_proof_checking/cicReduction.ml b/helm/ocaml/cic_proof_checking/cicReduction.ml index dd1e57f91..846cdf92b 100644 --- a/helm/ocaml/cic_proof_checking/cicReduction.ml +++ b/helm/ocaml/cic_proof_checking/cicReduction.ml @@ -602,22 +602,6 @@ if List.mem uri params then debug_print (lazy "---- OK2") ; (function t -> RS.compute_to_stack ~reduce ~unwind (k,e,ens,t,[])) tl in reduce (k, e, ens, he, (List.append tl') s) - (* CSC: Old Dead Code - | (k, e, ens, C.Appl ((C.Lambda _ as he)::tl), s) - | (k, e, ens, C.Appl ((C.Const _ as he)::tl), s) - | (k, e, ens, C.Appl ((C.MutCase _ as he)::tl), s) - | (k, e, ens, C.Appl ((C.Fix _ as he)::tl), s) -> - (* strict evaluation, but constants are NOT unfolded *) - let red = - function - C.Const _ as t -> unwind k e ens t - | t -> reduce (k,e,ens,t,[]) - in - let tl' = List.map red tl in - reduce (k, e, ens, he , List.append tl' s) - | (k, e, ens, C.Appl l, s) -> - C.Appl (List.append (List.map (unwind k e ens) l) s) - *) | (_, _, _, C.Const _, _) as config when delta=false-> config | (k, e, ens, C.Const (uri,exp_named_subst), s) as config -> (let o,_ = @@ -703,18 +687,7 @@ if List.mem uri params then debug_print (lazy "---- OK2") ; (match recparam with Some recparam -> (match reduce recparam with - (* match recparam with *) (_,_,_,C.MutConstruct _,_) as config -> - (* OLD - let body' = - let counter = ref (List.length fl) in - List.fold_right - (fun _ -> decr counter ; S.subst (C.Fix (!counter,fl))) - fl - body - in - reduce (k, e, ens, body', s) *) - (* NEW *) let leng = List.length fl in let new_env = let counter = ref 0 in @@ -748,21 +721,11 @@ if List.mem uri params then debug_print (lazy "---- OK2") ; in reduce ;; - (* - let rec whd context t = - try - reduce context (0, [], [], t, []) - with Not_found -> - debug_print (lazy (CicPp.ppterm t)) ; - raise Not_found - ;; - *) let whd ?(delta=true) ?(subst=[]) context t = unwind (reduce ~delta ~subst context (0, [], [], t, [])) ;; - end ;; @@ -1005,13 +968,11 @@ let are_convertible whd ?(subst=[]) ?(metasenv=[]) = | (_,_) -> false,ugraph end in - begin - debug t1 [t2] "PREWHD"; - let t1' = whd ?delta:(Some true) ?subst:(Some subst) context t1 in - let t2' = whd ?delta:(Some true) ?subst:(Some subst) context t2 in - debug t1' [t2'] "POSTWHD"; - aux2 test_equality_only t1' t2' ugraph - end + debug t1 [t2] "PREWHD"; + let t1' = whd ?delta:(Some true) ?subst:(Some subst) context t1 in + let t2' = whd ?delta:(Some true) ?subst:(Some subst) context t2 in + debug t1' [t2'] "POSTWHD"; + aux2 test_equality_only t1' t2' ugraph in aux false (*c t1 t2 ugraph *) ;; -- 2.39.2