Mirror-based Reflection in Ambienttalk †

This paper introduces a novel mechanism to perform intercession (a form of reflection) in an object‐oriented programming language with the goal of making the language extensible from within itself. The proposed mechanism builds upon a mirror‐based architecture, leading to a reusable reflective application programming interface that cleanly separates interface from implementation details. However, support for intercession has been limited in contemporary mirror‐based architectures. This is due to the fact that mirror‐based architectures only support reflection explicitly triggered by metaprograms, while intercession requires reflection implicitly triggered by the language interpreter. This work reconciles mirrors with intercession in the context of an actor‐based, object‐oriented programming language named AmbientTalk. We describe this language's full reflective architecture, highlighting its novel mirror‐based approach to reflect upon both objects and concurrently executing actors. Subsequently, we apply AmbientTalk's mirror‐based reflection to implement two language features, which crucially depend on intercession, to wit future‐type message passing and leased object references. Copyright © 2008 John Wiley & Sons, Ltd.

[1]  Brian Cantwell Smith,et al.  Reflection and semantics in LISP , 1984, POPL.

[2]  Gul A. Agha,et al.  ACTORS - a model of concurrent computation in distributed systems , 1985, MIT Press series in artificial intelligence.

[3]  Norman Meyrowitz,et al.  Conference proceedings on Object-oriented programming systems, languages, and applications , 1986, OOPSLA 1987.

[4]  Akinori Yonezawa,et al.  Object-oriented concurrent programming ABCL/1 , 1986, OOPLSA '86.

[5]  Henry Lieberman,et al.  Using prototypical objects to implement shared behavior in object-oriented systems , 1986, OOPLSA '86.

[6]  Randall B. Smith,et al.  SELF: The power of simplicity , 1987, OOPSLA '87.

[7]  Pattie Maes,et al.  Concepts and experiments in computational reflection , 1987, OOPSLA '87.

[8]  Akinori Yonezawa,et al.  Reflection in an object-oriented concurrent language , 1988, OOPSLA 1988.

[9]  Akinori Yonezawa,et al.  Reflection in an object-oriented concurrent language , 1988, OOPSLA '88.

[10]  Jacques Ferber Computational reflection in class based object-oriented languages , 1989, OOPSLA 1989.

[11]  David R. Cheriton,et al.  Leases: an efficient fault-tolerant mechanism for distributed file cache consistency , 1989, SOSP '89.

[12]  Jacques Ferber,et al.  Computational reflection in class based object-oriented languages , 1989, OOPSLA '89.

[13]  Mario Tokoro,et al.  Al-1/d: a distributed programming system with multi-model reflection framework , 1992 .

[14]  Daniel G. Bobrow,et al.  Book review: The Art of the MetaObject Protocol By Gregor Kiczales, Jim des Rivieres, Daniel G. and Bobrow(MIT Press, 1991) , 1991, SGAR.

[15]  Gilad Bracha,et al.  Strongtalk: typechecking Smalltalk in a production environment , 1993, OOPSLA '93.

[16]  Andreas Paepcke,et al.  User-level language crafting: introducing the CLOS metaobject protocol , 1993 .

[17]  Pierre Cointe,et al.  Towards a methodology for explicit composition of metaobjects , 1995, OOPSLA.

[18]  Jee Mcaaer Meta-level Programming with Coda , 1995 .

[19]  Ralph E. Johnson,et al.  Wrappers to the Rescue , 1998, ECOOP.

[20]  Guy L. Steele,et al.  Growing a Language , 1999, High. Order Symb. Comput..

[21]  Stéphane Ducasse,et al.  Evaluating Message Passing Control Techniques in Smalltalk , 1999 .

[22]  Mark S. Miller,et al.  Capability-Based Financial Instruments , 2000, Financial Cryptography.

[23]  J. van Leeuwen,et al.  Meta-Level Architectures and Reflection , 2001, Lecture Notes in Computer Science.

[24]  Cecilia Mascolo,et al.  Mobile Computing Middleware , 2002, NETWORKING Tutorials.

[25]  Muga Nishizawa,et al.  An Easy-to-Use Toolkit for Efficient Java Bytecode Translators , 2003, GPCE.

[26]  D. Caromel,et al.  Partial behavioral reflection: spatial and temporal selection of reification , 2003, OOPSLA '03.

[27]  Gilad Bracha,et al.  Mirrors: design principles for meta-level facilities of object-oriented programming languages , 2004, OOPSLA.

[28]  Gail C. Murphy,et al.  Proceedings of the 3rd international conference on Aspect-oriented software development , 2004 .

[29]  Jim Hugunin,et al.  Advice weaving in AspectJ , 2004, AOSD '04.

[30]  Michael Haupt,et al.  Virtual machine support for dynamic join points , 2004, AOSD '04.

[31]  Jonathan S. Shapiro,et al.  Concurrency among strangers: programming in E as plan coordination , 2005 .

[32]  Theo D'Hondt,et al.  Ambient-oriented programming in ambientTalk , 2005, OOPSLA '05.

[33]  Stéphane Ducasse,et al.  Runtime bytecode transformation for Smalltalk , 2006, Comput. Lang. Syst. Struct..

[34]  Éric Tanter,et al.  Mirages: behavioral intercession in a mirror-based architecture , 2007, DLS '07.

[35]  Jessie Dedecker,et al.  AmbientTalk: Object-oriented Event-driven Programming in Mobile Ad hoc Networks , 2007, XXVI International Conference of the Chilean Society of Computer Science (SCCC'07).

[36]  Marcus Denker,et al.  Unanticipated partial behavioral reflection: Adapting applications at runtime , 2008, Comput. Lang. Syst. Struct..