egraphs-good / egraph-serialize

egraph <-> json
MIT License
8 stars 3 forks source link

Fix isolated nodes #5

Closed saulshanabrook closed 10 months ago

saulshanabrook commented 11 months ago

This PR fixes the inlining leaf algorithm for graphs that have nodes that have no children and no parents.

It adds an example file from egglog that includes an example of this, resulting from a trimmed serialization which omitted some children.

It also changes the tests to only re-create the graphviz files if they are missing. This reduces test time locally, and doesn't change the behavior on CI.

To re-render the graph files, simply delete them and re-run the tests.