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

Use Anoma compatible Nockma serialization of Bools and List-like data structures #2591

Merged
merged 6 commits into from
Jan 24, 2024

Conversation

paulcadman
Copy link
Collaborator

@paulcadman paulcadman commented Jan 23, 2024

This PR changes the Nockma representation of builtin Bool and list-like types to make them compatible with Anoma.

True and False are now compiled to the Nockma atoms 0 and 1 respectively.

For inductive types that have exactly two constructors, one of arity zero and one of arity two, we compile the arity zero constructor to Nockma zero, and the arity two constructor to a Nockma cell. In particular a Juvix stdlib List will be compiled to an Anoma/Nockma list. This is necessary for compatibility with the layout of resource and resource logic types in Anoma.

In tests we avoid using the StackRef memory reference because it will be removed as part of the JuvixTree work.

@paulcadman paulcadman added this to the 0.6.0 milestone Jan 23, 2024
@paulcadman paulcadman marked this pull request as draft January 23, 2024 17:35
@paulcadman paulcadman marked this pull request as ready for review January 24, 2024 09:22
@paulcadman paulcadman requested a review from lukaszcz January 24, 2024 09:22
@paulcadman paulcadman merged commit 06d4596 into main Jan 24, 2024
4 checks passed
@paulcadman paulcadman deleted the nockma-builtin-rep branch January 24, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants