-
Notifications
You must be signed in to change notification settings - Fork 62
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
Heapster: existential function output perms #1549
Merged
Merged
Conversation
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
…w existential outputs in funperms
… gouts and ret together
…utput permissions!
…ms to accommodate for offsets on variables, thereby removing errors when ending lifetimes with offset variables in the lowned permissions
eddywestbrook
added
the
subsystem: heapster
Issues specifically related to memory verification using Heapster
label
Dec 23, 2021
m-yac
reviewed
Dec 23, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though I wasn't able to review the changes in RustTypes.hs
beyond just general Haskell style since I don't know what goes on in that file. I did have a couple questions so I'm not hitting "Approve" yet.
Co-authored-by: Matthew Yacavone <[email protected]>
m-yac
approved these changes
Dec 23, 2021
m-yac
added
the
PR: ready to merge
Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run
label
Dec 23, 2021
…ged on a previous commit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
PR: ready to merge
Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run
subsystem: heapster
Issues specifically related to memory verification using Heapster
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds existential ghost variables to the output of a function permission, so that now the general form of a function permission looks like this:
(x1:tp1, ..., xn:tpn). arg0:p0, ..., argm:pm, x1:p1', ..., xn:pn
-o (z1:tp1, ..., zk:tpk). arg0:p0'', ..., x1:p1''', ..., ret:p, z1:p1'''', ...
This change was needed to support Rust functions that return structs or other data structures that contain pointers with lifetimes as subterms. For example, a function that returns a slice type like
&'a str
actually returns a struct with a length and a pointer in lifetime'a
, and the pointer needs a variable, which we can now list in the output ghost variables, in order to reference it in the returned lifetime ownership permission.As an added bonus, this PR also fixes
lownedPermVarAndPerm
,lownedPermsVars
, andlownedPermsToDistPerms
to accommodate for offsets on variables, thereby removing errors when ending lifetimes with offset variables in thelowned
permissions.