-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Missing substitution in the subset check of the function overrid…
- Loading branch information
1 parent
4e43cef
commit 0c31206
Showing
4 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// RUN: %baredafny verify %args %s > %t | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
trait ADT { | ||
ghost function ReprFamily(n: nat): set<object> | ||
decreases n | ||
ensures n > 0 ==> ReprFamily(n) >= ReprFamily(n-1) | ||
reads this, if n == 0 then {} else ReprFamily(n-1) | ||
} | ||
|
||
class P extends ADT { | ||
ghost function ReprFamily(n: nat): set<object> | ||
decreases n | ||
ensures n > 0 ==> ReprFamily(n) >= ReprFamily(n-1) | ||
reads this, if n == 0 then {} else ReprFamily(n-1) | ||
{ {} } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
Dafny program verifier finished with 3 verified, 0 errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Regression in the subset check of the function override check |