Skip to content

NodeIntermediateWalker: optimize stack space usage#3789

Closed
FliegendeWurst wants to merge 1 commit intoKeYProject:mainfrom
FliegendeWurst:niw-optimize
Closed

NodeIntermediateWalker: optimize stack space usage#3789
FliegendeWurst wants to merge 1 commit intoKeYProject:mainfrom
FliegendeWurst:niw-optimize

Conversation

@FliegendeWurst
Copy link
Copy Markdown
Member

Without this, the proof management tool may throw a StackOverflowError for very large proofs (the largest in my case has 461059 nodes).

Intended Change

Use iteration in the node walker when possible.
This is done by checking for the common case of a single child node.

Type of pull request

Optimization / bug fix

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring (behaviour should not change or only minimally change)
  • There are changes to the (Java) code

Ensuring quality

  • I have tested the feature as follows: manually
  • I have checked that runtime performance has not deteriorated.

Additional information and contact(s)

The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.

@FliegendeWurst FliegendeWurst added the keyext.proofmanagement Module: keyext.proofmanagement label Mar 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.48%. Comparing base (a12644c) to head (b24971b).
⚠️ Report is 162 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3789      +/-   ##
============================================
+ Coverage     50.34%   50.48%   +0.14%     
- Complexity    15902    16158     +256     
============================================
  Files          1597     1620      +23     
  Lines         91026    92009     +983     
  Branches      14554    14704     +150     
============================================
+ Hits          45824    46455     +631     
- Misses        39988    40290     +302     
- Partials       5214     5264      +50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@WolframPfeifer
Copy link
Copy Markdown
Member

@FliegendeWurst I actually had a fix for that in a different project a while ago, which I forgot to bring to main. I created PR #3793 now, which I would prefer over this one, as it goes one step further and completely removes recursion. Can you check if that also works for you? Thanks!

@WolframPfeifer
Copy link
Copy Markdown
Member

Replaced by #3793.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

keyext.proofmanagement Module: keyext.proofmanagement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants