feat(decompiler): Rec 35 (#35-3c) — name the exhausted pass in budget diagnostic#235
Merged
Merged
Conversation
The #35-3b partial-result header was the generic "Exceeded decompilation budget: Some flow is truncated". This enriches it to name the pass the budget ran out on -- "Exceeded decompilation budget on pass <name>: Some flow is truncated" -- using DecompileBudgetTracker::exhaustedPass(), which shipped in #35-3a but was unused by production code until now. For the flow_analysis yield point that name is "flow_analysis", realizing the design's "budget exhausted on pass X" partial-result contract from docs/decompiler/DECOMPILER_BUDGETS.md. The header names the pass only, not the budget class, deliberately: the class-qualified form ("... budget (per-pass iteration cap) on pass ...") renders ~109 chars and wraps across two comment lines at the 100-column prettyprint width, and the datatest stringmatch is a per-line regex_search that cannot span the wrap. The pass-only header is 74 chars and stays on one line; datatests/decompbudget.xml now asserts that exact single line. No behaviour change to any unbudgeted decompile (the budget stays disengaged in production); the full unit suite (315 cases) and datatest suite stay green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #234.
Summary
Enriches the
#35-3bbudget partial-result header from the genericExceeded decompilation budget: Some flow is truncatedtoExceeded decompilation budget on pass flow_analysis: Some flow is truncated,using
DecompileBudgetTracker::exhaustedPass()(shipped inert in#35-3a,unused by production until now). Realizes the design's "budget exhausted on
pass X" partial-result contract (docs/decompiler/DECOMPILER_BUDGETS.md).
Pass-only by design: the class-qualified form (
... budget (per-pass iteration cap) on pass ...) renders ~109 chars and wraps across two comment lines at the100-column prettyprint width, and the datatest
stringmatchis a per-lineregex_searchthat cannot span the wrap. The pass-only header is 74 chars andstays on one line.
Files
flow.cc— build the header frombudget.exhaustedPass().datatests/decompbudget.xml— assert the new single-line header (+ comment refresh).CHANGELOG.md—[Unreleased]bullet.No behaviour change to any unbudgeted decompile (the budget stays disengaged in
production).
Test plan
make -j decomp_test_dbgclean./decomp_test_dbg unittests— 315/315 pass (obsoletebudget_exhaustion_namesremoved)./decomp_test_dbg datatests decompbudget.xml— 1/1 pass (single-line header asserted)gradle cppRaiiAudit— clean (flow.cc protected, no rawnew)gradle :Decompiler:ip— clean (no new tracked files)Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/