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: Make verifier understand (!new) #1935

Merged
merged 15 commits into from
Apr 13, 2022

Conversation

RustanLeino
Copy link
Collaborator

@RustanLeino RustanLeino commented Mar 25, 2022

This PR makes the verifier understand that a type marked with (!new) is considered allocated in any state.

Notes:

  • Along the way of implementing this feature / fixing this previous omission, this PR fixes a bug in the compilation of iterators to C#, JavaScript, and Go. The bug had caused malformed code for in-parameters of an iterator, in the case when the type of such an in-parameter was not an auto-init type.
  • One new test case is commented out, because it currently does not go through due to a bug in Boogie: Prune prunes too much boogie-org/boogie#559. Once that bug is fixed, the line should be uncommented. I have tested that the behavior is correct without Boogie's /prune flag (which Dafny sets to be on). Apparently, the problem lay with the present PR, which didn't set up the Boogie uses dependencies appropriate. That has now been fixed in the present PR.

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

RustanLeino added a commit to RustanLeino/dafny that referenced this pull request Mar 26, 2022
Note that some tests are commented out, awaiting dafny-lang#1935 to be merged.
cpitclaudel
cpitclaudel previously approved these changes Apr 11, 2022
@RustanLeino RustanLeino enabled auto-merge (squash) April 11, 2022 19:26
@RustanLeino RustanLeino merged commit 81cf582 into dafny-lang:master Apr 13, 2022
@RustanLeino RustanLeino deleted the ty-where branch April 13, 2022 16:26
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.

None yet

2 participants