Skip to content

feat(decompiler): Rec 35 (#35-3c) — name the exhausted pass in budget diagnostic#235

Merged
CryptoJones merged 1 commit into
masterfrom
feat/rec35-3c-budget-pass-diagnostic
Jun 1, 2026
Merged

feat(decompiler): Rec 35 (#35-3c) — name the exhausted pass in budget diagnostic#235
CryptoJones merged 1 commit into
masterfrom
feat/rec35-3c-budget-pass-diagnostic

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

Closes #234.

Summary

Enriches the #35-3b budget partial-result header from the generic
Exceeded decompilation budget: Some flow is truncated to
Exceeded 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 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.

Files

  • flow.cc — build the header from budget.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_dbg clean
  • ./decomp_test_dbg unittests — 315/315 pass (obsolete budget_exhaustion_names removed)
  • ./decomp_test_dbg datatests decompbudget.xml — 1/1 pass (single-line header asserted)
  • gradle cppRaiiAudit — clean (flow.cc protected, no raw new)
  • gradle :Decompiler:ip — clean (no new tracked files)

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

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>
@CryptoJones CryptoJones merged commit cf7dce5 into master Jun 1, 2026
16 checks passed
@CryptoJones CryptoJones deleted the feat/rec35-3c-budget-pass-diagnostic branch June 1, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rec 35 (#35-3c): name the exhausted pass in the budget partial-result diagnostic

1 participant