Syntactic abstraction in scheme

Syntactic abstraction in scheme
复制标题

方案中的句法抽象

DOI:
--
复制
发表时间:
1992
期刊:
LISP and Symbolic Computation
影响因子:
--
通讯作者:
Carl Bruggeman
Carl Bruggeman
中科院分区:
--
文献类型:
--
作者:
R. Dybvig;Robert Hieb;Carl Bruggeman

文献摘要

被引文献

相似文献

由于引入标识符引用与以前现有的标识符绑定之间的相互作用,或引入绑定与以前现有的参考文献之间的相互作用,幼稚的程序转换可能会产生令人惊讶的效果。这些相互作用可以导致识别符的无意结合或捕获。另一个并发症是,转换程序可能与原始程序几乎没有相似之处,从而使源代码和对象代码的相关性变得困难。本文介绍了一个有效的宏观系统,该系统可以防止无意捕获,同时保持源代码和对象代码之间的相关性。宏系统允许程序员使用无限制的通用语言来定义程序转换。以前解决捕获问题的方法是不足,过度限制或效率低下的方法,而源对象相关性的问题在很大程度上没有解决。宏系统基于一种用于实现句法转换的新算法和句法表达式的新表示。
Naive program transformations can have surprising effects due to the interaction between introduced identifier references and previously existing identifier bindings, or between introduced bindings and previously existing references. These interactions can result in inadvertent binding, or capturing, of identifiers. A further complication is that transformed programs may have little resemblance to original programs, making correlation of source and object code difficult. This article describes an efficient macro system that prevents inadvertent capturing while maintaining the correlation between source and object code. The macro system allows the programmer to define program transformations using an unrestricted, general-purpose language. Previous approaches to the capturing problem have been inadequate, overly restrictive, or inefficient, and the problem of source-object correlation has been largely unaddressed. The macro system is based on a new algorithm for implementing syntactic transformations and a new representation for syntactic expressions.