aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/cooking.ml
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-07-21 20:25:13 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-07-21 20:25:13 +0000
commitf48478679585360a13ffc561a13ceb13dfed88d6 (patch)
treedd109b5fbe00752dc38c84f0e4f478346b92e814 /kernel/cooking.ml
parent991b14dfa66560047c8d0676cb0995b20d2954e4 (diff)
Remplacement du tableau du nombre d'args utiles pour la réduction des Cases par le nombre d'args inutiles + vérification dans le noyau
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1860 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/cooking.ml')
-rw-r--r--kernel/cooking.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/cooking.ml b/kernel/cooking.ml
index 0a023fb9c..7a06a7896 100644
--- a/kernel/cooking.ml
+++ b/kernel/cooking.ml
@@ -37,6 +37,11 @@ type recipe = {
d_abstract : identifier list;
d_modlist : work_list }
+let rec modif_length = function
+ | ABSTRACT :: l -> 1 + modif_length l
+ | ERASE :: l -> modif_length l
+ | [] -> 0
+
let interp_modif absfun mkfun (sp,modif) cl =
let rec interprec = function
| ([], cl) -> mkfun (sp, Array.of_list cl)
@@ -64,8 +69,9 @@ let modify_opers replfun absfun (constl,indl,cstrl) =
| OpMutCase (n,(spi,a,b,c,d) as oper) ->
(try
match List.assoc spi indl with
- | DO_ABSTRACT (spi',_) ->
- gather_constr (OpMutCase (n,(spi',a,b,c,d)),cl')
+ | DO_ABSTRACT (spi',modif) ->
+ let n' = modif_length modif + n in
+ gather_constr (OpMutCase (n',(spi',a,b,c,d)),cl')
| _ -> raise Not_found
with
| Not_found -> gather_constr (op,cl'))