45 citations found. Retrieving documents...
W. Clinger. Macros that work. In Proceedings of the 18th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pages 155--162. ACM Press, 1991.

 Home/Search   Document Not in Database   Summary   Related Articles   Check  

This paper is cited in the following contexts:

First 50 documents

Decomposing lambda - the Kernel programming language - Shutt (2003)   (Correct)

....arising from name space colli sions (called variable capturing, which will be discussed in 4.1. 1) but programmers had been living with those problems since before the advent of higher level languages, and in any case the problems would be eliminated by hygienic macro devices in the late eighties [C1Re91]. Fexprs, however, were not merely badly behaved in themselves; adding them to a Lisp language undermined the well behavedness of the rest of the language. The case against fexprs was carefully and clearly laid out in [Pi80] which recommended omitting fexprs from future dialects of Lisp: it has ....

....for the informal term hygiene: H.P. Barendregt, Introduction to the lambda calculus , Nieuw Arcbier voor Wisenkunde 2 4 (1984) pp. 337 372; it also notes the formal property of being free for in [Kle52] where it occurs in Kleene s 34 as an auxiliary to his definition of free substitution) 26 [C1Re91] describes four, rather than two, kinds of variable capturing; but this doubling of cases is an artifact of the explicitly two phase evaluation model required by macros. Each of the two 15 scoping, not in macros, so fexpr style facilities such as Kernel s have the potential for both; but in each ....

[Article contains additional citation context not shown here]

William Clinger and Jonathan Rees, "Macros that work", POPL '91: Con- ference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, Orlando, Florida, January 21-23, 1991, pp. 155-162. Draws together the best of previous work reconciling macros with hygiene. The introduction extensively discusses the various problems that can arise with macros.


Composable and Compilable Macros: You Want it When? - Flatt (2002)   (6 citations)  (Correct)

....USA. Copyright 2002 ACM 1 58113 487 8 02 0010 . 5. 00 pattern matching transformations, but may perform arbitrary computation during expansion [12, 17, 3, 24, 26, 1] In addition, macros may manipulate abstract syntax enriched with lexical information instead of manipulating raw source text [15, 2, 4, 8], which means that macro defined constructs can be assigned a meaning independent of details of the macro s expansion (e.g. whether the macro introduces a local variable named temp or happens to call the car function) Finally, in the Lisp and Scheme tradition where macros are themselves defined ....

.... et al. s definition of hygienic macros [15] initiated a chain of research in Scheme macros, leading to the syntax case system of Dybvig et al. 8] Notable points along the way include Bawden and Rees s syntactic closures [2] and Clinger and Rees s lexically scoped, pattern matching macros [4]. Our work builds directly on the syntax case model. In the original model, a local phase separation exists via let syntax, though the model does not explain how out of phase errors are detected and reported. Our model fills this small gap while generalizing the model to cover module phases. ....

W. Clinger and J. Rees. Macros that work. In Proc. ACM Symposium on Principles of Programming Languages, pages 155--162, Jan. 1991.


How to Write Seemingly Unhygienic and Referentially Opaque.. - Kiselyov   (Correct)

....lexical scope by default. In limited circumstances, exceptions to the block structure preserving policy of macros are useful and can be allowed. These exceptions however should be statically visible. A number of experimental macro systems with the above properties have been built ( 8] 9] 1] [2], 4] 13] The least powerful and the most restrictive set of common features of these macro systems has been standardized in R5RS [7] An earlier version of that system has been mentioned in the previous Scheme report, R4RS, and expounded in [3] The R5RS macro system permits no exceptions to ....

....The macro de le indeed has to surround the victim s code. One can therefore object if we merely create our own little language that resembles Scheme but does not guarantee referential transparency of macro expansions. However, such a little language was presumed impossible with syntax rules [2][3] Any macro by de nition extends the language. The extended language is still expected to obey certain constraints. The impetus for hygienic macros was speci cally to create a macro system with guaranteed hygienic constraints. Although syntax rules are Turing complete, certain computations, for ....

[Article contains additional citation context not shown here]

William Clinger and Jonathan Rees. Macros that work. In Proc. 1991 ACM Conference on Principles of Programming Languages, pp. 155-162. 8


Template Meta-programming for Haskell - Sheard, Jones (2002)   (27 citations)  (Correct)

....template meta programming seriously for over twenty years [11] and modern Scheme systems support elaborate towers of language extensions based entirely on macros. Early designs suffered badly from the name capture problem, but this problem was solved by the evolution of hygienic 12 macros [10, 4]; Dybvig, Hieb and Bruggeman s paper is an excellent, self contained summary of the state of the art [7] The differences of vocabulary and world view, combined with the subtlety of the material, make it quite difficult to give a clear picture of the differences between the Scheme approach and ....

