- PropceduralOptimizer: bug fix in critical step detection
now decidable_kit/streicher.ma is fully reconstructed :)
opt_mutcase_plain g st es c uri tyno outty arg cases
else
let predicate = clear_absts rpsno (1 - sort_disp) outty in
+ if H.occurs c ~what:(C.Rel 0) ~where:predicate 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 is_recursive t =
I.S.mem tyno (I.get_mutinds_of_uri uri t)
in
let is_sober c t =
let rec sober_term c g = function
- | C.Rel _
+ | C.Rel i ->
+ if i <= 0 then fun b -> false else g
| C.Sort _
| C.Implicit _ -> g
| C.Const (_, xnss)
val alpha_equivalence: Cic.term -> Cic.term -> bool
-(* FG: Consistency Check
- * detects applications without arguments and folded applications
+(* FG: Consistency Check. Detects:
+ * applications without arguments, folded applications, non-positive rels
*)
val is_sober: Cic.context -> Cic.term -> bool