Resugaring: lifting evaluation sequences through syntactic sugar

Resugaring: lifting evaluation sequences through syntactic sugar
复制标题

Resugagar:通过语法糖提升评估序列

DOI:
10.1145/2594291.2594319
复制
发表时间:
2014
期刊:
Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
影响因子:
--
通讯作者:
S. Krishnamurthi
S. Krishnamurthi
中科院分区:
--
文献类型:
--
作者:
Justin Pombrio;S. Krishnamurthi

文献摘要

参考文献

被引文献

相似文献

句法糖在语言技术中普遍存在。它用于收缩核心语言的大小;定义特定领域的语言;甚至让程序员扩展他们的语言。不幸的是,句法糖是通过转化消除的,因此作者不熟悉的程序。因此,它以一个代价:它掩盖了用户的源程序与正在评估的程序之间的关系。我们通过显示如何根据表面语法计算还原步骤来解决此问题。表面语言中的每个步骤都模仿了核心语言的一个或多个步骤。计算的步骤隐藏了转换,从而维护了表面语言提供的抽象。我们对仿真和抽象进行精确的这些陈述,证明它们在我们的形式主义中,并在COQ中验证系统的一部分。我们已经实施了这项工作,并将其应用于三种非常不同的语言。
Syntactic sugar is pervasive in language technology. It is used to shrink the size of a core language; to define domain-specific languages; and even to let programmers extend their language. Unfortunately, syntactic sugar is eliminated by transformation, so the resulting programs become unfamiliar to authors. Thus, it comes at a price: it obscures the relationship between the user's source program and the program being evaluated. We address this problem by showing how to compute reduction steps in terms of the surface syntax. Each step in the surface language emulates one or more steps in the core language. The computed steps hide the transformation, thus maintaining the abstraction provided by the surface language. We make these statements about emulation and abstraction precise, prove that they hold in our formalism, and verify part of the system in Coq. We have implemented this work and applied it to three very different languages.
解释其工作的函数式程序
DOI: 10.1145/2364527.2364579
发表时间: 2012
期刊: --
影响因子: --
作者:
Perera R
通讯作者: Perera R