egraphs-good / eggcc

MIT License
42 stars 8 forks source link

Make DAG extractor deterministic #476

Closed rtjoa closed 5 months ago

rtjoa commented 5 months ago

Previously, the DAG extractor relied on the iteration order of HashMaps.

I tested this with the following (previously, fib_recursive-optimize was nondeterministic and occasionally failed snapshot tests).

for _ in {1..100}; do
  if ! cargo test -r fib_recursive-optimize; then
    exit 1
  fi
done