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

Isolate paths #5832

Merged
merged 58 commits into from
Oct 25, 2024
Merged

Isolate paths #5832

merged 58 commits into from
Oct 25, 2024

Conversation

keyboardDrummer
Copy link
Member

@keyboardDrummer keyboardDrummer commented Oct 15, 2024

Changes

  • Allows using {:isolate "paths"} on assert, return and continue statements.

Out of scope

  • {:isolate "paths"} for implicit assertions
  • Custom syntax for {:isolate}, possibly in combination with "by clauses"

Testing

  • Added the CLI test isolatePaths.dfy

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

Source/Dafny.sln Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Revert before approval

.gitmodules Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Revert before approval

docs/DafnyRef/UserGuide.md Outdated Show resolved Hide resolved
docs/DafnyRef/UserGuide.md Outdated Show resolved Hide resolved
docs/DafnyRef/UserGuide.md Outdated Show resolved Hide resolved
CHECK: Verified part #7, 8/10 of f, on line 5, verified successfully \(time: .*, resource count: .*\)
CHECK: Verified part #8, 9/10 of f, on line 5, verified successfully \(time: .*, resource count: .*\)
CHECK: Verified part #9, 10/10 of f, on line 5, verified successfully \(time: .*, resource count: .*\)
CHECK: Verified 1/10 of f: assertion at line 5, verified successfully \(time: .*, resource count: .*\)
Copy link
Member

Choose a reason for hiding this comment

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

This reformatting is definitely an improvement. In the future it would be nice to be more specific about what part of the assertion is verified in this batch though.

@@ -0,0 +1,70 @@
// RUN: ! %verify --progress VerificationJobs --cores=1 %s &> %t
// RUN: %OutputCheck --file-to-check "%t" "%s"
// CHECK:Verified 1/2 of Assertion: assertion at line 19, could not prove all assertions
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// CHECK:Verified 1/2 of Assertion: assertion at line 19, could not prove all assertions
// CHECK:Verified 1/2 of Assertion: assertion at line 19 - could not prove all assertions

Or something like that. The comma feels like too weak a separator.

@@ -0,0 +1,49 @@
// RUN: ! %verify --progress VerificationJobs --cores=1 %s &> %t
// RUN: %OutputCheck --file-to-check "%t" "%s"
// CHECK:Verified 1/4 of Assertion: assertion at line 28, through \[15,23\], could not prove all assertions
Copy link
Member

Choose a reason for hiding this comment

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

See boogie-org/boogie#970 (comment), I think we should label the numbers as line numbers in a path more clearly somehow.

Source/DafnyCore/AST/Tokens.cs Outdated Show resolved Hide resolved
Source/DafnyCore/Generic/Lists.cs Outdated Show resolved Hide resolved
@keyboardDrummer keyboardDrummer enabled auto-merge (squash) October 24, 2024 18:28
Copy link
Member

@robin-aws robin-aws left a comment

Choose a reason for hiding this comment

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

Love the improvements to the assertion batch labelling

@keyboardDrummer keyboardDrummer merged commit 84dbe69 into dafny-lang:master Oct 25, 2024
22 checks passed
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.

2 participants