Skip to content

Rewrite reducer in Haskell (WASM) #2

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

Open
marvinborner opened this issue Feb 5, 2025 · 0 comments · May be fixed by #4
Open

Rewrite reducer in Haskell (WASM) #2

marvinborner opened this issue Feb 5, 2025 · 0 comments · May be fixed by #4

Comments

@marvinborner
Copy link
Owner

marvinborner commented Feb 5, 2025

The current reducer is hacky and not sound. In order to be fast, we make certain assumptions of the term's structure and its reduction behavior (e.g. every substitution is shared, even if they're supposed to be structuredCloned; we cache very liberally and don't rehash the parents after substitutions).

(NOTE: there are certain lines of thought that repeatedly lead me to believe that the current implementation is (or could be, with slight modifications) in fact sound... It's quite complex! 🦆)

A Haskell backend could do the sharing automagically in a higher order fashion. Lambda screen would also be a perfect target for optimal reduction because of the huge amount of sharing in typical terms/renderings.

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 a pull request may close this issue.

1 participant