-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set a default verification time limit (#6028)
Fixes dafny-lang/ide-vscode#514 ### What was changed? Set a default verification time limit ### How has this been tested? Added a CLI test that checks there is a default time-out <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
0831717
commit c79cb5e
Showing
8 changed files
with
117 additions
and
12 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
17 changes: 17 additions & 0 deletions
17
Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.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,17 @@ | ||
// RUN: ! %baredafny verify --use-basename-for-filename "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
method Foo() { | ||
// Assert something that takes a long time to verify | ||
assert Ack(4, 2) == 1; | ||
} | ||
|
||
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)) | ||
} |
7 changes: 7 additions & 0 deletions
7
Source/IntegrationTests/TestFiles/LitTests/LitTest/cli/defaultTimeLimit.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,7 @@ | ||
defaultTimeLimit.dfy(4,7): Error: Verification of 'Foo' timed out after 30 seconds. (the limit can be increased using --verification-time-limit) | ||
| | ||
4 | method Foo() { | ||
| ^^^ | ||
|
||
|
||
Dafny program verifier finished with 1 verified, 0 errors, 1 time out |
2 changes: 1 addition & 1 deletion
2
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3855.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
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
File renamed without changes.
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 @@ | ||
Change the default value for --verification-time-limit to 30 seconds instead of 0 (no limit) |