Skip to content
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

Epic: Verification Durability #1582

Open
robin-aws opened this issue Nov 9, 2021 · 0 comments
Open

Epic: Verification Durability #1582

robin-aws opened this issue Nov 9, 2021 · 0 comments
Labels
part: verifier Translation from Dafny to Boogie (translator) priority: not yet Will reconsider working on this when we're looking for work

Comments

@robin-aws
Copy link
Member

robin-aws commented Nov 9, 2021

An important benefit of programming in Dafny is that verification is automatically baked into the development process. This means that it isn't just enough that a program verifies once: it needs to continue to verify with every change as the program evolves over time.

The nature of the Dafny verifier, however, means that code that previously verified successfully can easily fail to verify when small factors change. This includes changes to seemingly unrelated code elsewhere in a project, but also changes to the verifier itself as Dafny evolves.

The Dafny core team is tackling this issue from at least two different angles: providing ways to measure this lack of durability, and improving the verification process so that its behavior is more predictable in the face of changes. The /verificationLogger:trx option added in 3.3 is the first iteration on the first angle, and a short wiki with more details on how to use it effectively is in the works.

Child issues/PRs:

@robin-aws robin-aws added the part: verifier Translation from Dafny to Boogie (translator) label Nov 12, 2021
robin-aws added a commit to dafny-lang/libraries that referenced this issue Mar 11, 2022
This change adds a best practice we recommend for all Dafny projects: measuring the cost of each individual verification task and setting an upper bound in CI, to guard against future verification instability (see dafny-lang/dafny#1582).

This is done with two steps:

1. Add the /verificationLogger:csv parameter when invoking dafny, which outputs a CSV file with verification results.
2. Invoke the dafny-reportgenerator tool with a configured maximum cost, which will fail the build if any task's cost crosses that threshold.

There are more details on the latter tool here: https://github.com/dafny-lang/dafny-reportgenerator

The good news is that (at least after #36), this codebase is in good shape! :) All tasks take less than 5 seconds across a few runs, so I've set 10 seconds as the upper bound for now. I would prefer to bound the resource count instead since that is a more predictable metric, but Dafny doesn't record the resource count when splitting happens until the upcoming 3.5 release.

Note that because the /verificationLogger options cause extra output, I've also changed the lit configuration to no longer assert the exact output of dafny when verifying everything. This will make the build more stable by not depending on the exact console output, as all of the code here is always expected to verify successfully.
@robin-aws robin-aws changed the title Epic: Verification Stability Epic: Verification Durability Dec 7, 2022
@MikaelMayer MikaelMayer added the priority: not yet Will reconsider working on this when we're looking for work label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part: verifier Translation from Dafny to Boogie (translator) priority: not yet Will reconsider working on this when we're looking for work
Projects
None yet
Development

No branches or pull requests

2 participants