Mirrors: design principles for meta-level facilities of object-oriented programming languages

We identify three design principles for reflection and metaprogramming facilities in object oriented programming languages. <i>Encapsulation</i>: meta-level facilities must encapsulate their implementation. <i>Stratification</i>: meta-level facilities must be separated from base-level functionality. <i>Ontological correspondence</i>: the ontology of meta-level facilities should correspond to the ontology of the language they manipulate. Traditional/mainstream reflective architectures do not follow these precepts. In contrast, reflective APIs built around the concept of <i>mirrors</i> are characterized by adherence to these three principles. Consequently, mirror-based architectures have significant advantages with respect to distribution, deployment and general purpose metaprogramming.

[1]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

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

[3]  David H. Lorenz,et al.  Pluggable reflection: decoupling meta-interface and implementation , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[4]  Ole Lehrmann Madsen,et al.  Object-oriented programming in the BETA programming language , 1993 .

[5]  Stephen N. Freund,et al.  Adding type parameterization to the Java language , 1997, OOPSLA '97.

[6]  Jack Trout,et al.  The Power Of Simplicity , 1998 .

[7]  Guy L. Steele,et al.  Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .

[8]  Jens Palsberg,et al.  Type inference of SELF: Analysis of objects with dynamic and multiple inheritance , 1995, Softw. Pract. Exp..

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

[10]  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.

[11]  Shigeru Chiba,et al.  A metaobject protocol for C++ , 1995, OOPSLA.

[12]  Gilad Bracha,et al.  Mixins in Strongtalk , 2002 .

[13]  James Noble,et al.  Reflections on remote reflection , 2001, Proceedings 24th Australian Computer Science Conference. ACSC 2001.

[14]  Søren Brandt,et al.  Dynamic Reflection for a Statically Typed Language , 1996 .

[15]  David M. Ungar Annotating objects for transport to other worlds , 1995, OOPSLA.

[16]  Roel Wuyts,et al.  A Logic Meta-Programming Approach to Support the Co-Evolution of Object-Oriented Design and Implementation , 2001 .

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

[18]  Michael J. Oudshoorn Proceedings of the 24th Australasian conference on Computer science , 2001 .

[19]  Roel Wuyts,et al.  Declarative reasoning about the structure of object-oriented systems , 1998, Proceedings. Technology of Object-Oriented Languages. TOOLS 26 (Cat. No.98EX176).

[20]  Simon L. Peyton Jones,et al.  Template meta-programming for Haskell , 2002, Haskell '02.

[21]  Randall B. Smith,et al.  Self: The power of simplicity , 1987, OOPSLA 1987.

[22]  Krzysztof Czarnecki,et al.  Generative Programming , 2001, ECOOP Workshops.

[23]  Stéphane Ducasse,et al.  Symbiotic Reflection between an Object-Oriented and a Logic Programming Language , 2001 .

[24]  Shigeru Chiba,et al.  OpenJava: A Class-Based Macro System for Java , 1999, Reflection and Software Engineering.

[25]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[26]  Hanspeter Mössenböck,et al.  The Oberon-2 Reflection Model and Its Applications , 1999, Reflection.

[27]  Shigeru Chiba Macro processing in object-oriented languages , 1998, Proceedings Technology of Object-Oriented Languages. TOOLS 28 (Cat. No.98TB100271).

[28]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

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

[30]  Sheng Liang,et al.  Dynamic class loading in the Java virtual machine , 1998, OOPSLA '98.