Remove termination conditions in invariants#264
Merged
tahina-pro merged 8 commits intoproject-everest:_nik_smt_univs_2025from Mar 16, 2026
Merged
Conversation
Remove explicit boolean termination variable from while loop invariants
across all Pulse files. The old syntax 'invariant b . <body using b>'
is replaced with 'invariant <body>', and all 'pure(b == ...)' clauses
referencing the removed boolean are deleted.
Additional fixes required by the new while loop checker:
- Flatten 'if (res) { ... } else { false }' condition blocks to
'res && ...' expressions to avoid branching in condition blocks
- Use pcont mutable ref pattern in Parse.MapGroup.fst where the
checker cannot resolve uvars in flattened conditions
- Provide explicit Trade.trans_hyp_r argument in Nondet.fst to
disambiguate between multiple Trade predicates
- Inline impl_map_group_filter_invariant in MapGroup.fst to avoid
opaque predicate issues with exists*
- Add explicit assertions and z3rlimit increases where the new
checker's separate exit condition pure facts require SMT guidance
Files modified (15):
- lowparse/pulse: Recursive.fst, VCList.fst
- cbor/pulse/raw: Copy.fst, Nondet.fst, Compare.Base.fst,
Nondet.Compare.fst, Insert.fst, Compare.Iterator.fst,
API.Det.Common.fst
- cbor/pulse/raw/everparse: Format.Parse.fst, UTF8.fst, Nondet.Gen.fst
- cddl/pulse: ArrayGroup.fst, MapGroup.fst, Parse.MapGroup.fst
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…parse into _taramana_smt_univs_20260302_pulse
Update two while loops to use the new invariant syntax from Pulse PR 573: - Remove explicit boolean variable binding (invariant b. -> invariant) - Remove pure(b == ...) clauses - Flatten if/else condition blocks to && expressions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d210324
into
project-everest:_nik_smt_univs_2025
17 checks passed
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.
Following FStarLang/pulse#573,
invariant b . <...>is no longer supported. Neither are compound loop termination conditions.This PR adapts the Pulse combinators in LowParse, CBOR and CDDL accordingly.
This PR has mostly been authored by GitHub Copilot CLI 0.421.0 using Claude Opus 4.6.