feat: add @[mvcgen_invariant_type] attribute for extensible invariant classification#12874
Merged
feat: add @[mvcgen_invariant_type] attribute for extensible invariant classification#12874
@[mvcgen_invariant_type] attribute for extensible invariant classification#12874Conversation
…nt classification This PR adds an `@[mvcgen_invariant_type]` tag attribute so that users can mark custom types as invariant types for the `mvcgen` tactic. Goals whose type is an application of a tagged type are classified as invariants rather than verification conditions. The hard-coded check for `Std.Do.Invariant` is kept as a fallback until a stage0 update allows applying the attribute directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…iteration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2fbe9e5 to
dbcdfd0
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 11, 2026
…nt`, `StringSliceInvariant` (#12880) This PR applies `@[mvcgen_invariant_type]` to `Std.Do.Invariant` and removes the hard-coded fallback in `isMVCGenInvariantType` that was needed for bootstrapping (cf. #12874). It also extracts `StringInvariant` and `StringSliceInvariant` as named abbreviations tagged with `@[mvcgen_invariant_type]`, so that `mvcgen` classifies string and string slice loop invariants correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
This PR adds an
@[mvcgen_invariant_type]tag attribute so that users can markcustom types as invariant types for the
mvcgentactic. Goals whose type is anapplication of a tagged type are classified as invariants rather than verification
conditions. The hard-coded check for
Std.Do.Invariantis kept as a fallbackuntil a stage0 update allows applying the attribute directly.
A follow-up PR (after a stage0 update) will apply
@[mvcgen_invariant_type]toStd.Do.Invariantand remove the hard-coded fallback.