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

Draft: more fix for seminaive #146

Closed
wants to merge 7 commits into from

Conversation

clyben
Copy link
Contributor

@clyben clyben commented May 19, 2023

This PR fixes some remaining issues of #93 (which was described in #142) that the right-hand side of the set is not a function but bound to a function in the previous let binding. eg: (rule ((= f0 (f 0))) ((let a (f 3)) (set (f 0) a)))
The previous fix didn't add semi-naive rule to match the variable bonded function call, and this fix conservatively moves all let binding to the body to ensure all functions are matched.
This PR also removes Action::SetNoTrack, which should be unnecessary, and turn off the semi-naive transformation in final_desugar pass to avoid auto-generated let binding being moved again.
A possible optimization is to do liveness analysis instead of moving all let binding to the body, but might be complex.
However, this fix is blocked by #143, as a test cannot pass without #143 being fixed.

@clyben clyben marked this pull request as draft May 24, 2023 20:57
@clyben clyben mentioned this pull request Jul 12, 2023
@mwillsey
Copy link
Member

Subsumed by #197

@mwillsey mwillsey closed this Aug 21, 2023
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.

2 participants