Repository navigation
proofs(front-a12): close #465 P2/P3, eliminate onHeaderModule, and complete zero-callback BSM refinement in BsmZeroCallback.lean - #469
Merged
Conversation
…mplete zero-callback BSM refinement in BsmZeroCallback.lean
…(P1-1) and gate inputNotHdrParam by FailureReachable (P1-2)
…Param), P2-1 (RewriteSubst.lookup), and P3-1 (CoreToFullSsa.slot_injective)
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
Front A-12 closes all 4 review items from PR #465 (
1 P2 + 3 P3), structurally eliminatesonHeaderModule(and alls.currentModule = proj.modAtomobligations acrossonMain/onPredHoisted/onFailureRegion), and introducesproofs/BeamcProofs/Opt/Extracted/BsmZeroCallback.leanto eliminate ALL remaining per-step in-function callbacks (onMain,onPredHoisted,onFailureRegion) toward a 100% zero-callback end-to-end refinement theorem forBsmExt.opt.bsm.hoist_startson generalCoreToFullSsa.program.Strictly pure Lean (
proofs/BeamcProofs/**+proofs/BeamcProofs.leanonly; 0 Rust / 0BeamcCore/**edits / 0*Cbvtransitive dependencies).1. Closed PR #465 Carbon Review Items (
1 P2 + 3 P3)BsmProgramEvidence.lean):hpidxHdr/hparamAt/hparamLasthypotheses fromhoistProgram_predHoisted_of_plainPred, deriving them internally vialast_parameter_shape edit.sourceSlot edit.slotPresent;entryParamsEqfield fromHoistExtProgramLayout, replacing it with the derived theoremHoistExtProgramLayout.entryParamsEq(fromproj.entryS+proj.entryT+proj.blkParamsEq 0#u32).BsmProgramEvidence.lean): Factored the 3× repeated in-function callback signatures intostructure HoistInFunctionCallbacks.BsmProgramEvidence.lean): Fixed the two header comments (0 BeamcCore/** edits+0 *Cbv transitive dependencies, andhoistProgram_predHoisted_of_plainPred).BsmProgramEvidence.lean): Documented the naturalexternal/sourceCore.exportsnon-interference and arity preconditions inHoistExtProgramLayout.2. Complete Elimination of
onHeaderModule&s.currentModule = proj.modAtoms.currentModule = before.mod_atom.valtoHoistFrameMeta(BsmRefinement.lean),cS.frame.point.modAtom = before.mod_atom.valtoHoistContRel.{inMain, inFailure}(BsmRefinement.lean),sp.modAtom = before.mod_atom.valtoHoistCalleeEntry.toOptimized(BsmWholeFunction.lean), andmodAtomEq : modAtom = before.mod_atom.valtoHoistFuncProjection(BsmWholeFunction.lean).onHeaderModulefromHoistWholeFunctionEvidenceandHoistInFunctionCallbacks, and deleteds.currentModule = proj.modAtomfromonMain,onPredHoisted, andonFailureRegion.3. Zero-Callback End-to-End Refinement (
proofs/BeamcProofs/Opt/Extracted/BsmZeroCallback.lean)started_or_rejectsStart: every(proc, v)constructively splits into(∃ addr proc', Started proc v addr proc') ∨ RejectsStart proc v;failureReachable_ne_header:FailureReachable before h (UScalar.cast .Usize edit.fail) b → b.val ≠ h.valdirectly fromedit.distinct.hoistInFunc_invokeExport_match,hoistInFunc_callLocal_match,hoistInFunc_callExt_match,hoistInFunc_callFun_match,hoistInFunc_apply_match,hoistInFunc_redsCheck_match, andhoistInFunc_controlContinuationsconstructively discharge ALL 6 fields ofControlInstrContinuationsand ALL 4 tail-call continuations inHoistMainOrFailureSite.retainedTerm.SegmentBuilder:hoistZero_build_failed_segment: constructively executes a plain predecessor'sJump h argsplus the entire header prefix0 .. edit.index - 1(HeaderPrefix:.RedsCheck/.Lineviaheader_start_shape edit.selected) to buildSegment runtime source s costs atHeader,StartAt source before atHeader ...,HoistFrameMeta,SameProcess, andValuesExcept ... (HoistExemptFailure before edit).HoistFuncStaticLayout(100% state-/step-/callback-free static IR/CFG/projection bundle) + minimal 4-fieldHoistReachableInvariants→hoistZero_onPredHoisted,hoistZero_onMainOrFailure,hoistZero_callbacks,hoistZero_wholeFunctionLink,hoistZero_toLinked,hoistZero_refines, and multi-edit loop-levelhoistZero_semantic_refinement_ext(wiringBsmExt.opt.bsm.hoist_starts).Verification
lake build BeamcProofs.Opt.Extracted.BsmRefinement BeamcProofs.Opt.Extracted.BsmWholeFunction BeamcProofs.Opt.Extracted.BsmProgramEvidence BeamcProofs.Opt.Extracted.BsmZeroCallback BeamcProofs.Opt.Extracted.PipelineDriverInline BeamcProofs.Opt.FullPassSound.ExtractedPassFullTrace BeamcProofs.Opt.FullPassSound.All12.ExtractedStages: 4,322 jobs succeeded, 0 errors, 0 warnings in all modified/new files.bash proofs/scripts/audit.sh --static:OK(1,034 proof files + 26 model files).*Cbvimport check onBeamcProofs.Opt.Extracted.BsmZeroCallback:211transitive modules,Cbv=[].#print axiomson all 12 public theorems inBsmZeroCallback: only[propext, Classical.choice, Quot.sound].Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.