首页> 外文期刊>Science of Computer Programming >Incremental evaluation of higher-order attributes
【24h】

Incremental evaluation of higher-order attributes

机译:高阶属性的增量评估

获取原文
获取原文并翻译 | 示例

摘要

Compilers, amongst other programs, often work with data that (slowly) changes over time. When the changes between subsequent runs of the compiler are small, one would hope the compiler to incrementally update its results, resulting in much lower rebuilding times. However, the manual construction of an incremental compiler is very hard and error prone and therefore usually not an option. Attribute grammars provide an attractive way of constructing compilers, as they are compositional in nature and allow for aspect oriented programming. In this paper we describe work on the automatic generation of incremental attribute grammar evaluators, with the purpose of (semi-)automatically generating an incremental compiler from a regular attribute grammar definition. The paper includes an informal introduction into attribute grammars, describes how to implement incremental evaluation for a simple example without higher-order attributes as well as for a larger example with higher-order attributes. Higher-order attributes are a well known extension to classical attribute grammars which for example is used to model different compiler phases or iterative transformations of an abstract syntax tree. Incrementality for attribute evaluation is achieved by maintaining additional bookkeeping about which attribute values have changed. We show benchmarks for the implementation technique dealing with higher-order attributes. The benchmarks indicate that the bookkeeping overhead in our prototype implementation comes with a serious hit on performance, further investigation into the reasons and possible remedies for this falls outside the scope of this paper.
机译:编译器以及其他程序经常使用随时间(缓慢)变化的数据。当编译器的后续运行之间的变化较小时,人们希望编译器以增量方式更新其结果,从而缩短重建时间。但是,手动构造增量编译器非常困难且容易出错,因此通常不是一种选择。属性语法提供了一种有吸引力的构造编译器的方式,因为它们本质上是组合的,并且允许面向方面的编程。在本文中,我们描述了自动生成增量属性语法评估程序的工作,目的是根据常规属性语法定义(半)自动生成增量编译器。本文包括对属性语法的非正式介绍,描述了如何对不具有高阶属性的简单示例以及具有高阶属性的较大示例实施增量评估。高阶属性是经典属性语法的众所周知的扩展,例如,该属性用于建模抽象语法树的不同编译器阶段或迭代转换。属性评估的增量是通过维护有关哪些属性值已更改的额外簿记来实现的。我们显示了处理高阶属性的实现技术的基准。这些基准表明,原型实现中的簿记开销严重影响了性能,对此的进一步调查原因和可能的补救措施不在本文讨论范围之内。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号