Syntactic abstraction in scheme

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.

[1]  Deborah S. Coutant,et al.  DOC: a practical approach to source-level debugging of globally optimized code , 1988, PLDI '88.

[2]  Joseph E. Stoy,et al.  Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory , 1981 .

[3]  D. H. Bartley,et al.  Revised4 report on the algorithmic language scheme , 1991, LIPO.

[4]  Timothy G. Griffin Notational definition and top-down refinement for interactive proof development systems , 1988 .

[5]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[6]  Polle T. Zellweger An interactive high-level debugger for control-flow optimized programs , 1983 .

[7]  R. Kent Dybvig,et al.  Writing Hygienic Macros in Scheme with Syntax-Case , 1992 .

[8]  Jonathan Rees,et al.  Macros that work , 1991, POPL '91.

[9]  R. Kent Dybvig,et al.  Expansion-passing style: A general macro mechanism , 1988, LISP Symb. Comput..

[10]  R. Kent Dybvig,et al.  Expansion-passing style: beyond conventional macros , 1986, LFP '86.

[11]  William Clinger Hygienic macros through explicit renaming , 1991, LIPO.

[12]  Jonathan Rees,et al.  Syntactic closures , 1988, LISP and Functional Programming.

[13]  Chris Hanson,et al.  A syntactic closures macro facility , 1991, LIPO.

[14]  Mitchell Wand,et al.  Macro-by-example: Deriving syntactic transformations from their specifications , 1987, POPL '87.

[15]  Matthias Felleisen,et al.  Hygienic macro expansion , 1986, LFP '86.

[16]  E E Kohlbecker,et al.  Syntactic extensions in the programming language LISP , 1986 .

[17]  John L. Hennessy,et al.  Symbolic Debugging of Optimized Code , 1982, TOPL.