Repository navigation
Conversation
strub
added this pull request to stack #1156
October 6, 2026 18:30
Fourth PR of the program-logic reorganization stack (see src/phl/REFACTORING.md). It migrates the `skip` tactic class: - rules/hoare/ecHoareSkip.ml, rules/ehoare/ecEHoareSkip.ml, rules/bdhoare/ecBdHoareSkip.ml, rules/equiv/ecEquivSkip.ml: one trusted rule per logic, documented as an inference rule in its .mli, emitting a (parameterless) node with a registered checker. The rules' side conditions (empty statements; for bdhoare, a = or >= comparison) are part of the subgoal builder, so the checker re-validates them. - bdhoare skip keeps its derived form, t_bdhoare_skip_full: the bound-changing consequence to `= 1%r` (temporarily from the unmigrated EcPhlConseq), then the rule. - EcPhlSkip is reduced to the logic-agnostic dispatcher (interface unchanged); the no-op FApi.t_low0 wrappers are dropped. Behaviour is preserved; the only change is that the bdhoare rule, applied directly to a `<=` goal, now explains why it fails instead of raising an empty error message. A new test, tests/skip.ec, exercises the four logics (including a bound other than 1 and the failing cases). The stdlib and the unit tests pass under EC_RECHECK=1 with no RecheckFailure; each checker, when deliberately broken, is caught only under EC_RECHECK (stdlib: hoare 27 files, bdhoare 33, equiv 34; ehoare, unused in the stdlib, on tests/skip.ec).
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.
Fourth PR of the program-logic reorganization stack (see
src/phl/REFACTORING.md). It migrates the
skiptactic class:rules/bdhoare/ecBdHoareSkip.ml, rules/equiv/ecEquivSkip.ml: one
trusted rule per logic, documented as an inference rule in its .mli,
emitting a (parameterless) node with a registered checker. The
rules' side conditions (empty statements; for bdhoare, a = or >=
comparison) are part of the subgoal builder, so the checker
re-validates them.
bound-changing consequence to
= 1%r(temporarily from theunmigrated EcPhlConseq), then the rule.
unchanged); the no-op FApi.t_low0 wrappers are dropped.
Behaviour is preserved; the only change is that the bdhoare rule,
applied directly to a
<=goal, now explains why it fails instead ofraising an empty error message.
A new test, tests/skip.ec, exercises the four logics (including a
bound other than 1 and the failing cases). The stdlib and the unit
tests pass under EC_RECHECK=1 with no RecheckFailure; each checker,
when deliberately broken, is caught only under EC_RECHECK (stdlib:
hoare 27 files, bdhoare 33, equiv 34; ehoare, unused in the stdlib,
on tests/skip.ec).