type config =
int * env * Cic.term Cic.explicit_named_substitution * Cic.term * stack;;
-let lazily = true;;
+let call_by_name = false;; (* false means call_by_value *)
(* k is the length of the environment e *)
(* m is the current depth inside the term *)
| (k, e, ens, C.Lambda (_,_,t), p::s) ->
reduce (k+1, p::e, ens, t,s)
(* lazy *)
- | (k, e, ens, (C.LetIn (_,m,t) as t'), s) when lazily ->
+ | (k, e, ens, (C.LetIn (_,m,t) as t'), s) when call_by_name ->
let m' = unwind k e ens m in reduce (k+1, m'::e, ens, t, s)
(* strict *)
| (k, e, ens, (C.LetIn (_,m,t) as t'), s) ->
let m' = reduce (k,e,ens,m,[]) in reduce (k+1,m'::e,ens,t,s)
| (_, _, _, C.Appl [], _) -> raise (Impossible 1)
(* lazy *)
- | (k, e, ens, C.Appl (he::tl), s) when lazily ->
+ | (k, e, ens, C.Appl (he::tl), s) when call_by_name ->
let tl' = List.map (unwind k e ens) tl in
reduce (k, e, ens, he, (List.append tl' s))
(* strict, but constants are NOT unfolded *)