Fix cover diagnostic messages to distinguish from assertions#413
Open
MikaelMayer wants to merge 8 commits intomainfrom
Open
Fix cover diagnostic messages to distinguish from assertions#413MikaelMayer wants to merge 8 commits intomainfrom
MikaelMayer wants to merge 8 commits intomainfrom
Conversation
- Test that cover failures produce 'cover property is not satisfiable' - Test that assert failures produce 'assertion does not hold' - Test that passing statements produce no diagnostics - Extract only messages to avoid unstable byteIdx in test expectations
Tests that same expression (x > 0) produces no diagnostic for cover (satisfiable) but produces 'assertion could not be proved' for assert (unprovable)
Tests that same expression (x > 0) produces no diagnostic for cover (satisfiable) but produces 'assertion could not be proved' for assert (unprovable)
aqjune-aws
reviewed
Feb 12, 2026
| some { | ||
| fileRange := default | ||
| message := s!"Internal error: diagnostics without position! Metadata value for fileRange key was not a fileRange. obligation label: {repr vcr.obligation.label}" | ||
| } |
Contributor
There was a problem hiding this comment.
I wonder how the line numbers in CorePrelude.lean were recorded - do they have fileRange metadata?
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.
Summary
The
toDiagnosticModelfunction was not cover-aware - it always reported "assertion does not hold" even for cover statement failures.Changes
.failresults: report "cover property is not satisfiable" for cover statements, "assertion does not hold" for asserts.unknownresults on cover statements: only report diagnostic in debug mode (verbosity > normal), since it's informational rather than an error.unknownresults on asserts: always report "assertion could not be proved"Testing
The change affects diagnostic message generation only.