proof: add expression helper context bridge#2097
Merged
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_25ea55e1-f998-43a3-8138-da6cdcf04024) |
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
evalExprWithHelpers_internalCall: witness-based summary postcondition and world-preservation consequenceHelperStepProofs.leanthat packages source summary soundness, expression-call world preservation, compiled helper table evidence, and the compiled YulevalIRCallWithInternalsdispatch shapePrintAxioms.leanReferences #2080.
Proof status
This advances the phase-3 expression-position adapter from a pure statement-head boundary witness to a semantic expression-context bridge layer:
exprInternalHelperCallContextBridge_sourceEvidenceexposes theevalExprWithHelpersreduction forExpr.internalCall, the correspondingInternalHelperSummaryContract.postfact forinterpretInternalFunctionFuel, and the world-preservation consequence needed by expression contexts.evalIRCallWithInternals_of_compiledHelperWitnessconnectsSupportedCompiledInternalHelperWitnessto helper-aware Yul expression-call dispatch throughevalIRCallWithInternalsafter argument evaluation.exprInternalHelperCallContextBridge_of_supportedEvidencepackagesSupportedBodyHelperInterface, summary soundness,exprCallsPreserveWorld, andSupportedRuntimeHelperTableInterfaceinto the per-callee expression-context bridge.This is non-vacuous for the per-callee expression helper call bridge, but it does not fully close
StmtListExprInternalHelperStepInterface: the remaining architecture gap is the compositional expression compiler theorem that proves compiled Yul argument/expression contexts evaluate to the sameargVals/state expected by this bridge and lifts that through arbitrary statement heads. Existing helper-surface-closed fast paths andSupportedStmtList.helperSurfaceClosedare unchanged.Validation
lake env lean Compiler/Proofs/IRGeneration/SourceSemantics.lean(passed)lake env lean Compiler/Proofs/HelperStepProofs.lean(passed)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)rg -n "\\bsorry\\b|\\badmit\\b|\\baxiom\\b" Compiler/Proofs/IRGeneration/SourceSemantics.lean Compiler/Proofs/HelperStepProofs.lean(no matches)make check(passed)Next blocker / dispatch recommendation
Prove the expression compiler/context theorem that turns per-call bridge evidence into statement-head
ExprInternalHelperHeadStepBridgevalues: it needs to relateSourceSemantics.evalExprWithHelpersandevalIRExprWithInternalsfor expression contexts containing internal helper calls, threading helper-world preservation and argument evaluation throughcompileExprWithInternals/ statement compilation shapes.Note
Low Risk
Proof-only additions in compiler verification modules with no runtime or auth changes; remaining gap is explicitly documented architecture, not partial unsafe closure.
Overview
Adds expression-position internal helper proof infrastructure so source
evalExprWithHelpersand compiledevalIRCallWithInternalscan be linked per callee before full statement-head closure.In SourceSemantics, new witness-based lemmas expose summary postconditions and world preservation for
Expr.internalCallunderevalExprWithHelpers, without relying on private lookup hypotheses.In HelperStepProofs,
evalIRCallWithInternals_of_compiledHelperWitnessshows that after Yul args evaluate, helper-aware calls dispatch through the runtime internal table;ExprInternalHelperCallContextBridgebundles source summary soundness, world preservation, compiled helper witnesses, and that IR dispatch shape;exprInternalHelperCallContextBridge_of_supportedEvidencebuilds bridges from the supported helper inventory;exprInternalHelperCallContextBridge_sourceEvidencepackages the source-side reduction, contract post, and preservation facts.PrintAxioms is regenerated (+4 public theorems).
StmtListExprInternalHelperStepInterfaceis still open: a compositional expression-compiler theorem is needed to lift per-call bridges toExprInternalHelperHeadStepBridge.Reviewed by Cursor Bugbot for commit 6526713. Bugbot is set up for automated code reviews on this repo. Configure here.