leanprover / leanprover/reference-manual
Stack overflows on large Lean blocks
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 129
- Forks
- 67
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 16
Description
Elaborating large Lean example blocks can lead to excessive stack usage. This can be fixed by e.g. separating multiple definitions into separate blocks, but it shouldn't be happening. There's probably a deep recursion in SubVerso's highlight generation that needs to become a loop, but I don't have time to investigate right now.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the stack overflow with a large Lean example block, then trace SubVerso's highlight generation during elaboration. Look for the suspected deep recursion and determine which input structure causes excessive stack usage. Done means large blocks elaborate without overflowing, while separate-block workarounds remain unnecessary.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100