proof: bridge function exec with internals#2116
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_1465f991-afad-48ea-aecb-a605955c6dff) |
|
Codex fallback review checked the isolated #2116 diff against Review summary:
Merge is blocked by policy because this stacked PR targets Additional current check blocker: Blocked on open predecessor PR #2115 and pending |
932cd95
into
paloma/issue-2080-function-withinternals-bridge
Base / dependency
Stacked on
paloma/issue-2080-function-withinternals-bridge/ PR #2115, which is still open and clean at PR creation time. This continues the #2080 L2 proof-tier stack after phase 20.Do not merge until predecessor stack is merged/green.
Summary
execIRStmtsWithInternalsappend/prefix bridge needed to run generated ABI param loads before helper-aware compiled bodies.exec_genParamLoads_supported_then_extraFuel_withInternalsandexec_compiledFunctionIR_withInternals_of_body_extraFuel, with the generated param-load prefix disjointness kept explicit.supported_function_correct_with_helper_proofs_body_goal_with_internals, consumingSupportedFunctionBodyWithHelpersAndHelperIRPreservationGoaland producing preservation againstexecIRFunctionWithInternalsdirectly.compileFunctionSpec_correct_generic_with_helper_proofs_and_helper_ir_of_body_goal.PrintAxioms.leanand proof-length metadata for the new bridge theorems.Validation
lean-slot lake build Compiler.Proofs.IRGeneration.FunctionShape Compiler.Proofs.IRGeneration.Function- passedlean-slot lake build Compiler.Proofs.IRGeneration.Function- passedlean-slot lake build Compiler.Proofs.IRGeneration.Contract- passedlean-slot lake build Compiler.Proofs.HelperStepProofs- passedpython3 scripts/generate_print_axioms.py --check- passedpython3 scripts/check_proof_length.py- passedgit diff --check- passedsorry,admit, oraxiomdeclarations; matches are comments/generated audit text only.Remaining #2080 gate
This PR exposes the first direct function-level
execIRFunctionWithInternalspath for exact helper-aware body goals. Whole-contract dispatch still needs a follow-up retarget that supplies the generated param-load disjointness/naming invariant and threads this direct function theorem through selector dispatch instead of the existing conservative-extension wrappers.Refs #2080
Note
Low Risk
Changes are confined to Lean correctness proofs and audit metadata; no compiler runtime, auth, or execution semantics outside the proof layer.
Overview
Adds #2080 phase 21 proof infrastructure so helper-aware function correctness can be stated against
execIRFunctionWithInternalswhen callers already discharge the exact helper-IR body goal, instead of a manual conservative-extension equality.New execution lemmas thread generated ABI
genParamLoadsunderexecIRStmtsWithInternals(prefix/append, param-load bridge, compiled-function fuel alignment).supported_function_correct_with_helper_proofs_body_goal_with_internalspackages source semantics, compilation shape, and that body goal intosourceResultMatchesIRResultforexecIRFunctionWithInternals.compileFunctionSpec_correct_generic_with_helper_proofs_and_helper_ir_of_body_goalexposes the same on the contract API, withYulStmtListCallsDisjointFromInternalTableongenParamLoadsas the remaining explicit premise.PrintAxioms.leanandscripts/check_proof_length.pyare updated for the new public theorems.Reviewed by Cursor Bugbot for commit d95f99d. Bugbot is set up for automated code reviews on this repo. Configure here.