Skip to content

proof(ir): applyLockReleaseOnExits halting branch — wrapper fully characterized (lane 2.2) - #2293

Merged
Th0rgal merged 1 commit into
mainfrom
proof/2087-wrapper-halting
Aug 12, 2026
Merged

proof(ir): applyLockReleaseOnExits halting branch — wrapper fully characterized (lane 2.2)#2293
Th0rgal merged 1 commit into
mainfrom
proof/2087-wrapper-halting

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Aug 12, 2026

Copy link
Copy Markdown
Member

Completes the wrapper: ModeledHalt + no-continue soundness (execIRStmt_modeledHalt_no_continue, execIRStmts_last_halt_no_continue) and execIRStmts_applyLockReleaseOnExits_halting — with #2292's fall-through branch, applyLockReleaseOnExits is now fully characterized over the fragment: every outcome of the wrapped body equals the original with successful exits carrying the released state. The invalid/selfdestruct analysis-vs-interpreter gap is scoped out explicitly in ModeledHalt. Next: compose with the prologue laws (#2274/#2275) into the guarded-unit end-to-end statement.

Validation: full lake build OK, make check all passed, no sorry/admit/new axiom.


Note

Low Risk
Proof-only additions in Lean with no runtime or compiler behavior changes; risk is limited to proof maintenance and axiom inventory accuracy.

Overview
Adds the halting-analysis branch of applyLockReleaseOnExits to the IR splice simulation proofs, pairing with the existing fall-through theorem so the wrapper is characterized on the supported fragment.

Introduces ModeledHalt for interpreter-real halts (stop, literal return, revert) and deliberately omits invalid/selfdestruct, where static halt analysis and execution disagree. New lemmas show modeled halts never yield .continue (single stmt and ys ++ [h]), and that ModeledHalt.frameHalts aligns them with yulFrameHalts.

execIRStmts_applyLockReleaseOnExits_halting proves that when a SpliceSimList body ends in a modeled halt, the wrapper takes the splice-only path (no trailing release) and wrapped execution matches the original with successful exits carrying releaseState, ruling out the impossible .continue case. PrintAxioms.lean registers the four new public theorems (6237 total).

Reviewed by Cursor Bugbot for commit af350cb. Bugbot is set up for automated code reviews on this repo. Configure here.

ModeledHalt (the frame halts the interpreter actually halts: stop(),
return(lit,lit), revert(a,b)) with no-continue soundness at any fuel and
through whole bodies (execIRStmts_last_halt_no_continue), plus
execIRStmts_applyLockReleaseOnExits_halting: a fragment body ending in a
modeled halt gets no trailing release and the wrapped execution equals
the original with halts carrying the released state. Both wrapper
branches are now characterized; the invalid/selfdestruct analysis gap is
documented in the ModeledHalt docstring.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
verity Ready Ready Preview Aug 12, 2026 4:15pm

Request Review

@Th0rgal
Th0rgal merged commit 0ff1f16 into main Aug 12, 2026
1 check was pending
@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_e3e83815-b06d-4019-94ea-789d9c96bd3e)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenCodeReview first-pass review

OCR did not run — this diff has no OCR-supported files. Not a review outcome.

No changed files matched OCR include rules.

OCR pilot metrics & packet coverage

OCR pilot metrics

  • Routing: no-supported (router-v10)
  • Changed files: 0 supported / 0 total; Lean 0, trust docs 0, workflow/scripts 0, contracts 0, docs 0
  • Changed lines: 0 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status no-supported; comments 0; files 0; tokens 0; tool calls 0; warnings 0; duration 0s

Pilot mode: advisory only. Codex Review remains the merge gate.

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.

1 participant