Sub-Method Reflection

Reflection has proved to be a powerful feature to support the design of development environments and to extend languages. However, the granularity of structural reflection stops at the method level. This is a problem since without sub-method reflection developers have to duplicate efforts, for example to introduce transparently pluggable type-checkers or fine-grained profilers. In this paper we present Persephone, an efficient implementation of a sub-method meta-object protocol (MOP) based on AST annotations and dual methods (a compiled method and its meta-object) that reconcile AST expressiveness with bytecode execution. We validate the MOP by presenting TreeNurse, a method instrumentation framework and TypePlug, an optional, pluggable type system which is based on Persephone.

[1]  S. Meyers Difficulties in integrating multiview development systems , 1991, IEEE Software.

[2]  Paul L. McCullough Transparent forwarding: First steps , 1987, OOPSLA '87.

[3]  Ralph E. Johnson,et al.  Reflective facilities in Smalltalk-80 , 1989, OOPSLA '89.

[4]  Adele Goldberg,et al.  SmallTalk 80: The Language , 1989 .

[5]  Jürgen Herczeg,et al.  What tracers are made of , 1990, OOPSLA/ECOOP '90.

[6]  John K. Bennett,et al.  The design and implementation of distributed Smalltalk , 1987, OOPSLA '87.

[7]  P. Marschall Persephone: Taking Smalltalk reflection to the sub - method level , 2006 .

[8]  Jonathan Edwards,et al.  Subtext: uncovering the simplicity of programming , 2005, OOPSLA '05.

[9]  Mario Tokoro,et al.  Experience and Evolution of ConcurrentSmalltalk , 1987, OOPSLA.

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

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

[12]  Steve Dekorte,et al.  Io: a small programming language , 2005, OOPSLA '05.

[13]  M. Eiler Perspectives on software , 1992 .

[14]  Éric Tanter An Extensible Kernel Language for AOP , 2006 .

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

[16]  Renaud Pawlak Spoon: annotation-driven program transformation --- the AOP case , 2005, AOMD '05.

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

[18]  Gilad Bracha Pluggable Type Systems , 2004 .

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

[20]  Andrew P. Black,et al.  A pattern language for extensible program representation , 2006, PLoP '06.

[21]  Éric Tanter,et al.  A versatile kernel for multi-language AOP , 2005, GPCE'05.

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

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

[24]  Mireille Ducassé,et al.  Using events to debug Java programs backwards in time , 2003, OOPSLA '03.

[25]  John Maloney,et al.  Back to the Future The Story of Squeak, A Practical Smalltalk Written in Itself , 1997 .

[26]  Wilf R. LaLonde,et al.  Building a backtracking facility in smalltalk without kernel support , 1988, OOPSLA '88.

[27]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[28]  S. Dmitriev Language Oriented Programming: The Next Programming Paradigm , 2004 .

[29]  Michael Franz,et al.  Slim binaries , 1997, CACM.

[30]  Marcus Denker,et al.  Unanticipated Partial Behavioral Reflection , 2006, ISC.

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

[32]  Geoffrey A. Pascoe Encapsulators: A New Software Paradigm in Smalltalk-80 , 1986, OOPSLA.

[33]  Alan Borning,et al.  Multiple Inheritance in Smalltalk-BO , 1982, AAAI.

[34]  Richard P. Gabriel,et al.  CLOS in context: the shape of the design space , 1993 .

[35]  Oscar Nierstrasz,et al.  Classboxes: controlling visibility of class extensions , 2005, Comput. Lang. Syst. Struct..

[36]  Mario Tokoro,et al.  Experience and evolution of concurrent Smalltalk , 1987, OOPSLA 1987.

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

[38]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[39]  Jean-Pierre Briot,et al.  Actalk: A Testbed for Classifying and Designing Actor Languages in the Smalltalk-80 Environment , 1989, ECOOP.

[40]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.