An Extension Mechanism for the Java Language

This thesis presents the design and implementation of an extensible dialect of the Java language, named OpenJava. Although the Java language is well polished and dedicated to cover applications of a wide range of computational domain, it still lacks some mechanisms necessary for typical kinds of applications. Our OpenJava enables programmers to extend the Java language and implement such mechanisms on demand. It is an advanced macro processor based on the technique called compile-time re ection. In this thesis, rst, the problems of traditional compile-time re ection systems are pointed out; with those systems, it is di cult to write meta-level programs. Those re ective systems are not suitable for macro processing which are non-local, scattered, and spreaded in source programs, although such macro processing are typical in object-oriented languages. Also, those re ective systems do not provide su cient supports of using di erent extensions together. Then this thesis proposes a new compile-time re ection system for OpenJava. With OpenJava, translation of source code is indirectly performed through an abstract data structure called metaobjects. This data structure gives meta programmers an intuitive view in object orientation. Meta programmers in OpenJava can describe extensions of the base Java language more intuitively and safely than in traditional re ective systems. Finally, several examples are presented to show the good usability of OpenJava.

[1]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

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

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

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

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

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

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

[8]  Ronald Morrison,et al.  Linguistic reflection in Java , 1998 .

[9]  Robert Cartwright,et al.  Compatible genericity with run-time types for the Java programming language , 1998, OOPSLA '98.

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

[11]  Michael Golm,et al.  MetaJava - A Platform for Adaptable Operating-System Mechanisms , 1997, ECOOP Workshops.

[12]  Serge Demeyer,et al.  Making design patterns explicit in FACE: a frame work adaptive composition environment , 1997, ESEC '97/FSE-5.

[13]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

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

[15]  Shigeru Chiba,et al.  Yet Another java.lang.Class , 1998, ECOOP Workshops.

[16]  Pierre Cointe,et al.  Programming with Explicit Metaclasses in Smalltalk-80 , 1989, OOPSLA.

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

[18]  Michiaki Tatsubori,et al.  Programming Support of Design Patterns with Compile-time Reflection , 2000 .

[19]  Peter Sommerlad,et al.  Automated support for software development with frameworks , 1995, SSR '95.

[20]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[21]  Troy Downing,et al.  Java Virtual Machine , 1997 .

[22]  Shigeru Chiba,et al.  Avoiding Confusion in Metacircularity: The Meta-Helix , 1996, ISOTAS.

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

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

[25]  Olivier Danvy,et al.  Tutorial notes on partial evaluation , 1993, POPL '93.

[26]  Hirano Satoshi HORB: Distributed Execution of Java Programs , 1997 .

[27]  Jan Bosch,et al.  Language Support for Design Patterns , 1996 .

[28]  Jean-Pierre Briot,et al.  Programming with explicit metaclasses in Smalltalk-80 , 1989, OOPSLA 1989.

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

[30]  Henri E. Bal,et al.  Programming languages for distributed computing systems , 1989, CSUR.

[31]  P ? ? ? ? ? ? ? % ? ? ? ? , 1991 .

[32]  Satoshi Matsuoka,et al.  Compiling away the meta-level in object-oriented concurrent reflective languages using partial evaluation , 1995, OOPSLA.