Load-Time Adaptation: Efficient and Non-Intrusive Language Extension for Virtual Machines

The advantages of virtual machine (VM) execution (dynamically loaded, portable object files with high-level information) also permit changing the semantics of executables. Load-time adaptation (LTA) intercepts the VM''s file operations and modifies object code on the fly, without changing the VM implementation, without needing access to source code, and without changing the actual files. We introduce a new technique, library-based LTA, and show how it can extend languages in such ways as adding contracts or mixins to existing classes, providing default code for interfaces, and instantiating parameterized types. We discuss an implementation of library-based LTA and its application to extending Java semantics.

[1]  John L. Bruno,et al.  jContractor: A Reflective Java Library to Support Design by Contract , 1999, Reflection.

[2]  Benjamin G. Zorn,et al.  BIT: A Tool for Instrumenting Java Bytecodes , 1997, USENIX Symposium on Internet Technologies and Systems.

[3]  Roger Faulkner,et al.  The Process File System and Process Model in UNIX System V , 1991, USENIX Winter.

[4]  A Ruf,et al.  Prevention better than cure , 1993 .

[5]  Urs Hölzle,et al.  Binary Component Adaptation , 1997, ECOOP.

[6]  Kathleen Jensen,et al.  Pascal-P Implementation Notes , 1981, Pascal - The Language and its Implementation.

[7]  Dan S. Wallach,et al.  Understanding Java stack inspection , 1998, Proceedings. 1998 IEEE Symposium on Security and Privacy (Cat. No.98CB36186).

[8]  Geoff A. Cohen,et al.  Automatic Program Transformation with JOIE , 1998, USENIX Annual Technical Conference.

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

[10]  James R. Larus,et al.  Rewriting executable files to measure program behavior , 1994, Softw. Pract. Exp..

[11]  Dennis Volper,et al.  UCSD Pascal on the VAX, portability and performance , 1984, Softw. Pract. Exp..

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

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

[14]  Chris J. Scheiman,et al.  Extending the operating system at the user level: the Ufo global file system , 1997 .

[15]  Ambuj K. Singh,et al.  Dynamic Query-Based Debugging , 1999, ECOOP.

[16]  Andrew C. Myers,et al.  Parameterized types for Java , 1997, POPL '97.

[17]  Andrew Duncan,et al.  Adding Contracts to Java with Handshake , 1998 .

[18]  Alexander A. Stepanov,et al.  C++ Standard Template Library , 2000 .

[19]  Günter Kniesel Type-Safe Delegation for Dynamic Component Adaptation , 1998, ECOOP Workshops.

[20]  Urs Hölzle,et al.  Integrating Independently-Developed Components in Object-Oriented Languages , 1993, ECOOP.

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

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

[23]  Igor D. D. Curcio ASAP—a simple assertion pre-processor , 1998, SIGP.

[24]  Sophia Drossopoulou,et al.  What is Java binary compatibility? , 1998, OOPSLA '98.

[25]  Emil Sekerinski,et al.  A Study of The Fragile Base Class Problem , 1998, ECOOP.

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

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

[28]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

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

[30]  Gilad Bracha,et al.  The programming language jigsaw: mixins, modularity and multiple inheritance , 1992 .

[31]  Martin Odersky,et al.  Pizza into Java: translating theory into practice , 1997, POPL '97.

[32]  Robert O. Hastings,et al.  Fast detection of memory leaks and access errors , 1991 .

[33]  David W. Wall,et al.  Systems for Late Code Modification , 1991, Code Generation.

[34]  Bertrand Meyer,et al.  Eiffel: The Language , 1991 .

[35]  Xavier Leroy,et al.  The ZINC experiment : an economical implementation of the ML language , 1990 .

[36]  Michael J. Vilot,et al.  Standard template library , 1996 .