proof: bridge expression helper compiler context#2099
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bugbot couldn't run - usage limit reachedBugbot 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_ca61b0e4-0478-400d-a9e2-9fdada306d6e) |
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.
Summary
Expr.internalCallthroughcompileExprWithInternals/compileInternalCallArgsevalExprWithHelpers, helper summary postcondition, helper-world preservation, compiled helper lookup,evalIRCallWithInternals, andevalIRExprWithInternalsExprInternalHelperCallContextBridgewith compiled argument evaluation evidence at the helper-call headPrintAxioms.leanReferences #2080.
Base / dependency
#2097 is merged, so this PR targets
maindirectly. It is not stacked.Proof status
This advances the remaining phase-4 blocker by adding the smallest expression compiler/context bridge currently supported by the architecture:
compileExprWithInternals_internalCall_shapeexposes the compiled Yul call produced for expression-position internal helpers using the exactcompileInternalCallArgspath, including expanded/forwarded helper arguments.exprInternalHelperCallContextBridge_compileExprWithInternals_internalCallcomposes the phase-4 per-calleeExprInternalHelperCallContextBridgewith source argument evaluation, compiled argument evaluation to the sameargVals, source summary soundness, world preservation, helper runtime lookup,evalIRCallWithInternals, and the resultingevalIRExprWithInternalscall expression shape.This is non-vacuous at the
Expr.internalCallhead. It does not fully close arbitrary expression contexts orStmtListExprInternalHelperStepInterface: the remaining proof/API gap is the compositional theorem lifting this helper-call head result through non-call expression contexts and statement heads while proving the compiled Yul argument context evaluates to the source helperargValsand preserving the helper-world evidence.Validation
lean-slot lake build Compiler.Proofs.HelperStepProofs(passed; Spark offload denied for this mission path, built locally)python3 scripts/generate_print_axioms.py --check(passed after regeneratingPrintAxioms.lean)rg -n "\\bsorry\\b|\\badmit\\b|\\baxiom\\b" Compiler/Proofs/HelperStepProofs.lean(no matches)make check(passed)Note
Low Risk
Proof-only additions in helper step proofs with no runtime or auth changes; scope is localized to compiler correctness lemmas.
Overview
Adds the phase-4 expression compiler/context handoff for
Expr.internalCallheads inHelperStepProofs.lean: a compile-shape lemma viacompileInternalCallArgs, a bundledExprInternalHelperCompiledCallContextResultpredicate, and a bridge theorem that ties sourceevalExprWithHelpers, helper summary/world preservation, and IRevalIRCallWithInternals/evalIRExprWithInternalswhen source and compiled args agree onargVals.Also adds
evalIRExprWithInternals_call_of_dispatchto map internal-call dispatch equalities into full expression-evaluation outcomes, and updatesPrintAxioms.lean(+3 listed lemmas).Reviewed by Cursor Bugbot for commit f3213e1. Bugbot is set up for automated code reviews on this repo. Configure here.