]> matita.cs.unibo.it Git - fireball-separation.git/blobdiff - ocaml/lambda4.ml
Fix: missing check to avoid stepping on vars of non positive arity
[fireball-separation.git] / ocaml / lambda4.ml
index 9ed33946afa0ad8a797fb3d344d1e7d4484b56bf..6ceb9f387d516d401301f821c8d3e6cb16960f54 100644 (file)
@@ -571,7 +571,10 @@ let choose_step (n,p) =
        prerr_endline ("INSTANTIATING AND HOPING " ^ string_of_var x);
        x
   with
-   Not_found -> x in
+   Not_found ->
+    let arity_of_x = max_arity_tms x (all_terms p) in
+    assert (Util.option_get arity_of_x > 0); 
+    x in
 (* Instantiate in decreasing order of compute_special_k
 1:15m14s 2:13m14s 3:4m55s 4:4m43s 5:4m34s 6:6m28s 7:3m31s
 let x =