Repository navigation
Conversation
strub
added this pull request to stack #1156
October 6, 2026 19:06
Fifth PR of the program-logic reorganization stack (see
src/phl/REFACTORING.md). It migrates the rules closing trivially valid
judgements, formerly in EcPhlTAuto; they are axioms of the program
logics (no other rule derives them), so they are trusted:
- rules/hoare/ecHoareTrue.ml: `hoare [_ : P ==> true]` (every
postcondition, exceptional ones included, is true);
- rules/ehoare/ecEHoareZero.ml: `ehoare [_ : P ==> 0%xr]`;
- rules/{hoare,bdhoare,equiv}/ec<Logic>Exfalso.ml: a false
precondition (for bdhoare, with the premise `0%r <= d`). ehoare has
no such rule: its precondition is an expectation, never `false`.
Each rule comes in statement and procedure form, is documented as an
inference rule in its .mli, and emits a (parameterless) node with a
registered checker; its side condition is part of the subgoal builder,
so the checker re-validates it. EcPhlTAuto keeps its interface, as
adapters and the logic-agnostic exfalso dispatcher. Behaviour is
unchanged.
A new test, tests/true-zero-exfalso.ec, exercises every rule. The
stdlib and the unit tests pass under EC_RECHECK=1 with no
RecheckFailure; each of the ten checkers, when deliberately broken, is
caught only under EC_RECHECK (on the new test; on the stdlib too where
the rule is used there: hoareS-true 14 files, hoareF-true 4, hoare /
bdhoare / equiv exfalso 1 each).
strub
force-pushed
the
pl/true-zero-exfalso
branch
from
October 6, 2026 20:43
b57ab2b to
a7a768a
Compare
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.
Fifth PR of the program-logic reorganization stack (see
src/phl/REFACTORING.md). It migrates the rules closing trivially valid
judgements, formerly in EcPhlTAuto; they are axioms of the program
logics (no other rule derives them), so they are trusted:
hoare [_ : P ==> true](everypostcondition, exceptional ones included, is true);
ehoare [_ : P ==> 0%xr];precondition (for bdhoare, with the premise
0%r <= d). ehoare hasno such rule: its precondition is an expectation, never
false.Each rule comes in statement and procedure form, is documented as an
inference rule in its .mli, and emits a (parameterless) node with a
registered checker; its side condition is part of the subgoal builder,
so the checker re-validates it. EcPhlTAuto keeps its interface, as
adapters and the logic-agnostic exfalso dispatcher. Behaviour is
unchanged.
A new test, tests/true-zero-exfalso.ec, exercises every rule. The
stdlib and the unit tests pass under EC_RECHECK=1 with no
RecheckFailure; each of the ten checkers, when deliberately broken, is
caught only under EC_RECHECK (on the new test; on the stdlib too where
the rule is used there: hoareS-true 14 files, hoareF-true 4, hoare /
bdhoare / equiv exfalso 1 each).