OpenJava: A Class-Based Macro System for Java

This paper presents OpenJava, which is a macro system that we have developed for Java. With traditional macro systems designed for non object-oriented languages, it is difficult to write a number of macros typical in object-oriented programming since they require the ability to access a logical structure of programs. One of the drawbacks of traditional macro systems is that abstract syntax trees are used for representing source programs. This paper first points out this problem and then shows how OpenJava addresses this problem. A key idea of Open-Java is to use metaobjects, which was originally developed for reflective computing, for representing source programs.

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

[2]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[3]  MaesPattie Concepts and experiments in computational reflection , 1987 .

[4]  James O. Coplien,et al.  Pattern languages of program design , 1995 .

[5]  Jr. Guy L. Steele,et al.  Common LISP: the language (2nd ed.) , 1990 .

[6]  Guy L. Steele,et al.  Common Lisp the Language , 1984 .

[7]  Pierre Cointe Metaclasses are First Class: the ObjVlisp Model , 1987, OOPSLA.

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

[9]  Daniel Weise,et al.  Programmable syntax macros , 1993, PLDI '93.

[10]  Pierre Cointe Metaclasses are first class: The ObjVlisp Model , 1987, OOPSLA 1987.

[11]  Jan Bosch,et al.  Design Patterns as Language Constructs , 1998, J. Object Oriented Program..

[12]  William Maddox Semantically-Sensitive Macroprocessing , 1989 .

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

[14]  Mitsuhisa Sato,et al.  Design and Implementation of Metalevel Architecture in C++ -- MPC++ Approach -- , 1998 .

[15]  Jiri Soukup,et al.  Implementing patterns , 1995 .

[16]  Peter J. Brown,et al.  Macroprocessors and Techniques for Portable Software , 1974 .

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

[18]  Joseph Gil,et al.  Design Patterns and Language Design , 1998, Computer.

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

[20]  J. Christopher Ramming,et al.  A*: A Language for Implementing Language Processors , 1995, IEEE Trans. Software Eng..

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

[22]  J. Christopher Ramming,et al.  A*: a language for implementing language processors , 1994, Proceedings of 1994 IEEE International Conference on Computer Languages (ICCL'94).

[23]  Yves Roudier,et al.  The Extensible Java Preprocessor Kit and a Tiny Data-Parallel Java , 1997, ISCOPE.