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

Reimplement translator #1113

Open
myreen opened this issue Dec 11, 2024 · 3 comments
Open

Reimplement translator #1113

myreen opened this issue Dec 11, 2024 · 3 comments
Assignees
Labels
dev experience Makes tasks developing cakeml itself easier high effort translator

Comments

@myreen
Copy link
Contributor

myreen commented Dec 11, 2024

That CakeML translator is the oldest part of the CakeML project and has grown organically with the project.

There are a number of features we would like added or improved:

This issue is about reimplementing the translator and gradually moving to the new implementation.

It is tempting to just delete the current translator and start from scratch, but I suspect that's likely to be too disruptive. Instead, I propose implementing new translate-like functions that at first co-exist with the current implementation until all of the current translations have migrated to the new translate functions.

Care needs to be taken in the design from that start in order to ensure support for congruence rules (#9) is built in.

@myreen myreen added dev experience Makes tasks developing cakeml itself easier high effort translator labels Dec 11, 2024
@myreen myreen self-assigned this Dec 11, 2024
@myreen
Copy link
Contributor Author

myreen commented Dec 11, 2024

My current plan for this issue does not involve reimplementing ml_progLib and how it builds CakeML environments and CakeML programs. This issue is about reimplementing ml_translatorLib.

@tanyongkiam
Copy link
Contributor

While implementing #1114 it turned out to be really nice to selectively be able to turn off how aggressive the translator is about simplifying preconditions. The reimplementation of the translator should ideally be made externally-configurable for experts.

@tanyongkiam
Copy link
Contributor

Another useful change (mentioned by @myreen): the new translator API should become explicit about when a precondition is expected to be generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev experience Makes tasks developing cakeml itself easier high effort translator
Projects
None yet
Development

No branches or pull requests

2 participants