W. Clinger and J. Rees. Macros that work. In 19th ACM Symposium pages 155--162. ACM, Jan. 1991.


First-class Macros Have Types - Bawden (2000)   (6 citations)  (Correct)

....systems operate on characters. Such macros have no understanding of the structure of the language they are generating, and in particular, they are blind to the scoping of variables. As a result, classical Lisp macros sometimes have bugs caused by inadvertent variable captures. Modern Scheme macros [KFFD86, BR88, CR91, Cli91, DHB92, KCR98] have the ability to avoid capture problems by generating output that specifies the environment in which each variable is to be resolved. The programmer can easily write macros that behave properly with respect to the rules of lexical scoping. The details of this namespace management technology ....

William Clinger and Jonathan Rees. Macros that work. In Proc. Symposium on Principles of Programming Languages, pages 155--162. ACM, January 1991.


Generative Binary Components - Kamin, Callahan, Clausen (2001)   (Correct)

....since the two levels are in different languages, no collisions are possible. On the other hand, there is no protection against the capture of a variable used in one quoted Java fragment by a binder occurring in another, unrelated, Java fragment. It may be that a technique like hygienic macros [5] should be employed. On the other hand, it seems that some kinds of variable capture are useful, and even essential. It is not clear to us how to deal with this issue. One convention that we have been able to live with is to forbid capture of variables across the component client boundary. 7 ....

William Clinger and Jonathan Rees. Macros that work. In Proc. of the Conf. on Principles of Programming Languages (POPL), pages 155--160, 1991. 24


Growing Languages with Metamorphic Syntax Macros - Brabrand, Schwartzbach (2000)   (6 citations)  (Correct)

....of the # order from param to param # . Second, for all pairs of parameter lists of the form #p1#1 and #p2#2 , if #(p1) equals #(p2) then p1 must equal p2 . Hygienic Macros To achieve hygienic macros, we automatically # convert all identifiers inside macro bodies during expansion. Unlike Scheme [12, 6, 8], we also # convert free identifiers, since they cannot be guaranteed to bind to anything sensible in the context of an invocation. As we thus # convert all identifiers, the macro needs only recognize all parse tree nodes of nonterminal id ; that is, no symbol table information is required. To ....

W. Clinger and J. Rees. Macros that work. In Principles of Programming Languages (POPL), pages 155--162, 1991.


Linguistic Reuse - Krishnamurthi (2001)   (1 citation)  (Correct)

....be non local and inadvertent, making programs extremely dicult to debug. This situation is exacerbated in languages like Scheme where even primitive procedures and syntax can be re de ned. In recognition of these problems, some macro systems implement a property called referential transparency [10], which expects free names to be resolved in the scope of a macro s de nition, not use. This property does not, however, address many of our problems. First, it cannot guard against mutations. Second, it covers only names, but in our framework the meaning of every part of the syntax, not just ....

....the primitives. The core of the compiler generated object form is shown in gure 4.5. The compiler for Scheme automata is written in the language Scheme def syn, which is Scheme enriched with a macro de nition construct. Speci cally, Scheme defsyn provides two new syntactic forms: de ne syntax [10] and generate compiler. As the Scheme def syn compiler parses the Scheme automata compiler unit s body, it accumulates all de ne syntax macro de nitions in a table. It then uses this table to replace the invocation of generate compiler with an expression that evaluates to a compiler that expands ....

[Article contains additional citation context not shown here]

Clinger, W. and J. Rees. Macros that work. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 155-162, 1991.


Growing Languages with Metamorphic Syntax Macros - Brabrand, Schwartzbach (2000)   (6 citations)  (Correct)

....10] are defined and invoked as: define syntax and (syntax rules ( and) #t) and b) b) and b . if b (and . #f) and a (if x y z) c) The macros are hygienic, which means that bound variables in a macro body are # converted during expansion to avoid accidental name clashes [5, 9]. Scheme macros are basically functions on s expressions and therefore not declarative. Because of this, no further syntax checking is performed; thus, a macro body may contain illegal constructions such as (if #t 1 2 3) The ellipsis notation allows the macro to accept a list of arguments; the ....

William Clinger and Jonathan Rees. Macros that work. In Principles of Programming Languages (POPL), pages 155--162, 1991.


Lightweight and Generative Components II: Binary-level.. - Kamin, Callahan, Clausen (1999)   (11 citations)  (Correct)

....the realm of practical usability. Integrating the two levels could go some a considerable distance toward alleviating this problem. It would also allow us to address a problem that we have not mentioned: capture of variables. In Scheme, this problem has led to the development of hygienic macros [2]; since we have a similar combination of features open terms and higher order functions we may be able to benefit from this technology. Acknowledgements Uday Reddy and An Le provided useful feedback on an earlier draft of this paper. We also appreciate the help of Joel Jones, whose ....

William Clinger and Jonathan Rees. Macros that work. pages 155--160, 1991.


Multi-Stage Programming: Its Theory and Applications - Taha (1999)   (27 citations)  (Correct)

....function has been associated with use of back quote and comma in LISP ever since they were introduced [88] The back quote and comma mechanism is an early ancestor of Brackets and Escape (See Section 7.4.2. Various works have studied and explained the need for run time renaming of bound variables [13]. In what follows, we present a brief explanation of the need for renaming, and why it must be performed at run time. To illustrate this point, we will introduce a simple function called h that we use throughout this chapter. The Need for Renaming In a multi level language, object level bound ....

....facilities were invaluable in principle and in practice but looked down upon each particular instance as a sort of shameful family secret. If only The Right Thing could be found [88] Clinger and Rees clarified the problem of renaming in macros using an analogy with reductions in the calculus [13]. In particular, they explained why there is a need for renaming at run time, and why static renaming is not enough. In the calculus, run time corresponds to fi reductions, and renaming corresponds to ff renamings. In the calculus, both kinds of reductions must be interleaved because fi ....

Clinger, W., and Rees, J. Macros that work. In Conference Record of the 18th Annual ACM Symposium on Principles of Programming Languages (POPL '91) (Orlando, Jan. 1991), ACM Press, pp. 155--162.


A Staging Calculus and its Application to the Verification of.. - Muller (1993)   (4 citations)  (Correct)

....as being correct if expansion of de ned notation commutes with reduction on terms. As we illustrated in Section 1, naive expansion fails to satisfy this criterion because unintended captures of free variables can occur during naive expansion. This problem has been taken up many times before [KFFD86, Gri88, CR91, BA92] and [Car93] We will compare our approach with some of these in Section 5. In most respects our approach will be the usual one for macro expansion: instead of the translation process depicted in (1) in which the front end of the translator has produced a normal form pMq, the front end produces ....

W. Clinger and J. Rees. Macros that work. In Proceedings of the Eighteenth ACM Symposium on Principles of Programming Languages, pages 155-162, 1991.


DiSTiL: a Transformation Library for Data Structures - Smaragdakis, Batory (1997)   (15 citations)  (Correct)

....it becomes a bad practice to let the position of identifiers in the final program determine their meaning erroneous references can easily be introduced. This problem has been studied extensively in the context of macro expansion and systems that address it are called hygienic (e.g. Koh86] [Cli91a], Wal97] A complete solution comes in the form of hygienic, lexically scoped macros (see [Cli91a] As we explain in [Sma96] the standard macro expansion methods are not directly applicable to software generators. Instead we had to develop the generation scoping system which is in many ways ....

.... erroneous references can easily be introduced. This problem has been studied extensively in the context of macro expansion and systems that address it are called hygienic (e.g. Koh86] Cli91a] Wal97] A complete solution comes in the form of hygienic, lexically scoped macros (see [Cli91a]) As we explain in [Sma96] the standard macro expansion methods are not directly applicable to software generators. Instead we had to develop the generation scoping system which is in many ways similar to the lexically scoped macros machinery of [Cli91a] but is better suited for generator ....

[Article contains additional citation context not shown here]

W. Clinger and J. Rees. "Macros that Work". Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, January 1991, 155-162.


POPE: An On-line Partial Evaluator - Ørbæk (1994)   (3 citations)  (Correct)

....might cause variables captured by the lambda to sift out of their static scope. 8 Inner workings POPE treats the input program and static data in several stages. First the program is read from one or more files and macro expanded by way of the macros that work package by Clinger and Rees [CR91a] a part of SLIB) The read definitions and the given start expression are then parsed into an internal de sugared representation. 5 Just after macro expansion and parsing, POPE performs a mutation analysis on the program to be partially evaluated. The mutation analysis runs in two phases: ....

William Clinger and Jonathan Rees. Macros that Work. In Proc. of the 18'th annual ACM Symp. on Principles of Programming Languages (POPL 18), pages 155--162. ACM Press, 1991.


Dynamic Modules in Higher-Order Languages - Jagannathan (1994)   (5 citations)  (Correct)

....building large scale systems is thus severely undermined. There have been several proposals,however, to add a module facility to Scheme (e.g. 12, 5] and many dialects of Scheme implement some form of modules [20, 12] Several of these implementations constrain modules to be statically defined [26]; thus, modules serve primarily as a mechanism for separate compilation, and are cumbersome to use as a data abstraction facility. Other implementations permit module like structures to be dynamically created, but do not integrate modules cleanly with the rest of the language making their liberal ....

