首页> 外文期刊>Journal of Functional Programming >Promoting rewriting to a programming language: a compiler for non-deterministic rewrite programs in associative-commutative theories
【24h】

Promoting rewriting to a programming language: a compiler for non-deterministic rewrite programs in associative-commutative theories

机译:促进对编程语言的重写:在关联-交换理论中用于非确定性重写程序的编译器

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

摘要

First-order languages based on rewrite rules share many features with functional languages, but one difference is that matching and rewriting can be made much more expressive and powerful by incorporating some built-in equational theories. To provide reasonable programming environments, compilation techniques for such languages based on rewriting have to be designed. This is the topic addressed in this paper. The proposed techniques are independent from the rewriting language, and may be useful to build a compiler for any system using rewriting modulo Associative and Commutative (AC) theories. An algorithm for many-to-one AC matching is presented, that works efficiently for a restricted class of patterns. Other patterns are transformed to fit into this class. A refined data structure, namely compact bipartite graph, allows encoding of all matching problems relative to a set of rewrite rules. A few optimisations concerning the construction of the substitution and of the reduced term are described. We also address the problem of non-determinism related to AC rewriting, and show how to handle it through the concept of strategies. We explain how an analysis of the determinism can be performed at compile time, and we illustrate the benefits of this analysis for the performance of the compiled evaluation process. Then we briefly introduce the ELAN system and its compiler, in order to give some experimental results and comparisons with other languages or rewrite engines.
机译:基于重写规则的一阶语言与功能语言具有许多功能,但不同之处在于,通过合并一些内置的方程式理论,可以使匹配和重写更具表现力和功能。为了提供合理的编程环境,必须设计基于重写的此类语言的编译技术。这是本文讨论的主题。所提出的技术与重写语言无关,并且可能对使用重写模关联和交换(AC)理论为任何系统构建编译器很有用。提出了一种用于多对一交流匹配的算法,该算法可有效地用于受限的模式类别。转换其他模式以适合此类。改进的数据结构(即紧凑二部图)允许对所有匹配问题(相对于一组重写规则)进行编码。描述了有关取代结构和简化术语的一些优化。我们还将解决与AC重写相关的不确定性问题,并展示如何通过策略概念来处理它。我们解释了如何在编译时对确定性进行分析,并说明了这种分析对于已编译评估过程的性能的好处。然后,我们简要介绍了ELAN系统及其编译器,以便给出一些实验结果并与其他语言或重写引擎进行比较。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号