Results 1 - 10
of
23
Reflection in logic, functional and object-oriented programming: a Short Comparative Study
- In IJCAI '95 Workshop on Reflection and Metalevel Architectures and their Applications in AI
, 1995
"... Reflection is a wide-ranging concept that has been studied independently in many different areas of science in general, and computer science in particular. Even in the sub-area of programming languages, it has been applied to different paradigms, especially the logic, functional and objectoriented o ..."
Abstract
-
Cited by 31 (1 self)
- Add to MetaCart
Reflection is a wide-ranging concept that has been studied independently in many different areas of science in general, and computer science in particular. Even in the sub-area of programming languages, it has been applied to different paradigms, especially the logic, functional and objectoriented ones. Partly because of different past influences, but also because researchers in these communities scarcely talk to each others, concepts have evolved separately, sometimes to the point where it is hard for people in one community to recognize similarities in the work of others, not to speak about cross-fertilization among them. In this paper, we propose a synthesis covering mainly the application of computation reflection to programming languages. We compare the different approaches and try to identify similar concepts hidden behind different names or constructs. We also point out the different emphasis that has been given to different concepts in each of them. We do not claim neither comp...
The Theory of Fexprs is Trivial
, 1998
"... . We provide a very simple model of a reflective facility based on the pure -calculus, and we show that its theory of contextual equivalence is trivial: two terms in the language are contextually equivalent iff they are ff-congruent. 1. Introduction The thesis of much of programming language seman ..."
Abstract
-
Cited by 18 (0 self)
- Add to MetaCart
. We provide a very simple model of a reflective facility based on the pure -calculus, and we show that its theory of contextual equivalence is trivial: two terms in the language are contextually equivalent iff they are ff-congruent. 1. Introduction The thesis of much of programming language semantics is that the fundamental question about a programming language is its notion of contextual equivalence: which pairs of phrases (M; N) have the property that M and N may be freely substituted for each other in any program context, without changing the behavior of the resulting program [10, 14]. This is a key notion because, for example, any source-to-source optimization in a compiler (except possibly for a whole-program transformation) should produce a term contextually equivalent to the original. In this note, we provide a very simple model of a reflective facility based on the pure -calculus, and we show that its theory of contextual equivalence is trivial: two terms in the language ar...
Duplication and Partial Evaluation -- For a Better Understanding of Reflective Languages
, 1996
"... This paper presents a general implementation framework for reflective languages. It allows us to systematically build reflective languages which have the following favorable properties: (1) user programs are allowed to access and change (parts of) metalevel interpreters, (2) reflective facilities a ..."
Abstract
-
Cited by 13 (6 self)
- Add to MetaCart
This paper presents a general implementation framework for reflective languages. It allows us to systematically build reflective languages which have the following favorable properties: (1) user programs are allowed to access and change (parts of) metalevel interpreters, (2) reflective facilities are available at every level, (hence there exists conceptually an infinite tower of interpreters), and (3) the interpreter runs as efficiently as the conventional (directly implemented) metacircular interpreter when reflection is not used. Our scheme is divided into three stages. First, we define interpreters which give the operational semantics of each level, and conceptually construct the infinite tower of these interpreters. They are then duplicated to obtain directly executed interpreters, while introducing double interpretation to maintain redefinability of interpreters. Finally, partial evaluation is employed to collapse the double interpretation into single interpretation. We illustrate our scheme by implementing a particular reflective language called Black in Scheme, but it is general enough to be applied to other reflective languages. The paper gives the complete Scheme implementation of Black and demonstrates some examples. We also show how a system with the delta abstraction introduced by Blond can be constructed in our framework.
An Introduction to Reflection-Oriented Programming
, 1996
"... Most accounts of reflection are in an interpreted framework and tend to assume the availability of particular pieces of the state of a program's interpretation, including the current source code expression. This paper presents a computational account of reflection, drawing a distinction between the ..."
Abstract
-
Cited by 10 (0 self)
- Add to MetaCart
Most accounts of reflection are in an interpreted framework and tend to assume the availability of particular pieces of the state of a program's interpretation, including the current source code expression. This paper presents a computational account of reflection, drawing a distinction between the meta-level manipulation of data or control and the mere availability of meta-circular implementation details. In particular, this account does not presume the existence of program source code at runtime. The paper introduces a programming paradigm that relies on reflective language features and draws on the power of object-oriented programming. Several examples of the use of these features are provided, along with an explanation of a translation-based implementation. The examples include the measurement of computational expense, the introduction of first-class continuations, and the modification of the semantics of expressed values, all in the framework of reflection-oriented programming....
Definition of a Reflective Kernel for a Prototype-Based Language
, 1993
"... We present the implementation of Moostrap, a reflective prototype-based language, the interpreter of which is written in Scheme. Moostrap is based on a reduced number of primitives, according to a previous work for defining a taxonomy for prototype-based languages. Our purpose is to reify the be ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
We present the implementation of Moostrap, a reflective prototype-based language, the interpreter of which is written in Scheme. Moostrap is based on a reduced number of primitives, according to a previous work for defining a taxonomy for prototype-based languages. Our purpose is to reify the behavior of any object through two steps: the slot lookup and its application. The first phase is reified thanks to behavioral metaobjects, and the second is managed by special objects, called slot-executants. This kernel does not handle any implicit delegation at first. However, we introduce it, as a first extension of the basic language using a new behavioral meta-object. Keywords: Prototype, Reflection, Primitive, Slot, Creation, Cloning, Delegation, Extensibility, Behavior, Meta-Object, Self, Smalltalk, Scheme. 1 Introduction Our general area of research is the study of reflection in object-oriented languages (OOLs). We have previously defined a model of behavioral reflection expre...
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 ...
Behavioral Reflection in a Prototype-Based Language
- Proceedings of International Workshop on Reflection and Meta-Level Architectures
"... In [MCD92], we have contributed a reflective model for a prototype-based language based on the lookup ffi apply reflective introspection protocol. Here, we pursue this work by including a reification of continuations. Hence, we provide continuations as first-class objects and convert our previous pr ..."
Abstract
-
Cited by 8 (2 self)
- Add to MetaCart
In [MCD92], we have contributed a reflective model for a prototype-based language based on the lookup ffi apply reflective introspection protocol. Here, we pursue this work by including a reification of continuations. Hence, we provide continuations as first-class objects and convert our previous protocol to handle them. First-class continuations provide much more control over the current computation. Also, this new model establishes the clear link between reflection in object-oriented and reflective towers as examplified by 3Lisp [Smi84]. Object-orientedness provides reflection a more principled and encapsulated programming style, making it easier to use. In this paper, we establish the correctness of this new model, namely that any message in the system will be executed in a finite number of computation steps. This fact is based on a limited number of hypothesis independent from the implementation but from which we derive fundamental clues to derive an evaluator for the language. 1 ...
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 ...
The STROBE model: Dynamic Service Generation on the Grid
- Applied Artificial Intelligence, Special issue on Learning Grid Services
, 2005
"... This article presents the STROBE model: both an agent representation and an agent communication model based on a social approach, that means interaction centred. This model represents how agents may realise the interactive, dynamic generation of services on the Grid. Dynamically generated services e ..."
Abstract
-
Cited by 5 (2 self)
- Add to MetaCart
This article presents the STROBE model: both an agent representation and an agent communication model based on a social approach, that means interaction centred. This model represents how agents may realise the interactive, dynamic generation of services on the Grid. Dynamically generated services embody a new concept of service implying a collaborative creation of knowledge i.e. learning; services are constructed interactively between agents depending on a conversation. The approach consists of integrating selected features from Multi-Agent Systems and agent communication, language interpretation in applicative/functional programming and e-learning/human-learning into a unique, original and simple view that privileges interactions, yet including control. The main characteristic of STROBE agents is that they develop a language (environment + interpreter) for each of their interlocutors. The model is inscribed within a global approach, defending a shift from the classical algorithmic (control based) view to problem solving in computing to an interaction-based view of Social Informatics, where artificial as well as human agents operate by communicating as well as by computing. The paper shows how the model may not only account for the classical communicating agent approaches, but also represent a fundamental advance in modelling societies of agents in particular in Dynamic Service Generation scenarios such as those necessary today on the Web and proposed tomorrow for the Grid. Preliminary concrete experimentations illustrate the potential of the model; they are significant examples for a very wide class of computational and learning situations.
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.

