-
Notifications
You must be signed in to change notification settings - Fork 63
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
Conversation
…sions, not just field, array, and block permissions
…bitrary lowned permissions...
… of SImpl_ElimLOWnedSimple
…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
…sions in solveForPermListImpl
…that occur as fieldsh(eq(y)) in shapes of block permissions that are needed
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.
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.)
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! |
This PR changes the
lowned (ps_in -o ps_out)
lifetime ownership permissions to allow arbitrary permissions inps_in
andps_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 likefn get_element <'a> (x: &'a Collection) -> Option<&'a Elem>
that return an
Option
al reference. This return type translates to the Heapster typeeq(0) or [l]memblock(...)
, which must be in the input permission set of thelowned
permission returned by the function.