Results 1 - 10
of
14
Multi-Stage Programming: Its Theory and Applications
, 1999
"... MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construct ..."
Abstract
-
Cited by 79 (18 self)
- Add to MetaCart
MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construction, combination, and execution of object-programs. Our thesis is that MetaML's three staging annotations provide a useful, theoretically sound basis for building program generators. This dissertation reports on our study of MetaML's staging constructs, their use, their implementation, and their formal semantics. Our results include an extended example of where MetaML allows us to produce efficient programs, an explanation of why implementing these constructs in traditional ways can be challenging, two formulations of MetaML's semantics, a type system for MetaML, and a proposal for extending ...
Quasiquotation in Lisp
- O. Danvy, Ed., University of Aarhus, Dept. of Computer Science
, 1999
"... Quasiquotation is the technology commonly used in Lisp to write program-generating programs. In this paper I will review the history and development of this technology, and explain why it works so well in practice. ..."
Abstract
-
Cited by 36 (0 self)
- Add to MetaCart
Quasiquotation is the technology commonly used in Lisp to write program-generating programs. In this paper I will review the history and development of this technology, and explain why it works so well in practice.
An operational semantics for R5RS Scheme
- In Workshop on Scheme and Functional Programming
, 2005
"... In addition to contributing a specification of Scheme, this paperpresents several novel modeling techniques for Felleisen Hieb-style rewriting semantics that we discovered while developing our R5RSScheme semantics. All are applicable to a wider range of problems than the specific uses we have for th ..."
Abstract
-
Cited by 13 (3 self)
- Add to MetaCart
In addition to contributing a specification of Scheme, this paperpresents several novel modeling techniques for Felleisen Hieb-style rewriting semantics that we discovered while developing our R5RSScheme semantics. All are applicable to a wider range of problems than the specific uses we have for them, and the fact that theycombine seamlessly in our full R5RS model shows that they scale to real languages. 1. Introduction The Revised5 Report on the Algorithmic Language Scheme [15],R5RS, provides an informal, English specification of Scheme and a denotational model of a core Scheme language. The denota-tional specification is more precise than the informal specification, but is also incomplete with respect to it. For instance, the formalspecification does not present the top-level mentioned throughout the informal specification, and is missing key procedures such asdynamic-wind and eval whose inclusion could have a significant impact on the formalism. While that is not necessarily a problem-- the measure of a model is not its completeness but its ability to clearly and accurately explain its subject-- Gasbichler et al's re-cent explanation of the difficulties involving dynamic contexts and threads [12], for instance, demonstrate that the formal model is in-sufficient for some important questions.
Inter-language reflection: A conceptual model and its implementation
- COMPUTER LANGUAGES, SYSTEMS & STRUCTURES
, 2006
"... Meta programming is the act of reasoning about a computational system. For example, a program in Prolog can reason about a program written in Smalltalk. Reflection is a more powerful form of meta programming where the same language is used to reason about, and act upon, itself in a causally connect ..."
Abstract
-
Cited by 12 (1 self)
- Add to MetaCart
Meta programming is the act of reasoning about a computational system. For example, a program in Prolog can reason about a program written in Smalltalk. Reflection is a more powerful form of meta programming where the same language is used to reason about, and act upon, itself in a causally connected way. Thus on the one hand we have meta programming that allows different languages or paradigms to be used, but without causal connection, while on the other hand we have reflection that offers causal connection but only for a single language. This paper combines both and presents inter-language reflection that allows one language to reason about and change in a causally connected way another language and vice versa. The fundamental aspects of inter-language reflection and the language symbiosis used therein, are discussed. Moreover the implementation of two symbiotic reflective languages is discussed: Agora/Java and SOUL/Smalltalk.
A Generic Reification Technique for Object-Oriented Reflective Languages
- Higher-Order and Symbolic Computation
, 2001
"... Computational reflection is gaining interest in practical applications as witnessed by the use of reflection in the JAVA programming environment and recent work on reflective middleware. Reflective systems offer many different reflection programming interfaces, the so-called MetaObject Protocols ..."
Abstract
-
Cited by 11 (2 self)
- Add to MetaCart
Computational reflection is gaining interest in practical applications as witnessed by the use of reflection in the JAVA programming environment and recent work on reflective middleware. Reflective systems offer many different reflection programming interfaces, the so-called MetaObject Protocols (MOPs). Their design is subject to a number of constraints relating to, among others, expressive power, efficiency and security properties. Since these constraints are different from one application to another, we should be able to easily provide specially-tailored MOPs. In this paper, we present a generic reification technique based on program transformation. It enables the selective reification of arbitrary parts of object-oriented metacircular interpreters. The program transformation can be applied to different interpreter definitions. Each resulting reflective implementation provides a different MOP directly derived from the original interpreter definition. Keywords: reflection, ...
Reflective Programming in the Relational Algebra
, 1993
"... This paper introduces a reflective extension of the relational algebra. Reflection is achieved by storing and manipulating relational algebra programs as relations and by adding a LISP-like evaluation operation to the algebra. We first show that this extension, which we call the reflective algeb ..."
Abstract
-
Cited by 11 (6 self)
- Add to MetaCart
This paper introduces a reflective extension of the relational algebra. Reflection is achieved by storing and manipulating relational algebra programs as relations and by adding a LISP-like evaluation operation to the algebra. We first show that this extension, which we call the reflective algebra, can serve as a unifying formalization of various forms of procedural data management which have been considered in database systems research. We then study the expressive power and complexity of the reflective algebra. In particular, we establish a close correspondence between reflection and bounded looping, and between tail-recursive reflection and unbounded looping. These correspondences yield new logical characterizations of PTIME and PSPACE. A preliminary version of this paper was presented at the Twelfth ACM Symposium on Principles of Database Systems (Washington, DC, May 1993). y Research Assistant of the Belgian National Fund for Scientific Research (NFWO). Address: Depa...
A Semantics of Introspection in a Reflective Prototype-Based Language
- LISP AND SYMBOLIC COMPUTATION
, 1996
"... In Malenfant et al. [19], we have described a reflective model for a prototypebased language based on the lookup ffi apply reflective introspection protocol. In this paper, we augment our previous protocol by converting it to handle continuations reified as first-class objects. First-class continu ..."
Abstract
-
Cited by 8 (3 self)
- Add to MetaCart
In Malenfant et al. [19], we have described a reflective model for a prototypebased language based on the lookup ffi apply reflective introspection protocol. In this paper, we augment our previous protocol by converting it to handle continuations reified as first-class objects. First-class continuations provide much more control over the current computation; during the introspection phase fired by message sending, they make it possible not only to change the behavior of the program for that message but also for the entire future computation. In this paper, we provide this introspection protocol with a formal semantics. This result is obtained by exhibiting a mapping \Delta from program configurations to priority rewrite systems (PRS) as well as a mapping from message expressions to ground first-order terms used to query the PRS. Other advantages of this approach are: to ensure the termination of the introspection using the smallest set of formally justified conditions and to provide ...
Macroexpansion Reflective Tower
- Proceedings of the Reflection’96 Conference
, 1996
"... Macros are reflective tools that operate on the representation of programs. Though having been used, and still being useful, for more than thirty years, their semantics and pragmatics are still unclear. This paper proposes a new model to understand the macroexpansion process; this model is based on ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
Macros are reflective tools that operate on the representation of programs. Though having been used, and still being useful, for more than thirty years, their semantics and pragmatics are still unclear. This paper proposes a new model to understand the macroexpansion process; this model is based on a reflective tower of macroexpansion engines. 1 Introduction Macros are definitely a forte of Lisp dialects. They confer upon the powerful users a means to adapt their language to their problems and this is, in our mind, one of the key reasons for Lisp's longevity. Despite the various attempts to standardize macros [Ste90, CR91b] and even if most of them are just quite simple abbreviations, they still represent one of the thorniest problems that occur when porting code between dialects of Lisp: a sure sign of their ambiguous nature. Even in Scheme, macros still have a dark side with respect to their scope, their extent and their meaning i.e., their definition language. This paper proposes a...
Towards a Theory of Reflective Programming Languages
- In Informal Proc. of the Third Workshop on Reflection and Metalevel Architectures in Object-Oriented Programming, OOPSLA'93
, 1993
"... This paper attempts to develop a better theoretical understanding of reflective systems. We begin by a developing a reflective extension of the v -calculus and define a simple operational semantics for it based on the infinite tower model described in [10]. We then develop an equational logic from t ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
This paper attempts to develop a better theoretical understanding of reflective systems. We begin by a developing a reflective extension of the v -calculus and define a simple operational semantics for it based on the infinite tower model described in [10]. We then develop an equational logic from this semantics. The resulting logic is shown to be weak because of reflective properties. We establish properties about this logic and show that it corresponds to the operational semantics. 1 Introduction Reflection was introduced by Smith [10] as a framework for language extension. He modeled this framework as an infinite tower of interpreters---each interpreter being just a program interpreted by the interpreter above it---with the user's program running at the lowest level. To be a little more explicit, the user program runs at level 0 by an interpreter, which is a program at level 1. This program in turn is interpreted by an identical program at level 2 and so on. Carrying this chain to ...
Standardization and Evaluation in Combinatory Reduction Systems
, 2000
"... A rewrite system has standardization i for any rewrite sequence there is an equivalent one which contracts the redexes in a standard order. Standardization is extremely useful for finding normalizing strategies and proving that a rewrite system for a programming language is sound with respect to the ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
A rewrite system has standardization i for any rewrite sequence there is an equivalent one which contracts the redexes in a standard order. Standardization is extremely useful for finding normalizing strategies and proving that a rewrite system for a programming language is sound with respect to the language's operational semantics. Although for some rewrite systems the standard-order can be simple, e.g., left-to-right or outermost-first, many systems need a more delicate order. There are abstract notions of standard order which always apply, but proofs (often quite dicult) are required that the rewrite system satis es a number of axioms and not much guidance is provided for finding a concrete order that satisfies the abstract definition. This paper gives a framework based on combinatory reduction systems (CRS's) which is general enough to handle many programming languages. If the CRS is orthogonal and fully extended and a good redex ordering can be found, then a standard order is obtain...

