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

Desirables for code generator #2

Open
kozross opened this issue Dec 17, 2024 · 0 comments
Open

Desirables for code generator #2

kozross opened this issue Dec 17, 2024 · 0 comments
Assignees
Labels
milestone-3 c2uplc code generator question Further information is requested

Comments

@kozross
Copy link
Member

kozross commented Dec 17, 2024

To make c2uplc as good as it can be, we (meaning @gnumonik) want to determine precisely what will be good to have as part of Covenant. Things we can already expect to be present:

  1. Requests to call a builtin
  2. Data types and their encodings (or a statement that we don't care how it's encoded)
  3. Call-by-push-value type system
  4. Turner totality
  5. Specific catamorphisms for tearing down known structures (lists and Data at least) given a coalgebra
  6. Accessors (or specialized catamorphisms) for tearing down ledger API types
  7. Serial and parallel let bindings as distinct forms

Outstanding questions:

  1. Anamorphisms (or indeed, any sort of non-static data generation) is hard in a Turner-total setting. Some questions need to be answered there.
  2. Are there specific kinds of information we'd want to convey that would make code generation easier and more efficient? This can include both restrictions and permissions: for example, 'I don't care how this data type is represented as long as the interface is such').
  3. Should we also provide ways to build up ledger API types? For some this could possibly make sense (for example, Value or POSIXTime), but not in general (I can't think why any script would want to build ScriptContexts).
  4. How we should support case expressions in a way that'd aid compilation.

@gnumonik - for visibility, please put suggestions or discussions into this issue, which we will pin for posterity, even once decisions are made.

@kozross kozross added question Further information is requested milestone-3 c2uplc code generator labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
milestone-3 c2uplc code generator question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants