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

Generalized Heapster lifetime ownership permissions #1645

Merged
merged 28 commits into from
Apr 27, 2022

Conversation

eddywestbrook
Copy link
Contributor

This PR changes the lowned (ps_in -o ps_out) lifetime ownership permissions to allow arbitrary permissions in ps_in and ps_out. Previously, only field, array, or block permissions were allowed in these positions. This change is necessary in order to support Rust functions with return types that contain lifetimes inside of complex shapes. For instance, many Rust collection types have methods with types like

fn get_element <'a> (x: &'a Collection) -> Option<&'a Elem>

that return an Optional reference. This return type translates to the Heapster type eq(0) or [l]memblock(...), which must be in the input permission set of the lowned permission returned by the function.

Eddy Westbrook added 27 commits April 15, 2022 14:07
…sions, not just field, array, and block permissions
…an error, since these can now come about from lifetimes ending
…ifetime that has an lowned perm that needs to be proved
… come from converting ExprPerms to DistPerms
…that occur as fieldsh(eq(y)) in shapes of block permissions that are needed
Copy link
Member

@ChrisEPhifer ChrisEPhifer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as my limited understanding of the implication prover extends, everything here looks good. It might be good to have a second set of eyes look over the Permissions and Implication modules just to be sure there's no logic errors, but I've approved the changes anyway (I won't add the ready-to-merge label, however, in case you decide to have MattY or someone else take a look.)

@eddywestbrook
Copy link
Contributor Author

Luckily, we have CI tests to check the logic! :) Also, I think Matt Y has about the same level of understanding as you. So, in the end, I think this is ready. Thanks!

@eddywestbrook eddywestbrook merged commit 7feac14 into master Apr 27, 2022
@mergify mergify bot deleted the heapster/perms-in-lowneds branch April 27, 2022 16:49
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.

2 participants