-
Notifications
You must be signed in to change notification settings - Fork 268
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
Enable the option enforce determinism for the verify command #5632
Changes from all commits
092a4a6
37c7013
0b0b1cf
2447124
214e90d
85791cf
86cd6ee
f0877b7
85a8568
86305dd
7dd2b9f
4cd130b
c09d9cc
febc1b7
460afb2
f9d8dc7
4b8e339
e7cf95e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,7 +161,7 @@ jobs: | |
output: both | ||
# Fail if less than 86% total coverage, measured across all packages combined. | ||
# Report "yellow" status if less than 90% total coverage. | ||
thresholds: '86 90' | ||
thresholds: '85 90' | ||
|
||
- name: Code coverage report (LSP) | ||
uses: irongut/[email protected] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -537,7 +537,9 @@ void ParsePrintMode(Option<PrintModes> option, Boogie.CommandLineParseState ps, | |
|
||
DafnyOptions.RegisterLegacyBinding(EnforceDeterminism, (options, value) => { | ||
options.ForbidNondeterminism = value; | ||
options.DefiniteAssignmentLevel = 4; | ||
if (!options.Get(RelaxDefiniteAssignment)) { | ||
options.DefiniteAssignmentLevel = 4; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please document this relationship in the attributes documentation if not already done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you elaborate? How does this code relate to attributes? I don't see a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I see. Thanks for clarifying. So essentially, you're fixing an error of mapping the new CLI to the old CLI, correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes |
||
} | ||
}); | ||
RelaxDefiniteAssignment.AddValidator(optionResult => { | ||
var enforceDeterminismResult = optionResult.FindResultFor(EnforceDeterminism); | ||
|
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 would like to see this threshold lowering accepted by @atomb. If I remember correctly, we wanted to not lower this threshold but gradually increase it when we test more and more code.
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 think ideally you would not measure a percentage but the absolute number of uncovered lines, and have a threshold on that, so that any added code must be covered, and in case some is uncovered you must explicitly update the threshold to confirm that.
If we would measure like that, this PR wouldn't have to update anything since AFAIK it does not add uncovered lines, just removes already covered ones, which lower the percentage.
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 don't get it. If you measure an absolute number of uncovered lines, you'll have to update this absolute number for every PR, right? Otherwise, if you only add uncovered lines of code, it would not complain which is not desirable.
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.
If you only add covered lines, then the uncovered line count does not change, so you would not have to update anything.
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.
If you only add covered lines, then the coverage percentage is automatically going up, so you wouldn't have to update anything if the threshold stays the same. The covered line percentage is an average, adding anything above this average will increase the average, which thus will remain above the threshold. Am I missing something?