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

Start on a mechanism to build Cryptol values from outside Cryptol #1739

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

yav
Copy link
Member

@yav yav commented Aug 27, 2024

The plan here is to add a mechanism that allows the Cryptol interpreter to cooperate with an external function to build Cryptol values, which would help support more forms of FFI.

Our current FFI to C assumes a fixed data layout for values, and it is the job of Cryptol to parse the values back into Cryptol values, when results a returned by a foreign function.

The new approach exposes a "Cryptol value builder" object to the foreign function, so that the foreign function can build the Cryptol values itself. The benefit of this is that we only need to impose representation constraints on primitve types (e.g., bool, integer, word), while the representation of compound values types (e.g., vectors, tuples, sums) is unrestricted.

@yav yav temporarily deployed to github-pages August 27, 2024 01:00 — with GitHub Actions Inactive
We still need to do Rational, float, and double.
@yav yav temporarily deployed to github-pages August 28, 2024 19:15 — with GitHub Actions Inactive
Also implement making words out of integers
@yav yav temporarily deployed to github-pages August 28, 2024 22:43 — with GitHub Actions Inactive
@yav yav temporarily deployed to github-pages August 31, 2024 00:37 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant