Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5384dbf
Ignore .DS_Store
paulzzy Jun 15, 2024
3ed4c7f
Find enodes matching RHS (`Applier`) of a rewrite rule
paulzzy Jun 15, 2024
5d6d178
Implement simple delete for unionfind
paulzzy Jun 16, 2024
678948e
Make `unionfind` API fallible with `Option`
paulzzy Jun 18, 2024
2567dff
Remove enodes given an array of IDs and the roots
paulzzy Jun 19, 2024
7fdd659
Undo multiple rewrites at once
paulzzy Jun 20, 2024
90c59ed
Avoid traversing egraph when no enodes to remove
paulzzy Jun 20, 2024
ff4e61e
Canonicalize children of enodes to be removed
paulzzy Jun 21, 2024
b781566
Ignore doctest for `find_enode_id`
paulzzy Jun 21, 2024
5cc5729
Return instead of panic when removal enode not in eclass
paulzzy Jun 21, 2024
166c8c0
Accept `IntoIterator` rewrites when undoing
paulzzy Jun 24, 2024
d75a42e
Use `HashMap` to access `EGraph`'s enodes by `Id`
paulzzy Jun 27, 2024
d464edf
Remove enodes from both `nodes` and `memo`
paulzzy Jun 27, 2024
9a39b02
Avoid marking eclasses as visited before DFS traversal
paulzzy Jun 28, 2024
ab35690
Log undo progress and validate after removing enodes
paulzzy Jun 28, 2024
a096979
Test undoing all rewrites every iteration, remove later
paulzzy Jun 28, 2024
e1eab90
Log more of `remove_enodes`
paulzzy Jun 28, 2024
648d328
Require clean egraph before finding an enode by ID
paulzzy Jun 30, 2024
1c0616b
Avoid removing enodes that would leave dangling children
paulzzy Jul 1, 2024
f14f1ec
Preserve original enodes instead of `Searcher` patterns
paulzzy Jul 1, 2024
93e6e64
Panic when enode to remove not in eclass, instead of warning
paulzzy Jul 1, 2024
304a901
Fix skipping removal of original enodes
paulzzy Jul 1, 2024
a05863a
Extract removing unreachable enodes into function
paulzzy Jul 2, 2024
c2d688e
Remove unused `nodes` method and add TODO for `undo_rewrites`
paulzzy Jul 2, 2024
2c87e4c
Remove unreachable eclass parents when cleaning egraph
paulzzy Jul 26, 2024
6ea5716
Add `InverseScheduler`
paulzzy Jul 31, 2024
8caa460
wip
paulzzy Aug 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ perf.data*
*.bench
.vscode/settings.json
out.csv

