-
Notifications
You must be signed in to change notification settings - Fork 267
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
Out of resources error reporting #5281
Merged
keyboardDrummer
merged 8 commits into
dafny-lang:master
from
keyboardDrummer:outOfResourcesDebugging
Apr 2, 2024
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3b44de2
Add test and update --progress behavior to include an outcome
keyboardDrummer ba83e0a
Make reported token when verification runs out of resources, more pre…
keyboardDrummer fe70c24
Fixes
keyboardDrummer a05f0f7
Add release note
keyboardDrummer e162a36
Merge branch 'master' into outOfResourcesDebugging
keyboardDrummer 1b16f7c
Fix test instability
keyboardDrummer 72a053d
Update docs/dev/news/5281.feat
keyboardDrummer 3763e00
Merge branch 'master' into outOfResourcesDebugging
keyboardDrummer 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
2 changes: 1 addition & 1 deletion
2
Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/isolate-assertions.dfy
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
8 changes: 4 additions & 4 deletions
8
...ce/IntegrationTests/TestFiles/LitTests/LitTest/verification/isolate-assertions.dfy.expect
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Verified 0/2 symbols. Waiting for Foo to verify. | ||
Verified part 1/3 of Foo, on line 5 (redacted, resource count: 8.7E+002) | ||
Verified part 2/3 of Foo, on line 6 (redacted, resource count: 3.1E+003) | ||
Verified part 3/3 of Foo, on line 7 (redacted, resource count: 2.8E+003) | ||
Verification part 1/3 of Foo, on line 5, verified successfully, redacted and consuming 8.7E+002 resources | ||
Verification part 2/3 of Foo, on line 6, verified successfully, redacted and consuming 3.1E+003 resources | ||
Verification part 3/3 of Foo, on line 7, verified successfully, redacted and consuming 2.8E+003 resources | ||
Verified 1/2 symbols. Waiting for Bar to verify. | ||
Verified part 1/1 of Bar, on line 10 (redacted, resource count: 3.1E+003) | ||
Verification part 1/1 of Bar, on line 10, verified successfully, redacted and consuming 3.1E+003 resources | ||
|
||
Dafny program verifier finished with 4 verified, 0 errors |
13 changes: 13 additions & 0 deletions
13
...rationTests/TestFiles/LitTests/LitTest/verification/outOfResourceAndIsolateAssertions.dfy
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,13 @@ | ||
// RUN: ! %verify --isolate-assertions --progress "%s" &> %t.raw | ||
// RUN: %sed 's/taking \d*ms/redacted/g' %t.raw > %t | ||
// RUN: %diff "%s.expect" %t | ||
|
||
ghost function f(i:nat, j:nat):int {if i == 0 then 0 else f(i - 1, i * j + 1) + f(i - 1, 2 * i * j)} | ||
|
||
lemma{:resource_limit 10000000} L() | ||
{ | ||
assert true; | ||
assert f(10, 5) == 0; // runs out of resources | ||
assert true; | ||
assert f(10, 6) == 0; // runs out of resources | ||
} |
26 changes: 26 additions & 0 deletions
26
...ests/TestFiles/LitTests/LitTest/verification/outOfResourceAndIsolateAssertions.dfy.expect
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,26 @@ | ||
Verified 0/2 symbols. Waiting for f to verify. | ||
Verification part 1/11 of f, on line 5, verified successfully, redacted and consuming 9.5E+002 resources | ||
Verification part 2/11 of f, on line 5, verified successfully, redacted and consuming 6.2E+003 resources | ||
Verification part 3/11 of f, on line 5, verified successfully, redacted and consuming 6.7E+003 resources | ||
Verification part 4/11 of f, on line 5, verified successfully, redacted and consuming 6.7E+003 resources | ||
Verification part 5/11 of f, on line 5, verified successfully, redacted and consuming 5.8E+003 resources | ||
Verification part 6/11 of f, on line 5, verified successfully, redacted and consuming 5.9E+003 resources | ||
Verification part 7/11 of f, on line 5, verified successfully, redacted and consuming 5.9E+003 resources | ||
Verification part 8/11 of f, on line 5, verified successfully, redacted and consuming 7.8E+003 resources | ||
Verification part 9/11 of f, on line 5, verified successfully, redacted and consuming 6.0E+003 resources | ||
Verification part 10/11 of f, on line 5, verified successfully, redacted and consuming 6.0E+003 resources | ||
Verification part 11/11 of f, on line 5, verified successfully, redacted and consuming 6.1E+003 resources | ||
Verification part 1/9 of L, on line 7, verified successfully, redacted and consuming 8.7E+002 resources | ||
Verified 1/2 symbols. Waiting for L to verify. | ||
Verification part 2/9 of L, on line 9, verified successfully, redacted and consuming 5.6E+003 resources | ||
Verification part 3/9 of L, on line 10, verified successfully, redacted and consuming 5.8E+003 resources | ||
Verification part 4/9 of L, on line 10, verified successfully, redacted and consuming 6.0E+003 resources | ||
Verification part 5/9 of L, on line 11, verified successfully, redacted and consuming 5.5E+003 resources | ||
Verification part 6/9 of L, on line 12, verified successfully, redacted and consuming 5.5E+003 resources | ||
Verification part 7/9 of L, on line 12, verified successfully, redacted and consuming 6.8E+003 resources | ||
Verification part 8/9 of L, on line 10, ran out of resources, redacted and consuming 1.0E+007 resources | ||
Verification part 9/9 of L, on line 12, ran out of resources, redacted and consuming 1.0E+007 resources | ||
outOfResourceAndIsolateAssertions.dfy(10,18): Error: Verification out of resource (L) | ||
outOfResourceAndIsolateAssertions.dfy(12,18): Error: Verification out of resource (L) | ||
|
||
Dafny program verifier finished with 18 verified, 0 errors, 2 out of resource |
2 changes: 1 addition & 1 deletion
2
Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/progress.dfy
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
24 changes: 12 additions & 12 deletions
24
Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/progress.dfy.expect
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
Verified 0/5 symbols. Waiting for Foo to verify. | ||
Verified part 1/3 of Foo, on line 5 (redacted, resource count: 8.7E+002) | ||
Verified part 2/3 of Foo, on line 7 (redacted, resource count: 3.1E+003) | ||
Verified part 3/3 of Foo, on line 8 (redacted, resource count: 2.8E+003) | ||
Verification part 1/3 of Foo, on line 5, verified successfully, redacted and consuming 8.7E+002 resources | ||
Verification part 2/3 of Foo, on line 7, verified successfully, redacted and consuming 3.1E+003 resources | ||
Verification part 3/3 of Foo, on line 8, verified successfully, redacted and consuming 2.8E+003 resources | ||
Verified 1/5 symbols. Waiting for Faz to verify. | ||
Verified part 1/2 of Faz, on line 11 (redacted, resource count: 8.7E+002) | ||
Verified part 2/2 of Faz, on line 11 (redacted, resource count: 3.1E+003) | ||
Verification part 1/2 of Faz, on line 11, verified successfully, redacted and consuming 8.7E+002 resources | ||
Verification part 2/2 of Faz, on line 11, verified successfully, redacted and consuming 3.1E+003 resources | ||
Verified 2/5 symbols. Waiting for Fopple to verify. | ||
Verified part 1/2 of Fopple, on line 13 (redacted, resource count: 8.7E+002) | ||
Verified part 2/2 of Fopple, on line 13 (redacted, resource count: 3.1E+003) | ||
Verification part 1/2 of Fopple, on line 13, verified successfully, redacted and consuming 8.7E+002 resources | ||
Verification part 2/2 of Fopple, on line 13, verified successfully, redacted and consuming 3.1E+003 resources | ||
Verified 3/5 symbols. Waiting for Burp to verify. | ||
Verified part 1/3 of Burp, on line 15 (redacted, resource count: 8.7E+002) | ||
Verified part 2/3 of Burp, on line 17 (redacted, resource count: 3.1E+003) | ||
Verified part 3/3 of Burp, on line 18 (redacted, resource count: 2.8E+003) | ||
Verification part 1/3 of Burp, on line 15, verified successfully, redacted and consuming 8.7E+002 resources | ||
Verification part 2/3 of Burp, on line 17, verified successfully, redacted and consuming 3.1E+003 resources | ||
Verification part 3/3 of Burp, on line 18, verified successfully, redacted and consuming 2.8E+003 resources | ||
Verified 4/5 symbols. Waiting for Blanc to verify. | ||
Verified part 1/2 of Blanc, on line 21 (redacted, resource count: 8.7E+002) | ||
Verified part 2/2 of Blanc, on line 21 (redacted, resource count: 3.1E+003) | ||
Verification part 1/2 of Blanc, on line 21, verified successfully, redacted and consuming 8.7E+002 resources | ||
Verification part 2/2 of Blanc, on line 21, verified successfully, redacted and consuming 3.1E+003 resources | ||
|
||
Dafny program verifier finished with 12 verified, 0 errors |
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 @@ | ||
Improved error reporting when verification times out or runs out of resources, so that when using --isolate-assertions, the error message points to the problematic assertion. | ||
keyboardDrummer marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
What does "redacted" mean?
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.
Because the time taken is not consistent over runs, I replace it with "redacted" in tests using
sed
.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.
I know you replace it with "redacted", my question was really about the meaning of "redacted".
I don't know the rationale behind choosing "redacted" for that replacement. For me, "redacted" means "edit (text) for publication.".
If it was me, I would have just removed the variable part, so that the error would look like "verified successfully and consuming ...."
So my question is, why was the word "redacted" chosen here?
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.
I'm using it as a means to say "there was something else here, but it has been removed"