-
Notifications
You must be signed in to change notification settings - Fork 262
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
Let measure-complexity
output the worst performing verification tasks by resource count
#5631
Merged
keyboardDrummer
merged 11 commits into
dafny-lang:master
from
keyboardDrummer:maximumResourceCounts
Jul 24, 2024
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3d3fb0e
Add test and tweak output
keyboardDrummer 0254a9f
Add release note
keyboardDrummer 866684f
Run formatter
keyboardDrummer 3b0697e
Do not look at actual resource counts
keyboardDrummer 2cfe46f
Updates
keyboardDrummer d1354e7
Merge remote-tracking branch 'origin/master' into maximumResourceCounts
keyboardDrummer b40c06c
Run formatter
keyboardDrummer 50e2076
Report total resources
keyboardDrummer 014d89a
Update expect file
keyboardDrummer 788d449
Add total
keyboardDrummer 39688c6
Merge branch 'master' into maximumResourceCounts
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
20 changes: 20 additions & 0 deletions
20
Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/measure-complexity.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,20 @@ | ||
// RUN: %exits-with 4 %baredafny measure-complexity --use-basename-for-filename --isolate-assertions --worst-amount 100 "%s" > %t.raw | ||
// RUN: %sed 's#\): \d+#): <redacted>#g' %t.raw > %t.raw2 | ||
// RUN: %sed 's#are \d+#are <redacted>#g' %t.raw2 > %t | ||
// RUN: %diff "%s.expect" "%t" | ||
method Foo() { | ||
assert Ack(0,0) == 10; | ||
assert Ack(1,3) == 10; | ||
assert Ack(3,3) == 10; | ||
assert Ack(3,4) == 10; | ||
} | ||
|
||
function Ack(m: nat, n: nat): nat | ||
{ | ||
if m == 0 then | ||
n + 1 | ||
else if n == 0 then | ||
Ack(m - 1, 1) | ||
else | ||
Ack(m - 1, Ack(m, n - 1)) | ||
} |
32 changes: 32 additions & 0 deletions
32
Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/measure-complexity.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,32 @@ | ||
Starting verification of iteration 1/1 with seed 0 | ||
measure-complexity.dfy(6,18): Error: assertion might not hold | ||
The total consumed resources are <redacted> | ||
The most demanding 100 verification tasks consumed these resources: | ||
measure-complexity.dfy(9,18): <redacted> | ||
measure-complexity.dfy(8,18): <redacted> | ||
measure-complexity.dfy(9,15): <redacted> | ||
measure-complexity.dfy(7,18): <redacted> | ||
measure-complexity.dfy(19,4): <redacted> | ||
measure-complexity.dfy(6,18): <redacted> | ||
measure-complexity.dfy(7,15): <redacted> | ||
measure-complexity.dfy(19,10): <redacted> | ||
measure-complexity.dfy(7,13): <redacted> | ||
measure-complexity.dfy(17,4): <redacted> | ||
measure-complexity.dfy(17,15): <redacted> | ||
measure-complexity.dfy(19,15): <redacted> | ||
measure-complexity.dfy(19,24): <redacted> | ||
measure-complexity.dfy(17,10): <redacted> | ||
measure-complexity.dfy(15,6): <redacted> | ||
measure-complexity.dfy(19,4): <redacted> | ||
measure-complexity.dfy(19,4): <redacted> | ||
measure-complexity.dfy(9,13): <redacted> | ||
measure-complexity.dfy(17,4): <redacted> | ||
measure-complexity.dfy(6,13): <redacted> | ||
measure-complexity.dfy(8,15): <redacted> | ||
measure-complexity.dfy(17,4): <redacted> | ||
measure-complexity.dfy(8,13): <redacted> | ||
measure-complexity.dfy(19,15): <redacted> | ||
measure-complexity.dfy(6,15): <redacted> | ||
measure-complexity.dfy(19,15): <redacted> | ||
measure-complexity.dfy(12,9): <redacted> | ||
measure-complexity.dfy(5,7): <redacted> |
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,5 @@ | ||
Let the command `measure-complexity` output which verification tasks performed the worst in terms of resource count. Output looks like: | ||
... | ||
Verification task on line 8 in file measure-complexity.dfy consumed 9984 resources | ||
Verification task on line 7 in file measure-complexity.dfy consumed 9065 resources | ||
... |
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.
Perfect place to use a priority queue!