From 58f1518398346a81ccd8d0b14a14565b8bff5276 Mon Sep 17 00:00:00 2001 From: acondolu Date: Thu, 13 Jul 2017 19:05:39 +0200 Subject: [PATCH] Fix: missing check to avoid stepping on vars of non positive arity --- ocaml/lambda4.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ocaml/lambda4.ml b/ocaml/lambda4.ml index 9ed3394..6ceb9f3 100644 --- a/ocaml/lambda4.ml +++ b/ocaml/lambda4.ml @@ -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 = -- 2.39.2