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

Allow impls to be opaque #1119

Open
maximebuyse opened this issue Nov 14, 2024 · 4 comments · May be fixed by #1134
Open

Allow impls to be opaque #1119

maximebuyse opened this issue Nov 14, 2024 · 4 comments · May be fixed by #1134
Assignees
Labels
needs-design We need to write a proper design for this issue.

Comments

@maximebuyse
Copy link
Contributor

This is needed for #1070 (comment), we already have opaque types of which this will be an extension.

@maximebuyse maximebuyse changed the title Allow impls and functions to be opaque Allow impls to be opaque Nov 14, 2024
@maximebuyse
Copy link
Contributor Author

We need this for both functions and impls. When we see this opaque attribute we should add the val in the fsti, and and assume new name: type in the fst.

@maximebuyse maximebuyse self-assigned this Nov 14, 2024
@maximebuyse
Copy link
Contributor Author

We should make sure that we "kill" the body of opaque stuff early to avoid errors in the engine phases about them.

@karthikbhargavan
Copy link
Contributor

Let's use this as a first step towards making opaque anything we do not want to handle, including raw mutable pointers, static globals etc. That needs a design document.

@W95Psp W95Psp added the needs-design We need to write a proper design for this issue. label Nov 25, 2024
@karthikbhargavan
Copy link
Contributor

This needs to be refined for use in libcrux.
When the impl has hax_lib::attributes, we sometimes rely on the specific post-condition within the impl. In these cases, don't want the whole impl to be opaque, instead we only want its fields to be opaque in the interface. In the worst case, if the fields cannot be made opaque, it would be better to leave the implementation in the interface.

This needs to be integrated within the opaque design, perhaps giving the user control over what appears where, with good defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-design We need to write a proper design for this issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants