Transparent program transformations in the presence of opaque code

User-level indirection is the automatic rewriting of an application to interpose code that gets executed upon program actions such as object field access, method call, object construction, etc. The approach is constrained by the presence of opaque (native) code that cannot be indirected and can invalidate the assumptions of any indirection transformation. In this paper, we demonstrate the problem of employing user-level indirection in the presence of native code. We then suggest reasonable assumptions on the behavior of native code and a simple analysis to compute the constraints they entail. We show that the type information at the native code interface is often a surprisingly sufficient approximation of native behavior for heuristically estimating when user-level indirection can be applied safely. Furthermore, we introduce a new user-level indirection approach that minimizes the constraints imposed by interactions with native code.

[1]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[2]  André Spiegel PANGAEA: An Automatic Distribution Front-End for JAVA , 1999, IPPS/SPDP Workshops.

[3]  Assaf Schuster,et al.  Instrumentation of standard libraries in object-oriented languages: the twin class hierarchy approach , 2004, OOPSLA '04.

[4]  Shigeru Chiba,et al.  A Bytecode Translator for Distributed Execution of "Legacy" Java Software , 2001, ECOOP.

[5]  Markus Dahm,et al.  Byte Code Engineering , 1999, Java-Informations-Tage.

[6]  Quintin I. Cutts,et al.  Swizzle Barrier Optimizations for Orthogonal Persistence in Java , 1998, POS/PJW.

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

[8]  Michael Philippsen,et al.  JavaParty - Transparent Remote Objects in Java , 1997, Concurr. Pract. Exp..

[9]  Michael D. Ernst,et al.  Automatic test factoring for java , 2005, ASE '05.

[10]  Michael Philippsen,et al.  Exploiting object locality in JavaParty, a distributed computing environment for workstation clusters , 2001 .

[11]  André Spiegel,et al.  Automatic Distribution in Pangaea , 2000 .

[12]  Walter Binder,et al.  Program transformations for portable CPU accounting and control in Java , 2004, PEPM '04.

[13]  Elizabeth D. Mynatt,et al.  Automatic Partitioning: A Promising Approach to Prototyping Ubiquitous Computing Applications , 2004 .

[14]  Yannis Smaragdakis,et al.  Portable and Efficient Distributed Threads for Java , 2004, Middleware.

[15]  Assaf Schuster,et al.  JavaSplit: a runtime for execution of monolithic Java programs on heterogenous collections of commodity workstations , 2003, 2003 Proceedings IEEE International Conference on Cluster Computing.

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

[17]  Yannis Smaragdakis,et al.  J-Orchestra: Automatic Java Application Partitioning , 2002, ECOOP.

[18]  B. Zorn,et al.  Bytecode Instrumentation as an Aid in Understanding the Behavior of Java Persistent Stores , 1997 .