-
Notifications
You must be signed in to change notification settings - Fork 261
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
Initializing assignments make iset/imap auto-ghost #5033
Labels
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
part: resolver
Resolution and typechecking
Comments
RustanLeino
added
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
part: resolver
Resolution and typechecking
labels
Feb 1, 2024
RustanLeino
added a commit
to RustanLeino/dafny
that referenced
this issue
Feb 1, 2024
keyboardDrummer
pushed a commit
that referenced
this issue
Feb 2, 2024
Fixes #5033 Fixes #5034 Fixes #5035 This PR allows more expressions as compiled (from issues #5033 and #5034) and also adds some missing restrictions on uses of ghosts (#5035), all having to do with set/iset/map/imap comprehensions. ### How has this been tested? The tests from these Issues have been added to `DiscoverBounds.dfy` and `DiscoverBoundsErrors.dfy`. <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
part: resolver
Resolution and typechecking
Dafny version
4.4.0
Code to produce this issue
Command to run and resulting output
What happened?
The program should be compilable. However, the RHSs of the initializing assignments to
u
andw
(which useiset
/imap
comprehensions where the "bounded pool" is coming from a collection, namely a set) are making those variables auto-ghost. This results in the errors shown above.If the RHS expressions above are used in places other than initializing assignments, then Dafny correctly determines that they are compilable. This indicates that the bug lies in
UsesSpecFeatures
and that the similar (but different) methodCheckIsCompilable
is implemented correctly.What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered: