Skip to content

Conversation

@pavpanchekha
Copy link
Contributor

@pavpanchekha pavpanchekha commented Jun 18, 2025

This PR adds a new kind of operator within the egraph: (safe-F x y ... default). The real semantics is that it returns (F x y ...), unless that would crash, in which case it instead returns default. This should be more permissive for rewriting that the current unsound-F approach and should ultimately allow us to solve, say, the quadratic examples again.

https://chatgpt.com/codex/tasks/task_e_68521fa019ec833185e3129d9eeb730e

@pavpanchekha
Copy link
Contributor Author

Quite odd that this is worse, I had high hopes for this. I looked into some diffs and honestly I have no idea what's going on, besides the basic idea that this PR creates more rewritable expressions so the node limit is exhausted faster.

@pavpanchekha pavpanchekha force-pushed the codex/add-extraction-for-sound--operations branch from d6aab76 to f819c03 Compare October 29, 2025 21:33
@pavpanchekha
Copy link
Contributor Author

Alright, an update on this branch. We now achieve better results than main and also have no more unsound rules. It's worth cleaning up add-sound-with-explanations and removing all the unsound stuff since it's no longer used, and possibly also make egraphs now handle unsoundness with a crash or harsher warning rather than gracefully like now.

@pavpanchekha
Copy link
Contributor Author

Ok, I think this PR has converged. We now, I believe, are getting results equal to main (no longer better necessarily but not worse) and we also have no more unsound rules, and I've removed all the code I wanted to remove. So I think if nightlies are good this is getting merged.

@pavpanchekha pavpanchekha merged commit 4dceae1 into main Oct 29, 2025
6 checks passed
@pavpanchekha pavpanchekha deleted the codex/add-extraction-for-sound--operations branch October 29, 2025 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants