...
首页> 外文期刊>Electronic Notes in Theoretical Computer Science >Attribute Grammars as Recursion Schemes over Cyclic Representations of Zippers
【24h】

Attribute Grammars as Recursion Schemes over Cyclic Representations of Zippers

机译:将文法属性作为拉链循环表示的递归方案

获取原文

摘要

Evaluation of attributes w.r.t. an attribute grammar can be obtained by inductively computing a function expressing the dependencies of the synthesized attributes on inherited attributes. This higher-order functional approach to attribute grammars leads to a straightforward implementation using a higher-order lazy functional language like Haskell. The resulting evaluation functions are, however, not easily amenable to optimization rules. We present an alternative first-order functional interpretation of attribute grammars where the input tree is replaced with an extended cyclic tree each node of which is aware of its context viewed as an additional child tree. By the way, we demonstrate that these cyclic representations of zippers (trees with their context) are natural generalizations of doubly-linked lists to trees over an arbitrary signature.
机译:对属性的评估可以通过归纳计算表示合成属性对继承属性的依赖性的函数来获得属性语法。这种用于属性语法的高阶功能方法导致使用像Haskell这样的高阶惰性函数语言的直接实现。但是,由此产生的评估功能不容易遵循优化规则。我们提出了属性语法的另一种一阶功能解释,其中输入树被替换为扩展的循环树,每个循环树的节点都将其上下文视为另外的子树。顺便说一下,我们证明了这些拉链(带有上下文的树)的循环表示形式是在任意签名上双链表对树的自然概括。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号