-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: {:only}
attribute for members
#4075
Merged
Merged
Changes from 9 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b57f52a
Add test for issue #4074
MikaelMayer eb93921
Feat: `{:only}` attribute for members
MikaelMayer 61a650e
FIXER:auditor/TestAuditor.dfy
MikaelMayer a3f6420
Added auditor and documentation
MikaelMayer 0547fc3
fixed numbering of Attributes.md
MikaelMayer e26a10a
Merge branch 'master' into fix-4074-only-on-single-declaration
atomb f61809f
Review comments
MikaelMayer a2db7e8
Merge branch 'fix-4074-only-on-single-declaration' of https://github.…
MikaelMayer e78e3ec
Merge branch 'master' into fix-4074-only-on-single-declaration
MikaelMayer c3da8a3
FIXER:separate-verification/assumptions.dfy
MikaelMayer 5839315
Merge branch 'master' into fix-4074-only-on-single-declaration
MikaelMayer fc678c1
Merge branch 'fix-4074-only-on-single-declaration' of https://github.…
MikaelMayer ca1d3df
Merge branch 'master' into fix-4074-only-on-single-declaration
MikaelMayer f7bf31e
Fixed the merge
MikaelMayer b5a9a96
Fixed CI - Ensure "make numbers" works on Windows
MikaelMayer 902a374
Merge branch 'master' into fix-4074-only-on-single-declaration
MikaelMayer 5f6595f
Merge branch 'master' into fix-4074-only-on-single-declaration
MikaelMayer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,3 +137,7 @@ method AssertOnly() { | |
assert {:only} true; | ||
assert false; | ||
} | ||
|
||
method {:only} MethodOnly() { | ||
assert false; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// RUN: %exits-with 4 %baredafny verify %args "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
method {:only "wrongArgument"} TestReported() { | ||
assert false; // An error here | ||
} | ||
|
||
method TestNotReported() { | ||
assert false; | ||
} | ||
|
||
class A { | ||
method {:only} TestReported() { | ||
assert false; // An error here | ||
} | ||
|
||
method TestNotReported() { | ||
assert false; | ||
} | ||
} | ||
|
||
module B { | ||
method {:only} TestReported() { | ||
assert false; // An error here | ||
} | ||
|
||
method TestNotReported() { | ||
assert false; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
git-issue-4074.dfy(23,9): Warning: Members with {:only} temporarily disable the verification of other members in the entire file | ||
git-issue-4074.dfy(13,9): Warning: Members with {:only} temporarily disable the verification of other members in the entire file | ||
git-issue-4074.dfy(4,7): Warning: Members with {:only} temporarily disable the verification of other members in the entire file | ||
git-issue-4074.dfy(4,14): Warning: {:only} on members does not support arguments | ||
git-issue-4074.dfy(24,11): Error: assertion might not hold | ||
git-issue-4074.dfy(14,11): Error: assertion might not hold | ||
git-issue-4074.dfy(5,9): Error: assertion might not hold | ||
|
||
Dafny program verifier finished with 0 verified, 3 errors |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use
HasOnlyAttribute
.