From f1dc70ca55058b2983cd23b829d856df3b41b9a7 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Tue, 17 Jan 2006 16:49:04 +0000 Subject: [PATCH] subst_vars optimized for the explicit_named_subst=[] case (the most common one) --- helm/ocaml/cic_proof_checking/cicSubstitution.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helm/ocaml/cic_proof_checking/cicSubstitution.ml b/helm/ocaml/cic_proof_checking/cicSubstitution.ml index 372c66fb8..a30a036cb 100644 --- a/helm/ocaml/cic_proof_checking/cicSubstitution.ml +++ b/helm/ocaml/cic_proof_checking/cicSubstitution.ml @@ -191,7 +191,7 @@ let subst arg = (*CSC: dovrebbe diventare da sinistra verso destra: *) (*CSC: t{a=a/A;b/a} ==> \H:a=a.H{b/a} ==> \H:b=b.H *) (*CSC: per la roba che proviene da Coq questo non serve! *) -let subst_vars exp_named_subst = +let subst_vars exp_named_subst t = (* debug_print (lazy ("@@@POSSIBLE BUG: SUBSTITUTION IS NOT SIMULTANEOUS")) ; *) @@ -344,7 +344,8 @@ if List.mem uri params then debug_print (lazy "---- OK2") ; List.map (function (uri,t) -> (uri,substaux k t)) exp_named_subst' @ (filter_and_lift exp_named_subst) in - substaux 1 + if exp_named_subst = [] then t + else substaux 1 t ;; (* subst_meta [t_1 ; ... ; t_n] t *) -- 2.39.2