Repository navigation
Conversation
Second PR of the src/phl reorganization stack (see
src/phl/REFACTORING.md), on top of the recheckable proof-node basis.
It migrates the whole `seq` tactic class:
- rules/hoare/ecHoareSeq.ml, rules/ehoare/ecEHoareSeq.ml,
rules/bdhoare/ecBdHoareSeq.ml, rules/equiv/ecEquivSeq.ml: one module
per logic, each with a rule-arguments record, a node record holding
the resolved data (split indices, typed assertions and bounds), a
pure subgoal builder shared by the rule and its registered checker,
and an elaboration entry taking the parse-tree seq_info. Code
positions are resolved once in the rule (s_split_index), so the
checker never redoes code resolution.
- The one-sided equiv form is derived (two-sided rule + conseq) and
lives in ecEquivSeq.ml without a node of its own. The bdhoare rule
leaves its non-modification subgoal open; the derived
t_bdhoare_seq_full used by the tactic then tries to discharge it.
Both derived forms temporarily depend on the unmigrated EcPhlConseq.
- The seq parse info becomes a record (seq_info); EcPhlSeq is reduced
to the logic-agnostic dispatcher and the legacy positional adapters,
so its interface and external callers are unchanged. The no-op
FApi.t_low* wrappers are dropped.
Behaviour is preserved, except that malformed ehoare / bdhoare seq now
report the same error messages as hoare. Two-sided equiv seq still
types its right position in the left memory (flagged in a comment).
New tests tests/seq-{ehoare,equiv,bdhoare}.ec exercise the rules
directly. The stdlib and the unit tests pass under EC_RECHECK=1 with no
RecheckFailure; for each logic, a deliberately wrong checker is caught
only under EC_RECHECK.
strub
added this pull request to stack #1153
October 6, 2026 15:41
strub
removed this pull request from stack #1153
October 6, 2026 15:49
Member
Author
|
Superseded by #1155 (the branch was renamed to |
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.
Second PR of the src/phl reorganization stack (see
src/phl/REFACTORING.md), on top of the recheckable proof-node basis.
It migrates the whole
seqtactic class:rules/bdhoare/ecBdHoareSeq.ml, rules/equiv/ecEquivSeq.ml: one module
per logic, each with a rule-arguments record, a node record holding
the resolved data (split indices, typed assertions and bounds), a
pure subgoal builder shared by the rule and its registered checker,
and an elaboration entry taking the parse-tree seq_info. Code
positions are resolved once in the rule (s_split_index), so the
checker never redoes code resolution.
lives in ecEquivSeq.ml without a node of its own. The bdhoare rule
leaves its non-modification subgoal open; the derived
t_bdhoare_seq_full used by the tactic then tries to discharge it.
Both derived forms temporarily depend on the unmigrated EcPhlConseq.
to the logic-agnostic dispatcher and the legacy positional adapters,
so its interface and external callers are unchanged. The no-op
FApi.t_low* wrappers are dropped.
Behaviour is preserved, except that malformed ehoare / bdhoare seq now
report the same error messages as hoare. Two-sided equiv seq still
types its right position in the left memory (flagged in a comment).
New tests tests/seq-{ehoare,equiv,bdhoare}.ec exercise the rules
directly. The stdlib and the unit tests pass under EC_RECHECK=1 with no
RecheckFailure; for each logic, a deliberately wrong checker is caught
only under EC_RECHECK.