-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve documentation and error messages for safe initialization #15659
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
Conversation
@liufengyun Here are 3 more changes to Markdown file
|
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.
Otherwise LGTM.
- `v` is `Fun(e, V, C)` and calling the function encounters no errors and the | ||
function return value is _effectively hot_. | ||
- `ThisRef` is _effectively hot_. | ||
|
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.
In the `ThisRef` case, local reasoning ensures that all fields assigned implies that all fields themselves contain effectively hot values. | |
In the `Warm` case, if the value `v` leaks outside the analysis scope, the unanalyzed code could instantiate inner classes of `v`, call methods on `v`, or read fields of `v`. The conditions of the `Warm` case ensure that these actions do not lead to accessing a cold object. | |
In the `Fun` case, ... |
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.
Maybe we can add the justification later --- they are not immediately understandable to readers and can itself be an obstacle in reading the docs.
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.
Apply suggested changes
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.
Apply suggested changes
Co-authored-by: Ondřej Lhoták <olhotak@uwaterloo.ca>
Co-authored-by: Ondřej Lhoták <olhotak@uwaterloo.ca>
Thanks @michelou , I fixed two of them. Regarding
The usage of "three" is intended here and it's not a typo. |
Improve documentation and error messages for safe initialization