-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #5150 ### Description Add a `--progress` option to Dafny, that displays output like the following: ``` Verified 0/5 symbols. Waiting for Foo to verify. Verified part 1/3 of Foo, located at line 4, using 8,7E+002 resources Verified part 2/3 of Foo, located at line 6, using 3,1E+003 resources Verified part 3/3 of Foo, located at line 7, using 2,8E+003 resources Verified 1/5 symbols. Waiting for Faz to verify. Verified part 1/2 of Faz, located at line 10, using 8,7E+002 resources Verified part 2/2 of Faz, located at line 10, using 3,1E+003 resources Verified 2/5 symbols. Waiting for Fopple to verify. Verified part 1/2 of Fopple, located at line 12, using 8,7E+002 resources Verified part 2/2 of Fopple, located at line 12, using 3,1E+003 resources Verified 3/5 symbols. Waiting for Burp to verify. Verified part 1/3 of Burp, located at line 14, using 8,7E+002 resources Verified part 2/3 of Burp, located at line 16, using 3,1E+003 resources Verified part 3/3 of Burp, located at line 17, using 2,8E+003 resources Verified 4/5 symbols. Waiting for Blanc to verify. Verified part 1/2 of Blanc, located at line 20, using 8,7E+002 resources Verified part 2/2 of Blanc, located at line 20, using 3,1E+003 resources Dafny program verifier finished with 12 verified, 0 errors ``` Note that when `--cores` is more than 1, which is the default, the output will get more messy because "Verify x/y symbols" will be interspersed with "Verified part a/b of X" The locations of parts can be confusing, sometimes they point to the header of the symbol being verified, such as when verifying wellformedness of the symbol contract, or correctness when no `--isolate-assertions` is used. When `--isolate-assertions` is used, they may also point to lines containing assertions. ### How has this been tested? Add a littish test, `progress.dfy` <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
- Loading branch information
1 parent
153047b
commit aab54a3
Showing
6 changed files
with
61 additions
and
0 deletions.
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
21 changes: 21 additions & 0 deletions
21
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// RUN: %verify --progress --isolate-assertions --cores=1 %s > %t.raw | ||
// RUN: %sed 's/time: \d*ms/redacted/g' "%t".raw > %t | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
method Foo() | ||
{ | ||
assert true; | ||
assert true; | ||
} | ||
|
||
method Faz() ensures true { } | ||
|
||
method Fopple() ensures true { } | ||
|
||
method Burp() | ||
{ | ||
assert true; | ||
assert true; | ||
} | ||
|
||
method Blanc() ensures true { } |
19 changes: 19 additions & 0 deletions
19
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 |
---|---|---|
@@ -0,0 +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) | ||
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) | ||
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) | ||
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) | ||
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) | ||
|
||
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 @@ | ||
Add an option --progress that can be used to track the progress of verification. |