leanprover / leanprover/reference-manual

Stack overflows on large Lean blocks

Open
#211 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.