Repository navigation
Conversation
strub
added this pull request to stack #1156
October 6, 2026 16:52
Third PR of the program-logic reorganization stack (see src/phl/REFACTORING.md). Framing — generalizing a condition over the variables a program writes — becomes explicit: it is done by one trusted frame rule per logic, and by nothing else. - rules/ecPlFrame.ml: the framing conditions (statement / procedure, one- / two-sided), i.e. the only place computing the written variables (s_write / f_write) and generalizing over them. Shared by the frame rules and by `conseq auto`. - rules/hoare/ecHoareFrame.ml, rules/bdhoare/ecBdHoareFrame.ml, rules/equiv/ecEquivFrame.ml: the frame rules — framed weakening of the postcondition — for statements and procedures, each emitting a node recording the new postcondition and with a registered checker. The checker recomputes the written variables from the goal's own context, so this soundness-critical step is re-validated. - EcPhlConseq: the former notmod rules and their condition builders are now adapters onto these modules; the framed consequence (t_*_conseq_nm) remains a derived composition of the frame rule and the (not yet migrated) consequence rule, and so do the seq derived forms that use it. Behaviour is unchanged (ehoare framing, done through concave, is left to the conseq migration). The stdlib and the unit tests pass under EC_RECHECK=1 with no RecheckFailure; each of the six checkers, when deliberately broken, is caught on the stdlib (hoareS 14 files, hoareF 3, bdhoareS 6, bdhoareF 8, equivS 13, equivF 17) and only under EC_RECHECK.
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.
Third PR of the program-logic reorganization stack (see
src/phl/REFACTORING.md). Framing — generalizing a condition over the
variables a program writes — becomes explicit: it is done by one
trusted frame rule per logic, and by nothing else.
one- / two-sided), i.e. the only place computing the written
variables (s_write / f_write) and generalizing over them. Shared by
the frame rules and by
conseq auto.rules/equiv/ecEquivFrame.ml: the frame rules — framed weakening of
the postcondition — for statements and procedures, each emitting a
node recording the new postcondition and with a registered checker.
The checker recomputes the written variables from the goal's own
context, so this soundness-critical step is re-validated.
are now adapters onto these modules; the framed consequence
(t_*_conseq_nm) remains a derived composition of the frame rule and
the (not yet migrated) consequence rule, and so do the seq derived
forms that use it.
Behaviour is unchanged (ehoare framing, done through concave, is left
to the conseq migration). The stdlib and the unit tests pass under
EC_RECHECK=1 with no RecheckFailure; each of the six checkers, when
deliberately broken, is caught on the stdlib (hoareS 14 files, hoareF
3, bdhoareS 6, bdhoareF 8, equivS 13, equivF 17) and only under
EC_RECHECK.