This PR provides an alternative greedy bottom up extraction implementation -- BottomUpAnalysisExtractor -- based on the egraph analysis algorithm that uses a pending queue. This is basically the algorithm that I use in my https://github.com/Bastacyclop/egg-sketches library.
Overall we can see that the more complex bottom-up-analysis is slower on the easiest datasets 'babble' and 'egg', but also faster on the harder datasets 'flexc' and 'tensat'. I expect bottom-up-analysis to perform even better on datasets with more costly to compute, child-dependent cost functions, although extraction-gym does not support such datasets yet.
The dag costs also vary slightly due to different nodes being chosen -- I assume that the tree costs are the same but could double check.
Hi All,
This PR provides an alternative greedy bottom up extraction implementation --
BottomUpAnalysisExtractor
-- based on the egraph analysis algorithm that uses a pending queue. This is basically the algorithm that I use in my https://github.com/Bastacyclop/egg-sketches library.Based on https://github.com/egraphs-good/extraction-gym/pull/7
This is the (filtered) output of
make
:Overall we can see that the more complex
bottom-up-analysis
is slower on the easiest datasets 'babble' and 'egg', but also faster on the harder datasets 'flexc' and 'tensat'. I expectbottom-up-analysis
to perform even better on datasets with more costly to compute, child-dependent cost functions, although extraction-gym does not support such datasets yet.The dag costs also vary slightly due to different nodes being chosen -- I assume that the tree costs are the same but could double check.