@@ -1118,11 +1118,10 @@ let filter_stack_domain env nr p stack =
11181118 in
11191119 filter_stack env ar stack
11201120
1121- let merge_filter l l' =
1122- let n = List. length l in
1123- let n' = List. length l' in
1124- if n < n' then List. map2 (&& ) l (List. firstn n l')
1125- else List. map2 (&& ) (List. firstn n' l) l'
1121+ let rec merge_filter l l' =
1122+ match l, l' with
1123+ | [] , _ | _ , [] -> []
1124+ | a ::l , a' ::l' -> (a && a') :: merge_filter l l'
11261125
11271126let find_uniform_parameters recindx nargs bodies =
11281127 let nbodies = Array. length bodies in
@@ -1148,6 +1147,12 @@ let find_uniform_parameters recindx nargs bodies =
11481147 in
11491148 Array. fold_left_i (fun i -> aux i 0 ) argsign bodies
11501149
1150+ (* * Given a fixpoint [fix f x y z n {struct n} := phi(f x u z t, ..., f x u' z t')]
1151+ with [y] not uniform we build in context [x:A, y:B(x), z:C(x,y)] a term
1152+ [fix f y n := phi(f u t, ..., f u' t')], say [psi], of some type
1153+ [forall (y:B(x)) (n:I(x,y,z)), T(x,y,z,n)], so that
1154+ [fun x y z => psi y] is of same type as the original term *)
1155+
11511156let drop_uniform_parameters argsign bodies =
11521157 let nbodies = Array. length bodies in
11531158 let nargs = List. length argsign in
0 commit comments