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

Injective mapping from Cryptol types into saw-core #1613

Open
brianhuffman opened this issue Mar 16, 2022 · 2 comments
Open

Injective mapping from Cryptol types into saw-core #1613

brianhuffman opened this issue Mar 16, 2022 · 2 comments
Labels
subsystem: cryptol-saw-core Issues related to Cryptol -> saw-core translation with cryptol-saw-core tech debt Issues that document or involve technical debt type: enhancement Issues describing an improvement to an existing feature or capability usability An issue that impedes efficient understanding and use
Milestone

Comments

@brianhuffman
Copy link
Contributor

Currently the Cryptol to saw-core translation conflates some types: Tuple types are represented as nested right-associative pairs, so e.g. (a, b, c) and (a, (b, c)) are both translated as the same type a * b * c. Also, Cryptol record types are simply converted to tuple types of the same size, so record field names are completely lost.

This causes some problems: For example, translated records are hard to make sense of because of the missing field names (#878). Also, it's currently not possible to reliably recover a cryptol type given a saw-core term (#718).

We need a new encoding of tuple and record types into saw-core that is injective, so that we don't lose information translating from Cryptol to saw-core. Also, to improve the user experience with saw-core, we should make tuples and records look, feel, and behave the same way they do in Cryptol (as much as possible).

@brianhuffman
Copy link
Contributor Author

PR #1612 is a step in this direction.

@sauclovian-g
Copy link
Collaborator

See #659 and #2119.

@sauclovian-g sauclovian-g added type: enhancement Issues describing an improvement to an existing feature or capability usability An issue that impedes efficient understanding and use tech debt Issues that document or involve technical debt subsystem: cryptol-saw-core Issues related to Cryptol -> saw-core translation with cryptol-saw-core labels Nov 2, 2024
@sauclovian-g sauclovian-g added this to the 2025T1 milestone Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subsystem: cryptol-saw-core Issues related to Cryptol -> saw-core translation with cryptol-saw-core tech debt Issues that document or involve technical debt type: enhancement Issues describing an improvement to an existing feature or capability usability An issue that impedes efficient understanding and use
Projects
None yet
Development

No branches or pull requests

2 participants