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

Fix CoinductiveProofs.dfy granularity #6065

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ method DefiniteAssignment()
}
}
target := z;

var q: int;
opaque
ensures q == 3
{
}
}

method EnsuresDoesNotHold() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ opaqueBlock.dfy(93,2): Error: opaque block might violate context's modifies clau
opaqueBlock.dfy(106,4): Error: opaque block might violate context's modifies clause
opaqueBlock.dfy(127,12): Error: variable 'y', which is subject to definite-assignment rules, might be uninitialized here
opaqueBlock.dfy(130,17): Error: variable 'z', which is subject to definite-assignment rules, might be uninitialized here
opaqueBlock.dfy(142,12): Error: ensures might not hold
opaqueBlock.dfy(206,6): Error: assignment might update an object not in the enclosing context's modifies clause
opaqueBlock.dfy(218,2): Error: assertion might not hold
opaqueBlock.dfy(140,12): Error: variable 'q', which is subject to definite-assignment rules, might be uninitialized here
opaqueBlock.dfy(140,14): Error: ensures might not hold
opaqueBlock.dfy(148,12): Error: ensures might not hold
opaqueBlock.dfy(212,6): Error: assignment might update an object not in the enclosing context's modifies clause
opaqueBlock.dfy(224,2): Error: assertion might not hold

Dafny program verifier finished with 3 verified, 14 errors
Dafny program verifier finished with 3 verified, 16 errors
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// UNSUPPORTED: macosx
// Unsupported because the resource count is slightly different on macosx
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" -- --allow-deprecation --performance-stats=1
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" -- --allow-deprecation --performance-stats=100
codatatype Stream<T> = Cons(head: T, tail: Stream)

ghost function Upward(n: int): Stream<int>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ CoinductiveProofs.dfy(208,21): Related location: this is the postcondition that
CoinductiveProofs.dfy(4,23): Related location: this proposition could not be proved

Dafny program verifier finished with 23 verified, 12 errors
Total resources used is 748143
Max resources used by VC is 59297
Total resources used is 748100
Max resources used by VC is 59300
Loading