Open JasonGross opened 7 years ago
The commit above fixes the segfault. Now, we get the following error:
let.lean:87:0: error: deep recursion was detected at 'replace' (potential solution: increase stack space in your system)
I can process the example by increasing the thread stack size (command line option -s
).
lean -s 50000 let.lean
I didn't investigate the performance problem yet.
Consider this Lean file:
I get:
If I change the
6
to`7
, then I get:To remove the segfault, I need to comment out
unfold denote_let_inM; constructor
and also replaceunfold lift_lets under_lets; constructor
withunfold lift_lets
.For reference, here is a similar-length Coq file which performs better than Lean:
It has some Coq-specific-optimization around the equivalent of
unfold
. With this optimization, Coq is much slower than Lean on the reification step, but much faster on the reduction; is there a way to improve the performance of Lean's unfolding and reduction machinery?