Results 1 - 10
of
10
MetaML and Multi-Stage Programming with Explicit Annotations
- Theoretical Computer Science
, 1999
"... . We introduce MetaML, a practically-motivated, staticallytyped multi-stage programming language. MetaML is a "real" language. We have built an implementation and used it to solve multi-stage problems. MetaML allows the programmer to construct, combine, and execute code fragments in a type-safe ..."
Abstract
-
Cited by 201 (30 self)
- Add to MetaCart
. We introduce MetaML, a practically-motivated, staticallytyped multi-stage programming language. MetaML is a "real" language. We have built an implementation and used it to solve multi-stage problems. MetaML allows the programmer to construct, combine, and execute code fragments in a type-safe manner. Code fragments can contain free variables, but they obey the static-scoping principle. MetaML performs typechecking for all stages once and for all before the execution of the first stage. Certain anomalies with our first MetaML implementation led us to formalize an illustrative subset of the MetaML implementation. We present both a big-step semantics and type system for this subset, and prove the type system's soundness with respect to a big-step semantics. From a software engineering point of view, this means that generators written in the MetaML subset never generate unsafe programs. A type system and semantics for full MetaML is still ongoing work. We argue that multi-...
Metatheory and Reflection in Theorem Proving: A Survey and Critique
, 1995
"... One way to ensure correctness of the inference performed by computer theorem provers is to force all proofs to be done step by step in a simple, more or less traditional, deductive system. Using techniques pioneered in Edinburgh LCF, this can be made palatable. However, some believe such an appro ..."
Abstract
-
Cited by 46 (2 self)
- Add to MetaCart
One way to ensure correctness of the inference performed by computer theorem provers is to force all proofs to be done step by step in a simple, more or less traditional, deductive system. Using techniques pioneered in Edinburgh LCF, this can be made palatable. However, some believe such an approach will never be efficient enough for large, complex proofs. One alternative, commonly called reflection, is to analyze proofs using a second layer of logic, a metalogic, and so justify abbreviating or simplifying proofs, making the kinds of shortcuts humans often do or appealing to specialized decision algorithms. In this paper we contrast the fully-expansive LCF approach with the use of reflection. We put forward arguments to suggest that the inadequacy of the LCF approach has not been adequately demonstrated, and neither has the practical utility of reflection (notwithstanding its undoubted intellectual interest). The LCF system with which we are most concerned is the HOL proof ...
Language Features for Re-use and Extensibility in Concurrent Object-Oriented Programming Languages
, 1993
"... ..."
Towards Partial Evaluation of Full Scheme
- Reflection 96
, 1996
"... We present a binding-time analysis for Scheme which enables an offline partial evaluator to successfully treat Scheme's reflective features eval, apply, and the control operator call/cc. Additionally, our analysis empowers the specializer to select the most efficient representation for each object. ..."
Abstract
-
Cited by 12 (4 self)
- Add to MetaCart
We present a binding-time analysis for Scheme which enables an offline partial evaluator to successfully treat Scheme's reflective features eval, apply, and the control operator call/cc. Additionally, our analysis empowers the specializer to select the most efficient representation for each object. This removes some limitations of previous specializers regarding the use of higher-order functions. The theoretical development is backed by an implementation. Keywords: partial evaluation of reflective language features, meta-computation The programming language Scheme [20] is an ideal vehicle for meta-computation, specifically for partial evaluation. Part of the appropriateness of Scheme for meta-computation tasks derives from its reflective features: eval [27], which reflects the external representation of, say, a procedure to a functional value, apply, which reflects lists to argument lists, and call/cc 1 , which makes the continuation of the current expression available as a proced...
Architecture Design and Compilation Techniques Using Partial Evaulation in Reflective Concurrent Object-Oriented Languages
, 1999
"... Parallel and distributed programs often have hardware/problem specific optimizations for improving quality of the program such as efficiency and robustness. Those optimizations, unfortunately, degrade portability and re-usability as they are intertwined with the original algorithm description. Refle ..."
Abstract
-
Cited by 4 (4 self)
- Add to MetaCart
Parallel and distributed programs often have hardware/problem specific optimizations for improving quality of the program such as efficiency and robustness. Those optimizations, unfortunately, degrade portability and re-usability as they are intertwined with the original algorithm description. Reflective languages, which provide the application programmer extensible and abstract implementation of the language, can describe such optimizations as extensions to the language. The separation of optimization descriptions gains portability and re-usability of both application programs and optimizations. However, the interpretive execution model of reflective languages imposes a large amount of performance overhead, which sometimes outweighs benefits of optimizations. Previous reflective languages prohibit some of operations being modified via reflection, so as to reduce the amount of interpretation overhead. The imperfection of this approach is that it still leaves a considerable amount of overhead, and it yields less flexible, unclear reflective architecture. This dissertation investigates design and compilation framework of meta-interpreters and meta-objects in an object-oriented concurrent language ABCL/R3. By using partial evaluation to compile reflective programs, ABCL/R3 achieves flexible and lucid reflective architecture and efficient execution at the same time. We design full-fledged meta-interpreters by examining several concurrent programming examples. A newly proposed delegation mechanism enables to define modular and scope controlled extensions to meta-interpreters. We design meta-objects by exploiting the notion of reader/writer methods in a concurrent object-oriented language Schematic, so that they can be effectively partially evaluated. The compilation frameworks of meta-interpreters and meta-objects basically translate concurrent object definitions into a sequential program, then apply partial evaluator for a sequential language, and generates a program in a (non-reflective) concurrent object-oriented language, in which base-level and meta-level objects are collapsed to single level objects. The efficiency of generated programs is demonstrated by several benchmark programs, in which our compiler exhibits performance close to non-reflective languages.
Combining Semantics with Non-Standard Interpreter Hierarchies
- Foundations of Software Technology and Theoretical Computer Science. Proceedings, LNCS 1974
, 2000
"... . This paper reports on results concerning the combination of non-standard semantics via interpreters. We define what a semantics combination means and identify under which conditions a combination can be realized by computer programs (robustness, safely combinable). We develop the underlying mathem ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
. This paper reports on results concerning the combination of non-standard semantics via interpreters. We define what a semantics combination means and identify under which conditions a combination can be realized by computer programs (robustness, safely combinable). We develop the underlying mathematical theory and examine the meaning of several non-standard interpreter towers. Our results suggest a technique for the implementation of a certain class of programming language dialects by composing a hierarchy of non-standard interpreters. 1 Introduction The definition of programming language semantics from simpler, more elementary parts is an intriguing question [6, 11, 17, 18]. This paper reports on new results concerning the combination of semantics via non-standard interpreters. Instead of using the familiar tower of interpreters [13] for implementing the standard semantics of a programming language, we generalize this idea to implement the non-standard semantics of a programming la...
From Standard To Non-Standard Semantics By Semantics Modifiers
, 2001
"... An approach for systematically modifying the semantics of programming languages by semantics modifiers is described. Semantics modifiers are a class of programs that allow the development of general and reusable "semantics components". Language independence is achieved through the interpretive ap ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
An approach for systematically modifying the semantics of programming languages by semantics modifiers is described. Semantics modifiers are a class of programs that allow the development of general and reusable "semantics components". Language independence is achieved through the interpretive approach: an interpreter serves as a mediator between the new language and the language for which the non-standard semantics was implemented. Inverse computation, equivalence transformation and neighborhood analysis are shown to be semantics modifiers. Experiments with these modifiers show the computational feasibility of this approach. Seven modifier projections are given which allow the e#cient implementation of non-standard interpreters and non-standard compilers by program specialization or other powerful program transformation methods.
Partial Evaluator as a Compiler for Reflective Languages
, 1995
"... This paper presents an online partial evaluator with a mechanism to handle I/O-type side-effects using preactions, and reports our experiment of using the partial evaluator as a compiler for the reflective language Black we are designing. Black is a Scheme-based reflective language, which allows use ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
This paper presents an online partial evaluator with a mechanism to handle I/O-type side-effects using preactions, and reports our experiment of using the partial evaluator as a compiler for the reflective language Black we are designing. Black is a Scheme-based reflective language, which allows user programs to access and modify its metalevel interpreter (or the language semantics) from within the same language framework. Because the semantics may change during computation, it is impossible to compile using a conventional Scheme compiler. To cope with this flexibility, we implemented an online partial evaluator, and specialized a Scheme meta-circular interpreter with respect to a modified interpreter to obtain an efficient version of the modified interpreter. The resulting interpreter turns out to be quite efficient in that it is almost identical to the original Scheme interpreter, except that it correctly reflects the modification made by users. In fact, we got more: by supplying a s...
Roles of a Partial Evaluator for the Reflective Language Black
"... A reflective language allows us to access its interpreter to dynamically modify or extend the language semantics from within the same language. In the previous paper, we implemented a reflective language called Black, and showed that a directly executable interpreter can be implemented by duplicatin ..."
Abstract
- Add to MetaCart
A reflective language allows us to access its interpreter to dynamically modify or extend the language semantics from within the same language. In the previous paper, we implemented a reflective language called Black, and showed that a directly executable interpreter can be implemented by duplicating and partially evaluating the metalevel interpreters without losing changeability. In this paper, we will concentrate on the partial evaluator and show that it can be used not only to construct the default reflective interpreter but also as a compiler of reflective languages. Since the language semantics may change in reflective languages, we cannot use a specific compiler; instead, we use the partial evaluator, which can take the semantics of the language into account. ANY OTHER IDENTIFYING INFORMATION OF THIS REPORT DISTRIBUTION STATEMENT First issue 35 copies. SUPPLEMENTARY NOTES REPORT DATE May 25, 1994 TOTAL NO. OF PAGES 10 WRITTEN LANGUAGE English NO. OF REFERENCES 9 DEPARTME...
Hidehiko Masuhara Satoshi Matsuoka Takuo Watanabe
"... Computational reflection is beneficial in concurrent computing in offering a linguistic mechanism for incorporating user-specific policies. New challenges are (1) how to implement them, and (2) how to do so efficiently. We present efficient implementation schemes for object-oriented concurrent refle ..."
Abstract
- Add to MetaCart
Computational reflection is beneficial in concurrent computing in offering a linguistic mechanism for incorporating user-specific policies. New challenges are (1) how to implement them, and (2) how to do so efficiently. We present efficient implementation schemes for object-oriented concurrent reflective languages using our language ABCL/R2 as an example. The schemes include: efficient lazy creation of metaobjects/meta-groups, partial compilation of scripts (methods), dynamic progression, self-reification, and light-weight objects, all appropriately integrated so that the user-level semantics remain consistent with the meta-circular definition so that the full power of reflection is retained, while achieving practical efficiency. ABCL/R2 exhibits two orders of magnitude speed improvement over its predecessor, ABCL/R, and in fact compares favorably to the ABCL/1 compiler and also C + Sun LWP, neither supporting reflection. 3 To be presented at ACM OOPSLA'92, Vancouver, Canada, Oct. 19...

