Rewrite systems [6, 10, 12] have been widely employing equality saturation [9], which is an optimisation methodology that uses a saturated e-graph to represent all possible sequences of rewrite simultaneously, and then extracts the optimal one. As such, optimal results can be achieved by avoiding the phase-ordering problem. However, we observe that when the e-graph is not saturated, it cannot represent all possible rewrite opportunities and therefore the phase-ordering problem is re-introduced during the construction phase of the e-graph. To address this problem, we propose MCTS-GEB, a domain-general rewrite system that applies reinforcement learning (RL) to e-graph construction. At its core, MCTS-GEB uses a Monte Carlo Tree Search (MCTS) [3] to efficiently plan for the optimal e-graph construction, and therefore it can effectively eliminate the phase-ordering problem at the construction phase and achieve better performance within a reasonable time. Evaluation in two different domains shows MCTS-GEB can outperform the state-of-the-art rewrite systems by up to 49x, while the optimisation can generally take less than an hour, indicating MCTS-GEB is a promising building block for the future generation of rewrite systems.
翻译:重写系统[6、10、12] 广泛采用平等饱和[9],这是一种优化方法,使用饱和电子图同时代表所有可能的重写序列,然后提取最佳顺序。因此,通过避免阶段顺序问题可以取得最佳结果。然而,我们注意到,当电子图不饱和时,它不能代表所有可能的重写机会,因此,在电子图的建设阶段,阶段顺序问题正在重新引入。为了解决这一问题,我们提议采用饱和电子图,即将强化学习(RL)应用到电子图表的构建的域际通用重写系统MCTS-GEB。在核心方面,MCTS-GEB使用蒙特卡洛树搜索(MCTS)[3]来有效规划最佳电子图表建设,因此,它能够有效地消除施工阶段重写问题,并在合理时间内实现更好的绩效。对两个不同领域的评价表明,MCTS-GEB可以超越州-GEB的州际结构,即将强化学习(RL)应用电子图表的系统。MTS-GEM-S-S-S-serviewsting Systing System 将一个比未来的系统更小于未来的系统。</s>