TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Egg: E-Graphs Good

172 点作者 alex_hirner大约 4 年前

5 条评论

mannykannot大约 4 年前
If, like me, you have never heard of e-graphs, this takes you straight to an introduction:<p><a href="https:&#x2F;&#x2F;docs.rs&#x2F;egg&#x2F;0.6.0&#x2F;egg&#x2F;tutorials&#x2F;_01_background&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;docs.rs&#x2F;egg&#x2F;0.6.0&#x2F;egg&#x2F;tutorials&#x2F;_01_background&#x2F;index...</a>
评论 #26587932 未加载
philzook大约 4 年前
Glad to see this getting play on here. Egg presents a very compelling algorithm and library for equational reasoning over syntax trees that I&#x27;ve been pretty fascinated with over the past couple months.<p>These e-graph data structures are in the heart of SMT solvers but giving easier access to end users and specializing the algorithm to the different needs of optimizing rewrites really changes the game.<p>There&#x27;s some cool applications linked on the site that I recommend people check out. A kind of neat thing about it being in rust is that you can compile to WASM to throw stuff on the web. I had a little demo of using egg to rewrite some category theory on my blog here <a href="https:&#x2F;&#x2F;www.philipzucker.com&#x2F;rust-category&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.philipzucker.com&#x2F;rust-category&#x2F;</a>
tinco大约 4 年前
So theory is not my strongest suit, maybe someone can clarify some things for me here. It seems like these equalities that we&#x27;re looking for are things like the identity laws, but also extended by mathematical operations like bitshift being faster than division by 2.<p>Do these equalities carry all the way into general programming, to the point where we could for example say a short loop is equivalent to an unrolled loop, and thus suggest that optimization? Would we have to come up with an exhaustive list of equivalences, or is the list actually short and well known like they are in logic (Identity Laws)?<p>Will we at some point basically plug Egg into LLVM and have it find new optimization passes?
评论 #26591041 未加载
nbcomplete大约 4 年前
I love this paper. Beyond including an interesting contribution, they give a fantastic introduction to the underlying ideas and algorithm that forms the background. Even if you only have time for the first few pages, it&#x27;s a worthwhile read.
beaconstudios大约 4 年前
ooh this is serendipitous, I&#x27;m going to need to do some deep research into term rewriting soon.<p>mentally, I&#x27;m modelling term rewriting as a state space search where each edge transition is a single possible rewrite. As always with state space search, the goal is to find the global optimum.<p>It&#x27;s funny how many problems come back to search heuristics.