Skip to main content

Altering Java Semantics via Bytecode Manipulation

  • Conference paper
  • First Online:
Generative Programming and Component Engineering (GPCE 2002)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2487))

Abstract

Altering the semantics of programs has become of major interest. This is due to the necessity of adapting existing software, for instance to achieve interoperability between off-the-shelf components. A system allowing such alterations should operate at the bytecode level in order to preserve portability and to be useful for pieces of software whose source code is not available. Furthermore, working at the bytecode level should be done while keeping high-level abstractions so that it can be useful to a wide audience. In this paper, we present Jinline, a tool that operates at load time through bytecode manipulation. Jinline makes it possible to inline a method body before, after, or instead of occurrences of language mechanisms within a method. It provides appropriate high-level abstractions for fine-grained alterations while offering a good expressive power and a great ease of use.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Keller, R., Hölzle, U.: Binary component adaptation. In: Proceedings of ECOOP’98-12th European Conference on Object-Oriented Programming, Brussels, Belgium, Springer-Verlag (1998) 29–307

    Google Scholar 

  2. Wegner, P.: Interoperability. ACM Computing Surveys 28(1) (1996)

    Google Scholar 

  3. Tarr, P.L., Ossher, H., Harrison, W.H., Jr., S.M.S.: N degrees of separation: Multidimensional separation of concerns. In: International Conference on Software Engineering. (1999) 107–119

    Google Scholar 

  4. Stroud, R.J., Wu, Z.: Using Metaobject Protocols to Satisfy Non-Functional Requirements. In: Advances in Object-Oriented Metalevel Architectures and Reflection. CRC Press (1996) 31–52

    Google Scholar 

  5. Tanter, E., Piquer, J.: Managing references upon object migration: applying separation of concerns. In: Proceedings of the XXI International Conference of the Chilean Computer Science Society (SCCC 2001), Punta Arenas, Chile, IEEE Computer Society (2001) 264–272

    Google Scholar 

  6. McAffer, J.: Meta-level architecture support for distributed objects. In: International Workshop on Object-Orientation in Operating Systems (IWOOS’95). (1995)

    Google Scholar 

  7. Kiczales, G., Irwin, J., Lamping, J., Loingtier, J., Lopes, C., Maeda, C., Mendhekar, A.: Aspect Oriented Programming. In: Special Issues in Object-Oriented Programming, Max Muehlhaeuser (general editor) et al. (1996)

    Google Scholar 

  8. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.: An overview of AspectJ. Proceedings of ECOOP 2001 (2001)

    Google Scholar 

  9. Bachrach, J., Playford, K.: The Java syntactic extender. OOPSLA 2001 conference proceedings (2001) 31–42

    Google Scholar 

  10. Tatsubori, M.: An extension mechanism for the Java language. Master’s thesis, Tsukuba, Japan (1999)

    Google Scholar 

  11. Chiba, S.:Load-time structural reflection in Java. European Conference on Object-Oriented Programming (ECOOP’00) (2000)

    Google Scholar 

  12. Howe, D.: FOLDOC: Free On-Line Dictionary Of Computing. (1993) http://foldoc.doc.ic.ac.uk.

  13. Tanter, E., Bouraqadi, N., Noyé, J.: Reflex-Towards an Open Reflective Extension of Java. In: Proceedings of the Third International Conference on Metalevel Architectures and Advanced Separation of Concerns (Reflection 2001). Volume 2192 of Lecture Notes in Computer Science., Kyoto, Japan, Springer-Verlag (2001) 25–43

    Google Scholar 

  14. Smith, B.: Reflection and semantics in Lisp. In: Proceedings of the 14th Annual ACM Symposium on principles of programming languages, POPL’84. (1984) 23–25

    Google Scholar 

  15. Maes, P.: Computional reflection. PhD thesis, Artificial intelligence laboratory, Vrije Universiteit, Brussels, Belgium (1987)

    Google Scholar 

  16. Goldberg, A., Robson, D.: Smalltalk-80: The Language and its Implementation. Addison-Wesley (1983)

    Google Scholar 

  17. Golm, M.: Design and implementation of a meta architecture for Java. Master’s thesis, Leipzig Germany (1997)

    Google Scholar 

  18. Oliva, A., Calciolari Garcia, I., Buzato, L.: The reflexive architecture of Guaraná. Technical report, IC-98-14, Institute of Computing, State University of Campinas (1998)

    Google Scholar 

  19. Redmond, B., Cahill, V.: Supporting Unanticipated Dynamic Adaptation of Application Behavior. In: Proceedings of ECOOP 2002. Volume 2374 of Lecture Notes in Computer Science., Málaga, Spain, Springer-Verlag (2002) 205–230

    Chapter  Google Scholar 

  20. Lee, H.B., Zorn, B.G.: BIT: A tool for instrumenting Java bytecodes. In: USENIX Symposium on Internet Technologies and Systems. (1997)

    Google Scholar 

  21. Dahm, M.: Byte code engineering. In Cap, C., ed.: Proceedings of JIT’99, Berlin. (1999) 267–277

    Google Scholar 

  22. AlphaWorks: JikesBT. http://www.alphaworks.ibm.com/tech/jikesbt (1998)

  23. Cohen, G., Chase, J., Kaminsky, D.: Automatic program transformation with JOIE. in Proceedings of the 1998 USENIX Annual Technical Symposium (1998)

    Google Scholar 

  24. Kiczales, G., Des Rivières, J., Bobrow, D.: The Art of the Meta-Object Protocol. MIT Press (1991)

    Google Scholar 

  25. Welch, I., Stroud, R.: Kava-a reflective Java based on bytecode rewriting. In: 1st OOPSLA Workshop on Reflection and Software Engineering (OORaSE’99). Volume 1826 of Lecture Notes in Computer Science., Denver, USA, Springer-Verlag (2000) 165–167

    Chapter  Google Scholar 

  26. Tanter, E., Vernaillen, M., Piquer, J.: Towards Transparent Adaptation of Migration Policies. In: 8th ECOOP Workshop on Mobile Object Systems (EWMOS 2002), Málaga, Spain (2002)

    Google Scholar 

  27. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Professional Computing Series. Addison-Wesley (1994)

    Google Scholar 

  28. Vallee-Rai, R., Hendren, L., Sundaresan, V., Lam, P., Gagnon, E., Co, P.: Soot-a Java optimization framework. In: Proceedings of CASCON 1999. (1999) 125–135

    Google Scholar 

  29. SUN Microsystems: Dynamic Proxy Classes. (1999) http://java.sun.com/j2se/1.3/docs/guide/reflection/proxy.html.

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Tanter, É., Ségura-Devillechaise, M., Noyé, J., Piquer, J. (2002). Altering Java Semantics via Bytecode Manipulation. In: Batory, D., Consel, C., Taha, W. (eds) Generative Programming and Component Engineering. GPCE 2002. Lecture Notes in Computer Science, vol 2487. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45821-2_18

Download citation

  • DOI: https://doi.org/10.1007/3-540-45821-2_18

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-44284-4

  • Online ISBN: 978-3-540-45821-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics