-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Not generate boogie translation if not verifying (#6067)
### What was changed? I ensure the `Options.DafnyVerify` is set to false if `--no-verify` is provided, except if `--bprint` is set ### How has this been tested? A new driver test verifies the new behavior. Without the test, I got it wrong, so I'm confident that the test ensures the behavior is correct. I don't think there is another way to test that the Boogie translation does not happen when it won't actually verify; <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
add27bc
commit 4d1a82b
Showing
10 changed files
with
87 additions
and
26 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
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
26 changes: 26 additions & 0 deletions
26
Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TranslationCases.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,26 @@ | ||
// NONUNIFORM: Only testing the translation to Boogie aspect of the pipeline depending on checks | ||
// RUN: %baredafny run %args --log-level verbose "%s" > "%t" | ||
// RUN: %OutputCheck --file-to-check "%t" "%S/TranslationCasesTranslate.check" | ||
|
||
// RUN: %baredafny run %args --log-level verbose --no-verify "%s" > "%t" | ||
// RUN: %OutputCheck --file-to-check "%t" "%S/TranslationCasesNoTranslation.check" | ||
|
||
// RUN: %baredafny run %args --log-level verbose --no-verify --bprint:file.bpl "%s" > "%t" | ||
// RUN: %OutputCheck --file-to-check "%t" "%S/TranslationCasesTranslate.check" | ||
|
||
// RUN: %baredafny run %args --log-level verbose --no-verify --sprint:file.bpl "%s" > "%t" | ||
// RUN: %OutputCheck --file-to-check "%t" "%S/TranslationCasesTranslate.check" | ||
|
||
// RUN: %baredafny run %args --log-level verbose --no-verify --sprint:file.bpl "%s" > "%t" | ||
// RUN: %OutputCheck --file-to-check "%t" "%S/TranslationCasesTranslate.check" | ||
|
||
module VerifiableModule { | ||
@Test | ||
method CanTest() { | ||
assert 1 == 1; | ||
expect 1 == 1; | ||
} | ||
method Main() { | ||
CanTest(); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ce/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TranslationCasesNoTranslation.check
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 @@ | ||
// CHECK-NOT: Starting translation to Boogie of module VerifiableModule |
1 change: 1 addition & 0 deletions
1
Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/TranslationCasesTranslate.check
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 @@ | ||
// CHECK: Starting translation to Boogie of module VerifiableModule |
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