首页> 外文会议>ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation >Generalising Tree Traversals to DAGs: Exploiting Sharing without the Pain
【24h】

Generalising Tree Traversals to DAGs: Exploiting Sharing without the Pain

机译:概述树遍历DAG:利用没有痛苦的分享

获取原文

摘要

We present a recursion scheme based on attribute grammars that can be transparently applied to trees and acyclic graphs. Our recursion scheme allows the programmer to implement a tree traversal and then apply it to compact graph representations of trees instead. The resulting graph traversals avoid recomputation of intermediate results for shared nodes - even if intermediate results are used in different contexts. Consequently, this approach leads to asymptotic speedup proportional to the compression provided by the graph representation. In general, however, this sharing of intermediate results is not sound. Therefore, we complement our implementation of the recursion scheme with a number of correspondence theorems that ensure soundness for various classes of traversals. We illustrate the practical applicability of the implementation as well as the complementing theory with a number of examples.
机译:我们提出了一种基于属性语法的递归方案,可以透明地应用于树木和无循环图。我们的递归方案允许程序员实现树遍历,然后将其应用于树木的紧凑型图形表示。结果图遍历避免了共享节点的中间结果的重新计算 - 即使中间结果用于不同的上下文。因此,该方法导致与图形表示提供的压缩成比例的渐近加速。然而,一般情况下,这种中间结果的共享没有声音。因此,我们补充了我们对递归方案的实现,其中一些通信定理,确保了各种遍历的态度。我们说明了实施的实际适用性以及许多例子的补充理论。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号