-
Notifications
You must be signed in to change notification settings - Fork 12
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
Annotate SMIR with lifetime information #78
Comments
Some are still currently private source, unfortunately. What I can say is that we need to know what the lifetimes of each borrow are and how they relate to the lifetime parameters of the fucntion. We also need to know how the lifetime parameters of called functions are instantiated. @dewert99 used also lifetime information when compiling his specifications to Creusot's specification language. Additionally, internally in Prusti lifetime information is also used during compilation to determine when to insert magic wands in the compiled Viper code. |
The rust compiler intentionally hides all lifetime information to avoid introducing accidental dependencies on it during compilation and to improve the effectiveness of caching throughout the compiler. Tools like Prusti, Verus or Gillian-Rust on the other hand depend on having access to precise information about the borrows and lifetimes available in a given function.
Currently, a compromise solution has been reached with the compiler giving partial visibility into some of the information calculated by borrowck, allowing tool authors to mostly achieve their goals, though often with significant work on their end.
If SMIR included lifetime information, this would be a killer feature, providing something of huge value to external users while also allowing rustc keep its borrowck implementation private.
Specifically, I would like borrows to be annotated with their regions, and for those regions to have been unified throughout the MIR body. It should also be easy to regions are universal, and to answer outlives questions between regions.
The text was updated successfully, but these errors were encountered: