Results 1 - 10
of
22
The mystery of the tower revealed: A non-reflective description of the reflective tower
- Lisp and Symbolic Computation
, 1988
"... In an important series of papers [8, 9], Brian Smith has discussed the nature of programs that know about their text and the context in which they are executed. He called this kind of knowledge reflection. Smith proposed a programming language, called 3-LISP, which embodied such self-knowledge in th ..."
Abstract
-
Cited by 68 (7 self)
- Add to MetaCart
In an important series of papers [8, 9], Brian Smith has discussed the nature of programs that know about their text and the context in which they are executed. He called this kind of knowledge reflection. Smith proposed a programming language, called 3-LISP, which embodied such self-knowledge in the domain of metacircular interpreters. Every 3-LISP program is interpreted by a metacircular interpreter, also written in 3-LISP. This gives rise to a picture of an infinite tower of metacircular interpreters, each being interpreted by the one above it. Such a metaphor poses a serious challenge for conventional modes of understanding of programming languages. In our earlier work on reflection [4], we showed how a useful species of reflection could be modeled without the use of towers. In this paper, we give a semantic account of the reflective tower. This account is self-contained in the sense that it does not employ reflection to explain reflection. 1. Modeling reflection Reflective programming languages were introduced in [8, 9] to study programs that need knowledge of their own behavior. In artificial intelligence, this kind of knowledge is needed, for example, in programs that must explain their behavior to
Pointcuts and Advice in Higher-Order Languages
- In Proceedings of the 2nd International Conference on Aspect-Oriented Software Development
, 2003
"... Aspect-oriented software design will need to support languages with first-class and higher-order procedures, such as Python, Perl, ML and Scheme. These language features present both challenges and benefits for aspects. On the one hand, they force the designer to carefully address issues of scope th ..."
Abstract
-
Cited by 45 (0 self)
- Add to MetaCart
Aspect-oriented software design will need to support languages with first-class and higher-order procedures, such as Python, Perl, ML and Scheme. These language features present both challenges and benefits for aspects. On the one hand, they force the designer to carefully address issues of scope that do not arise in first-order languages. On the other hand, these distinctions of scope make it possible to define a much richer variety of policies than first-order aspect languages permit.
Growing Languages with Metamorphic Syntax Macros
- In Proceedings of Workshop on Partial Evaluation and Semantics-Based Program Manipulation, PEPM 2002. ACM
, 2000
"... From now on, a main goal in designing a language should be to plan for growth." Guy Steele: Growing a Language, OOPSLA'98 invited talk. We present our experiences with a syntax macro language which we claim forms a general abstraction mechanism for growing (domain-specific) extensions of programmin ..."
Abstract
-
Cited by 37 (4 self)
- Add to MetaCart
From now on, a main goal in designing a language should be to plan for growth." Guy Steele: Growing a Language, OOPSLA'98 invited talk. We present our experiences with a syntax macro language which we claim forms a general abstraction mechanism for growing (domain-specific) extensions of programming languages. Our syntax macro language is designed to guarantee type safety and termination. A concept of metamorphisms allows the arguments of a macro to be inductively defined in a meta level grammar and morphed into the host language. We also show how the metamorphisms can be made to operate simultaneously on multiple parse trees at once. The result is a highly flexible mechanism for growing new language constructs without resorting to compile-time programming. In fact, whole new languages can be defined at surprisingly low cost. This work is fully implemented as part of the <bigwig> system for defining interactive Web services, but could find use in many other languages. 1.
M-LISP: A Representation-Independent Dialect of LISP with Reduction Semantics
- ACM Transactions on Programming Languages and Systems
, 1992
"... In this paper we introduce M-LISP, a simple new dialect of LISP which is designed with an eye toward reconciling LISP's metalinguistic power with the structural style of operational semantics advocated by Plotkin [Plo75]. We begin by reviewing the original denition of LISP [McC61] in an attempt t ..."
Abstract
-
Cited by 21 (2 self)
- Add to MetaCart
In this paper we introduce M-LISP, a simple new dialect of LISP which is designed with an eye toward reconciling LISP's metalinguistic power with the structural style of operational semantics advocated by Plotkin [Plo75]. We begin by reviewing the original denition of LISP [McC61] in an attempt to clarify the source of its metalinguistic power. We nd that it arises from a problematic clause in this denition. We then dene the abstract syntax and operational semantics of M-LISP, essentially a hybrid of M-expression LISP and Scheme. Next, we tie the operational semantics to the corresponding equational logic. As usual, provable equality in the logic implies operational equality. Having established this framework we then extend M-LISP with the metalinguistic eval and reify operators (the latter is a non-strict operator which converts its argument to its metalanguage representation.) These operators encapsulate the metalinguistic representation conversions that occur globall...
Syntactic Abstraction in Scheme
- Lisp and Symbolic Computation
, 1992
"... 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 the inadvertent binding, or captu ..."
Abstract
-
Cited by 20 (2 self)
- Add to MetaCart
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 the inadvertent binding, or capturing, of identifiers. A further complication results from the fact that the transformed program may have little resemblance to the original program, making correlation of source and object code difficult. We address both the capturing problem and the problem of source-object code correlation. Previous approaches to the capturing problem have been both inadequate and overly restrictive, and the problem of source-object code correlation has been largely unaddressed. Our approach is based on a new algorithm for implementing syntactic transformations...
Little Languages and their Programming Environments
- in Monterey Workshop on Engineering Automation for Software Intensive System Integration
, 2001
"... Programmers constantly design, implement, and program in little languages. Two different approaches to the implementation of little languages have evolved. One emphasizes the design of little languages from scratch, using conventional technology to implement interpreters and compilers. The other adv ..."
Abstract
-
Cited by 16 (1 self)
- Add to MetaCart
Programmers constantly design, implement, and program in little languages. Two different approaches to the implementation of little languages have evolved. One emphasizes the design of little languages from scratch, using conventional technology to implement interpreters and compilers. The other advances the idea of extending a general-purpose host language; that is, the little language shares the host language’s features (variables, data, loops, functions) where possible; its interpreters and compilers; and even its type soundness theorem. The second approach is often called a language embedding. This paper directs the attention of little language designers to a badly neglected area: the programming environments of little languages. We argue that an embedded little language should inherit not only the host language’s syntactic and semantic structure, but also its programming environment. We illustrate the idea with our DrScheme programming environment and S-XML, a little transformation language for XML trees. DrScheme provides a host of tools for Scheme: a syntax analysis tool, a static debugger, an algebraic stepper, a portable plugin system, and an interactive evaluator. S-XML supports the definition of XML languages using a simple form of schemas, the convenient creation of XML data, and the definition of XML transformations.
Metalevel Building Blocks for Modular Systems
- ACM Transactions on Programming Languages and Systems
, 1994
"... this article, we propose a treatment of environments and the mechanism by which they are reified and manipulated, that addresses these concerns. The language described below (Rascal) permits environments to be reified into data structures, and data structures to be reflected into environments, but g ..."
Abstract
-
Cited by 16 (0 self)
- Add to MetaCart
this article, we propose a treatment of environments and the mechanism by which they are reified and manipulated, that addresses these concerns. The language described below (Rascal) permits environments to be reified into data structures, and data structures to be reflected into environments, but gives users great flexibility to constrain the extent and scope of these processes. We argue that the techniques and operators developed define a cohesive basis for building largescale modular systems using reflective programming techniques.
Expansion-Passing Style: A General Macro Mechanism
- Lisp and Symbolic Computation
, 1988
"... The traditional Lisp macro expansion facility inhibits several important forms of expansion control. These include selective expansion of subexpressions, expansion of subexpressions using modified expansion functions, and expansion of application and variable expressions. Furthermore, the expansion ..."
Abstract
-
Cited by 13 (1 self)
- Add to MetaCart
The traditional Lisp macro expansion facility inhibits several important forms of expansion control. These include selective expansion of subexpressions, expansion of subexpressions using modified expansion functions, and expansion of application and variable expressions. Furthermore, the expansion algorithm must treat every special form as a separate case. The result is limited expressive power and poor modularity. We propose an alternative facility that avoids these problems, using a technique called expansion-passing style (EPS). The critical difference between the facility proposed here and the traditional macro mechanism is that expansion functions are passed not only an expression to be expanded but also another expansion function. This function may or may not be used to perform further expansion. The power of this technique is illustrated with several examples. Most Lisp systems may be adapted to employ this technique.
From Macros to Reusable Generative Programming
- IN INTERNATIONAL SYMPOSIUM ON GENERATIVE AND COMPONENT-BASED SOFTWARE ENGINEERING, NUMBER 1799 IN LECTURE NOTES IN COMPUTER SCIENCE
, 1999
"... Generative programming is widely used both to develop new programming languages and to extend existing ones with domain-specific sub-languages. This paper describes McMicMac, a framework for generative programming. McMicMac uses tree-transforming macros as language specifications, and enhances t ..."
Abstract
-
Cited by 11 (6 self)
- Add to MetaCart
Generative programming is widely used both to develop new programming languages and to extend existing ones with domain-specific sub-languages. This paper describes McMicMac, a framework for generative programming. McMicMac uses tree-transforming macros as language specifications, and enhances them with inherited and synthesized attributes. The enhanced transformers can describe general compilation tasks. Families of these specifications are grouped into mixin-like collections called vocabularies. Programmers can define new languages by composing these vocabularies. We have implemented McMicMac for Scheme and used it to build several systems, including the DrScheme programming environment. The principles of McMicMac carry over to other languages and environments.
A Reflective Model of Inheritance
, 1992
"... ions are introduced using notation; conditionals are written using !; application is expressed by juxtaposition of the function being applied with its arguments. Recursion is expressed using letrec . 3.1 Records Records are non-strict finite associations of labels to values. The constituent express ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
ions are introduced using notation; conditionals are written using !; application is expressed by juxtaposition of the function being applied with its arguments. Recursion is expressed using letrec . 3.1 Records Records are non-strict finite associations of labels to values. The constituent expressions in a record are evaluated relative to the record's evaluation environment. The value of a record field can be retrieved using the "." operator: if r is a record, then evaluating r:x returns the binding value of x as defined in r. We provide one other operation over records. Let r 1 and r 2 be two records and let Dom(r) be the set of names defined within record r. The join or composition of r 1 and r 2 (written (ffl r 1 r 2 )) is now defined as follows: (ffl r 1 r 2 ):x = ae r 2 :x if x 2 Dom(r2) r 1 :x otherwise 3 Besides these basic syntactic forms, we introduce various syntactic extensions (or abbreviations) throughout the paper; these extensions are best thought of as macros th...

