Exploiting Reflection to Add Persistence and Query Optimization to a Statically Typed Object-Oriented Language

It is popular and appealing to design and construct a persistent programming language by extending the semantics of a non-persistent language appropriately and then modifying its compiler and run-time system to implement the extended semantics. We describe here how to achieve this, and furthermore, how to support query optimization, which is typically neglected in persistent programming language implementations, through judicious exploitation of reflection. Significantly, we avoid modifying the structure of the source language or its compiler in any way, and minimize and localize the modifications to the run-time system. We work in the context of the Java programming language, and conclude that the key features required in our approach are: a typed intermediate representation (as provided by Java class files), reflection supporting code inspection (an extension to the standard Java virtual machine), and dynamic loading of code generated at run-time. We also require virtual machine extensions to support read and write barriers and to trigger our reflective optimization and code generation. Further, we argue that optimization at the reflective level can remove much of the overhead of the read and write barriers.

[1]  Daniel F. Lieuwen,et al.  Optimizing and Parallelizing Loops in Object-Oriented Database Programming Languages , 1992 .

[2]  Malcolm P. Atkinson,et al.  An orthogonally persistent Java , 1996, SGMD.

[3]  Robert J. Stroud,et al.  Implementing fault tolerant applications using reflective object-oriented programming , 1995, Twenty-Fifth International Symposium on Fault-Tolerant Computing. Digest of Papers.

[4]  Michael J. Carey,et al.  The design of the E programming language , 1993, TOPL.

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

[6]  Patrick Sobalvarro,et al.  A Lifetime-based Garbage Collector for LISP Systems on General- Purpose Computers , 1988 .

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

[8]  David M. Ungar,et al.  Generation Scavenging: A non-disruptive high performance storage reclamation algorithm , 1984, SDE 1.

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

[10]  Ronald Morrison,et al.  Linguistic reflection in Java : a quantitative assessment , 1998 .

[11]  Stephen M. Blackburn,et al.  Java Finalize Method, Orthogonal Persistence and Transactions , 1998, POS/PJW.

[12]  Quintin I. Cutts,et al.  Optimizing the Read and Write Barriers for Orthogonal Persistence , 1998, POS/PJW.

[13]  J. Eliot B. Moss,et al.  Design of the Mneme persistent object store , 1990, TOIS.

[14]  Antony L. Hosking,et al.  Lightweight support for fine-grained persistence of stock hardware , 1995 .

[15]  Robert J. Stroud,et al.  Using Metaobject Protocols to Implement Atomic Data Types , 1995, ECOOP.

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

[17]  Ronald Morrison,et al.  Linguistic reflection in Java , 1998, Softw. Pract. Exp..

[18]  D. Stemple,et al.  Integrating Reflection, Strong Typing and Static Checking , 1997 .

[19]  Richard C. H. Connor,et al.  Type-Safe Linguistic Reflection: A Generator Technology , 2000 .