Egglog

Latest version: v10.0.0

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

4.0.0

- Fix `as_egglog_string` proprety.
- Move `EGraph.eval_fn` to `py_eval_fn` since it doesn't need the `EGraph` anymore.

3.1.0

- Update graphs to include more compact Python names of functions (79)[https://github.com/metadsl/egglog-python/pull/79].
- Add `as_egglog_string` property to get egglog source from e-graph (82)[https://github.com/metadsl/egglog-python/pull/82].
- Add `include_cost` flag to `egraph.extract` to return the integer cost as well as an expression (86)[https://github.com/metadsl/egglog-python/pull/86].
- Automatically try converting arguments to `eq`, `rewrite`, `set_`, and `union` to the correct type (84)[https://github.com/metadsl/egglog-python/pull/84].
- Update RTD name to new project name of `egglog-python` from `egg-smol-python` (18)[https://github.com/egraphs-good/egglog-python/pull/18].
- Move project to egraphs-good org!

3.0.0

Add support for outputing the serialization e-graph from the low level bindings. Note that this is not yet exposed a the high level yet.

This removes the existing to graphviz function on the EGraph low level binding and moves it to a method on the serialized EGraph.

See (78)[https://github.com/egraphs-good/egglog-python/pull/78] for more details.

2.0.0

Simplify accessing primitives

Previously, there was no public way of turning an egglog primitive, i.e. `i64(10)`, into a Python primitive, i.e. `int(10)`. Now there is a `egraph.eval(...)` method which will evaluate a primitive expression and return a Python object.

We also change the `PyObject` primitive to behave similarly. Instead of calling `egraph.load_object(pyobj)` you can now call `egraph.eval(pyobj)` to get the underlying Python object. Also, to unify it with the other objects, you can create a `PyObject` by using the constructor instead of `egraph.save_object(pyobj)`.

Bug fixes

- Properly expose `birewrite` at top level (72)[https://github.com/egraphs-good/egglog-python/pull/72].
- Fix generation of graphviz interactive SVGs in docs.

Enhancements

- Added PyData lighting talk and Portland state talk to [explanations](./explanation).
- Add experimental `jit` decorator to wrap all ndarray/numba functionality together.
- Switch to Ruff for linting

1.0.1

- Adds youtube video to [presentation slides](./explanation/2023_07_presentation).

1.0.0

Breaking Changes

- Test on Python 3.9 - 3.11, stop testing on 3.8 to follow Scientific Python versioning policy
- Bump [egglog dep](https://github.com/egraphs-good/egglog/compare/45d05e727cceaab13413b4e51a60ee3be9fbf403...ceed816e9369570ffed9feeba157b19471dda70d)
- Adds `Bool` builtin
- Rename `PrintTable` command to `PrintFunction`
- Change extract command back to taking an expression instead of a fact
- Adds `numer` and `denom` functions to `Rational` sort.
- Adds `terms_encoding` boolean flag for creating an EGraph
- Allow print size command to be called with no args to print all sizes
- Add `rebuild` method for sets, maps, and vecs.

New Features

- Add ability to print egglog string of module with `.as_egglog_string`
- Add ability to visualize changes in egraph as it runs with `.saturate()`
- Add ability to make functions and module unextractable as well as increase the cost of a whole module.
- Convert reflected methods based on both types
- Allow specifying custom costs for conversions
- In `py_exec` make a temporary file with source for tracebacks
- Add an experimental Array API implementation with a scikit-learn test

Page 3 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.