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

Add support for intra-table provenance and permissions transfer #86

Open
gavinleroy opened this issue May 21, 2023 · 0 comments
Open

Add support for intra-table provenance and permissions transfer #86

gavinleroy opened this issue May 21, 2023 · 0 comments

Comments

@gavinleroy
Copy link
Collaborator

gavinleroy commented May 21, 2023

Aquascope shows how permissions change to help users understand why a particular permission may be missing. Per path, these changes are described as a gain or loss in permissions. An icon is used to indicate what actions caused this change but it doesn't describe how permissions are transferred. Shown in the below example is a simple move:

Screenshot 2023-05-21 at 12 08 50

This properly conveys how permissions change for each path in isolation but it doesn't show how these two changes are related. In this small example, one could think of permissions as being transferred from s to m. This idea of transfer is common in previous explanations of borrow checking and is demonstrated quite well by RustViz.

Screenshot 2023-05-22 at 20 12 26

In the above example from RustViz the reader is given "Immutable borrow from x to y" for the statement let y = &x;. One could reimagine this as saying "R is transferred from x to *y". This clearly explains where *y gets its permissions from.

It's unclear how these dependencies should be shown. Aquascope currently works under the constraints of embedding all visual annotations in a CodeMirror 6 editor. These visual annotations also have a space constraint as they are shown integrated with the code and not next to it. Additionally, Aquascope works on any Rust program with non-trivial control flow and shouldn't be limited to error-free programs (if this isn't currently true it's getting there 😄).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants