-
Notifications
You must be signed in to change notification settings - Fork 22
Compile higher order predicates to specialized versions on call #58
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
base: main
Are you sure you want to change the base?
Conversation
31ca8cc to
565eddd
Compare
|
@rTreutlein Can you please check https://github.com/patham9/PeTTa/pull/58/files#diff-cb5af532baee729d90cb1bf5860e10140973172aecb1e23cb8661a88c61400c1 can we allow that somehow without getting into infinite specialization recursions? It currently avoids it via stack. |
391f525 to
4b0ad99
Compare
Signed-off-by: Roman Treutlein <[email protected]>
|
Alright i think this is ready to merge now. |
patham9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to find a solution to allow function removal by tracking specializations. If a function is removed, all its specialization should vanish too. I don't think we need to re-compile functions a function is used in though, that complexity is usually not needed, also since users can still remove and add a function again if desired without introducing the unnecessary complexity. https://github.com/patham9/PeTTa/blob/main/examples/selfprog.metta
|
Well we already have |
|
Will continue working on this PR soon. |
It works but the code was generated by GPT-5 so there is likely a lot of cleanup we need to do before merging it.
All current tests pass but we should also try for a bit to breaks this / add new tests.