ABSTRACT
Programs written in managed languages are compiled to a platform-independent intermediate representation, such as Java bytecode. The relative high level of Java bytecode has engendered a widespread practice of changing the bytecode directly, without modifying the maintained version of the source code. This practice, called bytecode engineering or enhancement, has become indispensable in introducing various concerns, including persistence, distribution, and security, transparently. For example, transparent persistence architectures help avoid the entanglement of business and persistence logic in the source code by changing the bytecode directly to synchronize objects with stable storage. With functionality added directly at the bytecode level, the source code reflects only partial semantics of the program. Specifically, the programmer can neither ascertain the program's runtime behavior by browsing its source code, nor map the runtime behavior back to the original source code.
This paper presents an approach that improves the utility of source-level programming tools by providing enhancement specifications written in a domain-specific language. By interpreting the specifications, a source-level programming tool can gain an awareness of the bytecode enhancements and improve its precision and usability. We demonstrate the applicability of our approach by making a source code editor and a symbolic debugger enhancements-aware.
- C. Andreae, J. Noble, S. Markstrum, and T. Millstein. A framework for implementing pluggable type systems. SIGPLAN Not., 41(10):57--74, 2006. Google Scholar
- Apache Jakarta Project. The Byte Code Engineering Library. http://jakarta.apache.org/bcel/manual.html.Google Scholar
- T. Apiwattanapong, A. Orso, and M. Harrold. A differencing algorithm for object-oriented programs. Automated Software Engineering, 2004. Proceedings. 19th International Conference on, pages 2--13, Sept. 2004. Google Scholar
- M. P. Atkinson. The Napier88 persistent programming language and environment, 1988.Google Scholar
- M. P. Atkinson, L. Daynes, M. J. Jordan, T. Printezis, and S. Spence. An orthogonally persistent java. SIGMOD Rec., 25(4):68--75, 1996. Google Scholar
- C. Bauer, G. King, and I. NetLibrary. Hibernate in Action. Manning, 2005. Google Scholar
- G. Brooks, G. J. Hansen, and S. Simmons. A new approach to debugging optimized code. In PLDI '92: Proceedings of the ACM SIGPLAN 1992 conference on Programming language design and Implementation, pages 1--11, 1992. Google Scholar
- T. M. Chilimbi, B. Davidson, and J. R. Larus. Cacheconscious structure definition. SIGPLAN Not., 34(5):13--24, 1999. Google Scholar
- M. Copperman. Debugging optimized code without being misled. ACM Trans. Program. Lang. Syst., 16(3):387--427, 1994. Google Scholar
- K. Czarnecki. Framework-specific modeling languages with round-trip engineering. In In MoDELS, pages 692--706, 2006. Google Scholar
- M. Dahm. Byte code engineering. Java Informations Tage, pages 267--277, 1999.Google Scholar
- M. Dmitriev. Language-specific make technology for the Java programming language. SIGPLAN Not., 37(11):373--385, 2002. Google Scholar
- B. Dufour, B. G. Ryder, and G. Sevitsky. Blended analysis for performance understanding of framework-based applications. In ISSTA '07: Proceedings of the 2007 international symposium on Software testing and analysis, pages 118--128, New York, NY, USA, 2007. ACM. Google Scholar
- M. Eaddy, A. Aho, W. Hu, P. McDonald, and J. Burger. Debugging aspect-enabled programs. In Software Composition, pages 200--215. 2007. Google Scholar
- Eclipse Foundation. Eclipse Java development tools, March 2008. http://www.eclipse.org/jdtGoogle Scholar
- M. Fahndrich, M. Carbin, and J. R. Larus. Reflective program generation with patterns. In GPCE '06: Proceedings of the 5th international conference on Generative programming and component engineering, pages 275--284, New York, NY, USA, 2006. ACM. Google Scholar
- R. E. Faith. Debugging programs after structure-changing transformation. PhD thesis, 1998. Adviser-Jan F. Prins. Google Scholar
- J. Flen and A. Linden. Gartners hype cycle special report. Technical report, Gartner Research, 2005. www.gartner.com.Google Scholar
- P. Fritzson. A systematic approach to advanced debugging through incremental compilation (preliminary draft). In Proceedings of the ACM SIGSOFT/SIGPLAN software engineering symposium on High-level debugging, pages 130--139, 1983. Google Scholar
- Glen McCluskey. Using Java Reflection. http://java.sun.com/developer/technicalArticles/ALT/Reflection/index.html.Google Scholar
- J. Hennessy. Symbolic debugging of optimized code. ACM Trans. Program. Lang. Syst., 4(3):323--344, 1982. Google Scholar
- U. Holzle, C. Chambers, and D. Ungar. Debugging optimized code with dynamic deoptimization. SIGPLAN Not., 27(7):32--43, 1992. Google Scholar
- T. Ishio, S. Kusumoto, and K. Inoue. Debugging support for aspect-oriented program based on program slicing and call graph. In ICSM '04: Proceedings of the 20th IEEE International Conference on Software Maintenance, pages 178--187, 2004. Google Scholar
- G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. In Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP), pages 327--353, London, UK, 2001. Springer-Verlag. Google Scholar
- G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. Lopes, J. M. Loingtier, and J. Irwing. Aspect-oriented programming. In ECOOP. Springer-Verlag, 1997.Google Scholar
- M. Kim, D. Notkin, and D. Grossman. Automatic inference of structural changes for matching across program versions. In ICSE '07: Proceedings of the 29th International Conference on Software Engineering, pages 333--343, 2007. Google Scholar
- J. C. King. Symbolic execution and program testing. Commun. ACM, 19(7):385--394, 1976. Google Scholar
- N. Kumar, B. R. Childers, and M. L. Soffa. Tdb: a source-level debugger for dynamically translated programs. In AADEBUG'05: Proceedings of the sixth international symposium on Automated analysis-driven debugging, pages 123--132, 2005. Google Scholar
- B. Liskov, A. Adya, M. Castro, S. Ghemawat, R. Gruber, U. Maheshwari, A. C. Myers, M. Day, and L. Shrira. Safe and efficient sharing of persistent objects in thor. In SIGMOD '96: Proceedings of the ACM SIGMOD international conference on management of data, pages 318--329. ACM, 1996. Google Scholar
- A. Marquez, S. Blackburn, G. Mercer, and J. N. Zigman. Implementing orthogonally persistent java. In POS-9: Revised Papers from the 9th International Workshop on Persistent Object Systems, pages 247--261, London, UK, 2001. Springer-Verlag. Google Scholar
- Microsoft. Microsoft Open Database Connectivity. http://msdn.microsoft.com/en-us/library/ms710252(VS. 85).aspx.Google Scholar
- A. Orso and B. Kennedy. Selective Capture and Replay of Program Executions. In Proceedings of the Third International ICSE Workshop on Dynamic Analysis (WODA 2005), pages 29--35, St. Louis, MO, USA, May 2005. Google Scholar
- A. Orso, A. Rao, and M. J. Harrold. A technique for dynamic updating of Java software. Proceedings of the International Conference on Software Maintenance (ICSM'02), October 2002. Google Scholar
- M. Philippsen and M. Zenger. JavaParty-transparent remote objects in Java. Concurrency Practice and Experience, 9(11):1225--1242, 1997.Google Scholar
- G. Pothier and Eric Tanter. Extending omniscient debugging to support aspect-oriented programming. In SAC '08: Proceedings of the 2008 ACM symposium on Applied computing, pages 266--270, 2008. Google Scholar
- S. C. Previtali and T. R. Gross. Dynamic updating of software systems based on aspects. Proceedings of the 22nd IEEE International Conference on Software Maintenance, pages 83 -- 92, September 2006. Google Scholar
- C. Richardson. Untangling enterprise Java. ACM Queue, 4(5):36--44, 2006. Google Scholar
Digital Library
- C. Russell. Java Data Objects 2.1, June 2007. http://db.apache.org/jdo/specifications.html.Google Scholar
- Shigeru Chiba. Java Programming Assistant. http://www.csg.is.titech.ac.jp/~chiba/javassist.Google Scholar
- G. Sittampalam, O. de Moor, and K. F. Larsen. Incremental execution of transformation specifications. In POPL '04: Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 26--38, 2004. Google Scholar
Digital Library
- M. Song. The structural enhancement rules language website. http://research.cs.vt.edu/vtspaces/ser.Google Scholar
- H. Stuart, R. R. Hansen, J. L. Lawall, J. Andersen, Y. Padioleau, and G. Muller. Towards easing the diagnosis of bugs in os code. In PLOS '07: Proceedings of the 4th workshop on Programming languages and operating systems, pages 1--5, New York, NY, USA, 2007. ACM. Google Scholar
- Sun Microsystems. Java Platform Debugger Architecture. http://java.sun.com/javase/technologies/core/toolsapis/jpda/.Google Scholar
- Sun Microsystems. JavaBeans Specification. http://java.sun.com/javase/technologies/desktop/javabeans/docs/spec.html.Google Scholar
- Sun Microsystems. The Java Database Connectivity. http://java.sun.com/products/jdbc/overview.html.Google Scholar
- W. Tansey and E. Tilevich. Annotation refactoring: inferring upgrade transformations for legacy applications. In OOPSLA'08: Proceedings of the 23rd ACM SIGPLAN conference on Object oriented programming systems languages and applications, pages 295--312, 2008. Google Scholar
- E. Tilevich and Y. Smaragdakis. J-Orchestra: Automatic Java application partitioning. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), pages 178--204. Springer-Verlag, LNCS 2374, 2002. Google Scholar
- E. Tilevich and Y. Smaragdakis. Binary refactoring: Improving code behind the scenes. In Proceedings of International Conference on Software Engineering (ICSE), pages 264--273, May 2005. Google Scholar
Digital Library
- M. Verbaere, R. Ettinger, and O. de Moor. JunGL: a scripting language for refactoring. In ICSE '06: Proceedings of the 28th International Conference on Software Engineering, pages 172--181, 2006. Google Scholar
Digital Library
- E. Visser, Z. el Abidine Benaissa, and A. Tolmach. Building program optimizers with rewriting strategies. SIGPLAN Not., 34(1):13--26, 1999. Google Scholar
- D. L. Whitfield and M. L. Soffa. An approach for exploring code improving transformations. ACM Trans. Program. Lang. Syst., 19(6):1053--1084, 1997. Google Scholar
Index Terms
Enhancing source-level programming tools with an awareness of transparent program transformations
Recommendations
Enhancing source-level programming tools with an awareness of transparent program transformations
OOPSLA '09Programs written in managed languages are compiled to a platform-independent intermediate representation, such as Java bytecode. The relative high level of Java bytecode has engendered a widespread practice of changing the bytecode directly, without ...
Program transformations for portable CPU accounting and control in Java
PEPM '04: Proceedings of the 2004 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulationIn this paper we introduce a novel scheme for portable CPU accounting and control in Java, which is based on program transformation techniques at the bytecode level and can be used with every standard Java Virtual Machine. In our approach applications, ...
Building Java program analysis tools using Javana
OOPSLA '06: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applicationsJavana is a tool for creating customized Java program analysis tools. It comes with an easy-to-use instrumentation framework that enables programmers to develop profiling tools that crosscut the Java application, the Java Virtual Machine (JVM) and the ...







Comments