Commits
Click on a commit to change the comparison rangeDon't panic when extracting non existent term
This PR changes the behavior of extract when it is a primitive sort
and it does not exist, so that it does not panic but raises an error instead.
This was the previous behavior on the old backend and it was relied on by the Python bindings.
They used this fact to try extracting a term, and only if it doesn't exist, then run some rules
to create it (https://github.com/egraphs-good/egglog-python/blob/b8be0848e22137396f31f86a73c447f4997f68fe/python/egglog/exp/array_api.py#L1973-L1985).
The alterantive of using `check` and then extracting is slower especially when the terms are large.
Currently, it will panic and catching a panic in Rust and then continuing is not ideal. This PR
handles a cleanup as well even if the rule doesn't succeed.3 days ago
by saulshanabrook nits3 days ago
by saulshanabrook