....or Modula 2 [27] programmers are free from thinking about the actual implementation of the module facility. In this sense, we should consider Rascal as a high level implementation substrate for various modularity structures. However, when used in conjunction with expressive macro systems (e.g. [13, 26]) much of the complexity in implementing modules could be alleviated. For example, we can define macros called make client interface and make impl interface that can be used to define stack clients and implementations: define (stack client interface) make client interface (push pop create) ....

William Clinger and Jonathan Rees. Macros that Work. In 18 th ACM Symposium on Principles of Programming Languages, pages 155--163, January 1993.


Revised^5 Report on the Algorithmic Language Scheme - Kelsey, (ed.), Clinger.. (1998)   Self-citation (Clinger)   (Correct)

....for specifying macro transformers. The syntactic keyword of a macro may shadow variable bindings, and local variable bindings may shadow keyword bindings. All macros defined using the pattern language are hygienic and referentially transparent and thus preserve Scheme s lexical scoping [14, 15, 2, 7, 9]: # If a macro transformer inserts a binding for an identifier (variable or keyword) the identifier will in effect be renamed throughout its scope to avoid conflicts with other identifiers. Note that a define at top level may or may not introduce a binding; see section 5.2. # If a macro ....

William Clinger and Jonathan Rees. Macros that work. In Proceedings of the 1991 ACM Conference on Principles of Programming Languages, pages 155--162.


Revised^5 Report on the Algorithmic Language Scheme - Kelsey, (ed.), Clinger.. (1998)   (112 citations)  Self-citation (Clinger)   (Correct)

....for specifying macro transformers. The syntactic keyword of a macro may shadow variable bindings, and local variable bindings may shadow keyword bindings. All macros defined using the pattern language are hygienic and referentially transparent and thus preserve Scheme s lexical scoping [14, 15, 2, 7, 9]: Revised 5 Scheme . If a macro transformer inserts a binding for an identifier (variable or keyword) the identifier will in e#ect be renamed throughout its scope to avoid conflicts with other identifiers. Note that a define at top level may or may not introduce a binding; see section ....

William Clinger and Jonathan Rees. Macros that work. In Proceedings of the 1991 ACM Conference on Principles of Programming Languages, pages 155-- 162.


Program Generators and the Tools to Make Them - Smaragdakis, Huang, Zook (2004)   (Correct)

No context found.

W. Clinger. Macros that work. In Proceedings of the 18th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pages 155--162. ACM Press, 1991.


Implementing Multi-stage Languages Using ASTs, Gensym.. - Calcagno, Taha, Huang, ..   (Correct)

No context found.

Clinger, W., and Rees, J. Macros that work. In In proceedings of the ACM Symposium on Principles of Programming Languages (POPL) (Orlando, 1991), ACM Press, pp. 155--162.


Program Generators and the Tools to Make Them - Smaragdakis, Huang, Zook (2004)   (Correct)

No context found.

W. Clinger. Macros that work. In Proceedings of the 18th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pages 155--162. ACM Press, 1991.


Domain Specific Languages for Interactive Web Services - Brabrand (2002)   (1 citation)  (Correct)

No context found.

W. Clinger and J. Rees. Macros that work. In Principles of Programming Languages (POPL), pages 155--162, 1991.


Implementing Multi-stage Languages Using ASTs, Gensym.. - Calcagno, Taha, Huang, ..   (Correct)

No context found.

Clinger, W., and Rees, J. Macros that work. In In proceedings of the ACM Symposium on Principles of Programming Languages (POPL) (Orlando, 1991), ACM Press, pp. 155--162.


Extensible Language Implementation - Kolbly (2002)   (Correct)

No context found.

Will Clinger and Jonathan Rees. Macros that work. In Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, pages 155-162, January 1991. 172


Implementing Multi-stage Languages Using ASTs, Gensym.. - Calcagno, Taha, Huang, ..   (Correct)

No context found.

Clinger, W., and Rees, J. Macros that work. In In proceedings of the ACM Symposium on Principles of Programming Languages (POPL) (Orlando, 1991), ACM Press, pp. 155--162.


Web Interactions - Graunke (2003)   (Correct)

No context found.

Clinger, W. and J. Rees. Macros that work. In ACM Symposium on Principles of Programming Languages, pages 155-162, 1991.

First 50 documents

Online articles have much greater impact   More about CiteSeer.IST   Add search form to your site   Submit documents   Feedback  

CiteSeer.IST - Copyright Penn State and NEC