# macOS
.DS_Store
85 changes: 85 additions & 0 deletions math_baseline.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
diff_power_simple,0.001590461
integ_one,0.000020708000000000002
integ_part1,0.001072126
integ_part3,0.000442666
integ_sin,0.000019125
integ_x,0.000025583999999999998
math_associate_adds,0.005160467
math_diff_different,0.00002425
math_diff_ln,0.000018791
math_diff_same,0.000017459
math_diff_simple1,0.000317501
math_diff_simple2,0.00026687600000000004
math_powers,0.000028751
math_simplify_add,0.000265459
math_simplify_const,0.000117041
math_simplify_factor,0.009269597000000001
math_simplify_root,0.026495581000000004
diff_power_simple,0.001554334
integ_one,0.0000215
integ_part1,0.001085791
integ_part3,0.00046200099999999997
integ_sin,0.000018624
integ_x,0.000024042
math_associate_adds,0.005166336
math_diff_different,0.000019375
math_diff_ln,0.000019208
math_diff_same,0.000017625
math_diff_simple1,0.000315541
math_diff_simple2,0.00028537500000000004
math_powers,0.000029749999999999998
math_simplify_add,0.00027008399999999997
math_simplify_const,0.00011716700000000001
math_simplify_factor,0.009123505
math_simplify_root,0.026413933000000004
diff_power_simple,0.001597454
integ_one,0.000021458
integ_part1,0.001163789
integ_part3,0.000451706
integ_sin,0.000019584
integ_x,0.000025625
math_associate_adds,0.005248073000000001
math_diff_different,0.000022709
math_diff_ln,0.000024376000000000002
math_diff_same,0.000018999000000000002
math_diff_simple1,0.000323416
math_diff_simple2,0.00027429200000000004
math_powers,0.000028583
math_simplify_add,0.000304208
math_simplify_const,0.000122458
math_simplify_factor,0.009213397
math_simplify_root,0.026768194
diff_power_simple,0.001610165
integ_one,0.000018707999999999998
integ_part1,0.001082832
integ_part3,0.000467209
integ_sin,0.000019916
integ_x,0.000025583
math_associate_adds,0.005180661
math_diff_different,0.00002175
math_diff_ln,0.000021167000000000002
math_diff_same,0.000016791999999999998
math_diff_simple1,0.000325459
math_diff_simple2,0.00027145800000000003
math_powers,0.000031459
math_simplify_add,0.000271375
math_simplify_const,0.000121082
math_simplify_factor,0.009118949
math_simplify_root,0.026393884
diff_power_simple,0.002519455
integ_one,0.000023375000000000002
integ_part1,0.0011277070000000001
integ_part3,0.00046670800000000003
integ_sin,0.000020917000000000003
integ_x,0.000043083
math_associate_adds,0.0052744079999999995
math_diff_different,0.000023209
math_diff_ln,0.000016833
math_diff_same,0.000016624999999999998
math_diff_simple1,0.000667998
math_diff_simple2,0.00028612500000000003
math_powers,0.000031791999999999996
math_simplify_add,0.000274334
math_simplify_const,0.000114417
math_simplify_factor,0.009354527
math_simplify_root,0.027854118
95 changes: 95 additions & 0 deletions math_inverse.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
diff_power_harder,0.018302689
diff_power_simple,0.000444457
integ_one,0.000022042
integ_part1,0.000722582
integ_part2,0.002940712
integ_part3,0.000278835
integ_sin,0.000015583
integ_x,0.000022583
math_associate_adds,0.005222257
math_diff_different,0.000025125
math_diff_ln,0.000016917
math_diff_same,0.000016042
math_diff_simple1,0.000292376
math_diff_simple2,0.000197
math_powers,0.000029
math_simplify_add,0.00018079199999999999
math_simplify_const,0.000077376
math_simplify_factor,0.000772084
math_simplify_root,0.001093752
diff_power_harder,0.018272403
diff_power_simple,0.00045491400000000006
integ_one,0.000018125
integ_part1,0.000731414
integ_part2,0.003110741
integ_part3,0.000285458
integ_sin,0.000018083
integ_x,0.000023958
math_associate_adds,0.005174609
math_diff_different,0.000020958
math_diff_ln,0.000015623999999999998
math_diff_same,0.000020001
math_diff_simple1,0.000267166
math_diff_simple2,0.000203709
math_powers,0.000025708
math_simplify_add,0.00016270800000000001
math_simplify_const,0.000067958
math_simplify_factor,0.0006973719999999999
math_simplify_root,0.0009685389999999999
diff_power_harder,0.018521787
diff_power_simple,0.00046241699999999996
integ_one,0.000022417
integ_part1,0.000742333
integ_part2,0.003101416
integ_part3,0.000294126
integ_sin,0.000017083999999999998
integ_x,0.000023833
math_associate_adds,0.005226875
math_diff_different,0.000021623999999999998
math_diff_ln,0.000019792
math_diff_same,0.000017
math_diff_simple1,0.000269874
math_diff_simple2,0.000193749
math_powers,0.000025625999999999998
math_simplify_add,0.000155751
math_simplify_const,0.000067251
math_simplify_factor,0.0006932509999999999
math_simplify_root,0.000994665
diff_power_harder,0.018488011999999998
diff_power_simple,0.000447208
integ_one,0.000017875
integ_part1,0.000715626
integ_part2,0.0030908290000000002
integ_part3,0.000296832
integ_sin,0.000017208000000000002
integ_x,0.000023792
math_associate_adds,0.005237906
math_diff_different,0.000021417
math_diff_ln,0.000020917
math_diff_same,0.00001825
math_diff_simple1,0.000268541
math_diff_simple2,0.00019629100000000002
math_powers,0.000025
math_simplify_add,0.00014754
math_simplify_const,0.000075416
math_simplify_factor,0.000753583
math_simplify_root,0.0011019559999999999
diff_power_harder,0.018789224000000004
diff_power_simple,0.00045216699999999996
integ_one,0.000018167
integ_part1,0.0007439170000000001
integ_part2,0.0030491669999999998
integ_part3,0.00027429
integ_sin,0.000015791000000000002
integ_x,0.000029
math_associate_adds,0.005239588
math_diff_different,0.000027541999999999998
math_diff_ln,0.000017624999999999998
math_diff_same,0.00001675
math_diff_simple1,0.000271458
math_diff_simple2,0.000198835
math_powers,0.000026999
math_simplify_add,0.00015270800000000002
math_simplify_const,0.00006533400000000001
math_simplify_factor,0.0006894179999999999
math_simplify_root,0.001014711
Loading