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

Speed up dafny verify by reducing memory pressure #5827

Conversation

keyboardDrummer
Copy link
Member

@keyboardDrummer keyboardDrummer commented Oct 11, 2024

Description

  • Remove memory leaks in dafny verify

How has this been tested?

  • Ran a profiler that does dafny verify, and confirmed that Boogie programs are no longer kept in memory after they've been verified

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@keyboardDrummer keyboardDrummer enabled auto-merge (squash) October 12, 2024 14:30
@keyboardDrummer keyboardDrummer requested review from alex-chew and removed request for robin-aws October 16, 2024 08:57
…boardDrummer/dafny into onlyClaimVerificationMemoryPerModule
alex-chew
alex-chew previously approved these changes Oct 16, 2024
new("--progress", "While verifying, output information that helps track progress") {
IsHidden = true
};
public enum ProgressLevel { None, Symbol, SymbolParts }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the help text document the difference between the levels?

@@ -40,5 +31,14 @@ Iterators.dfy(461,21): Error: this invariant could not be proved to be maintaine
Related message: loop invariant violation
Iterators.dfy(470,4): Error: possible violation of yield-ensures condition
Iterators.dfy(451,21): Related location: this proposition could not be proved
Iterators.dfy(251,9): Error: decreases clause might not decrease
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did the ordering change? Seems like a regression since we've been better about keeping these in order lately.

Copy link
Member Author

@keyboardDrummer keyboardDrummer Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unavoidable, since we want to verify one module at a time to be able to release memory after verifying that module. When nested modules occur, the contents of different modules can be intertwined.

method A

module Nested {
  method B
}

method C

We can do A,C,B or B,A,C, but we can no longer do A,B,C if we verify entire modules at a time.

@keyboardDrummer keyboardDrummer merged commit 7538a93 into dafny-lang:master Oct 21, 2024
22 checks passed
@keyboardDrummer keyboardDrummer deleted the onlyClaimVerificationMemoryPerModule branch October 21, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants