]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/acic_procedural/proceduralOptimizer.ml
Procedural: we corrected two errors about the handling of mutcase (the "cases"
[helm.git] / helm / software / components / acic_procedural / proceduralOptimizer.ml
index 6910613d29b3b2d2bf778b751e1ce0b268339277..c27966a4a0e05192a1ac880175a50c7e759e7072 100644 (file)
@@ -185,6 +185,10 @@ and opt_mutcase_critical g st es c uri tyno outty arg cases =
    let ps, sort_disp = H.get_ind_parameters c arg in
    let lps, rps = HEL.split_nth lpsno ps in
    let rpsno = List.length rps in
+   if rpsno = 0 && sort_disp = 0 then
+(* FG: the transformation is not possible, we fall back into the plain case *)
+      opt_mutcase_plain g st es c uri tyno outty arg cases
+   else
    let predicate = clear_absts rpsno (1 - sort_disp) outty in   
    let is_recursive t =
       I.S.mem tyno (I.get_mutinds_of_uri uri t)