egraphs-good / extraction-gym

benchmarking e-graph extraction
MIT License
24 stars 15 forks source link

global-greedy-dag sometimes extracts nodes from the wrong class #28

Open TrevorHansen opened 6 months ago

TrevorHansen commented 6 months ago

With the extra checking in #26, global-greedy-dag now fails because it selects nodes from the wrong class:

target/release/extraction-gym data/eggcc-bril/duplicate_branch.bril.json --extractor=global-greedy-dag --out=output/eggcc-bril/duplicate_branch.bril.json-global-greedy-dag.json
iteration 1
iteration 2
iteration 3
iteration 4
iteration 5
iteration 6
thread 'main' panicked at 'assertion failed: node.eclass == *cid', src/extract/mod.rs:84:13

Previously this wasn't detected. I realised when global-greedy-dag has some extractions with a lower dag-cost than the optimal.