Magic with Dynamo -- Flexible Cross-Component Linking for Java with Invokedynamic

Authors Kamil Jezek, Jens Dietrich



PDF
Thumbnail PDF

File

LIPIcs.ECOOP.2016.12.pdf
  • Filesize: 0.66 MB
  • 25 pages

Document Identifiers

Author Details

Kamil Jezek
Jens Dietrich

Cite AsGet BibTex

Kamil Jezek and Jens Dietrich. Magic with Dynamo -- Flexible Cross-Component Linking for Java with Invokedynamic. In 30th European Conference on Object-Oriented Programming (ECOOP 2016). Leibniz International Proceedings in Informatics (LIPIcs), Volume 56, pp. 12:1-12:25, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2016)
https://doi.org/10.4230/LIPIcs.ECOOP.2016.12

Abstract

Modern software systems are not built from scratch. They use functionality provided by libraries. These libraries evolve and often upgrades are deployed without the systems being recompiled. In Java, this process is particularly error-prone due to the mismatch between source and binary compatibility, and the lack of API stability in many popular libraries. We propose a novel approach to mitigate this problem based on the use of invokedynamic instructions for cross-component method invocations. The dispatch mechanism of invokedynamic is used to provide on-the-fly signature adaptation. We show how this idea can be used to construct a Java compiler that produces more resilient bytecode. We present the dynamo compiler, a proof-of-concept implemented as a javac post compiler. We evaluate our approach using several benchmark examples and two case studies showing how the dynamo compiler can prevent certain types of linkage and stack overflow errors that have been observed in real-world systems.
Keywords
  • Java
  • compilation
  • linking
  • binary compatibility
  • invokedynamic

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. JSR-000199 Java™ Compiler API. https://jcp.org/aboutJava/communityprocess/final/jsr199/index.html. [Accessed: October 20, 2015], 2006.
  2. Miles Barr and Susan Eisenbach. Safe upgrading without restarting. In Proceedings ICSM'03, pages 129-137, 2003. Google Scholar
  3. Patricia Conde and Francisco Ortin. JINDY: A java library to support invokedynamic. Computer Science and Information Systems, 11(1):47-68, 2014. Google Scholar
  4. Don Coppersmith and Shmuel Winograd. Matrix multiplication via arithmetic progressions. In Proceedings STOC'87. ACM, 1987. Google Scholar
  5. John Corwin, David F. Bacon, David Grove, and Chet Murthy. Mj: a rational module system for java and its applications. In Proceedings OOPSLA'03. ACM, 2003. Google Scholar
  6. Bradley E Cossette and Robert J Walker. Seeking the ground truth: a retroactive study on the evolution and migration of software libraries. In Proceedings FSE'12. ACM, 2012. Google Scholar
  7. Ilie Şavga and Michael Rudolf. Refactoring-based support for binary compatibility in evolving frameworks. In Proceedings GPCE '07. ACM, 2007. Google Scholar
  8. Joseph D. Darcy. Kinds of compatibility: Source, binary, and behavioral. https://blogs.oracle.com/darcy/entry/kinds_of_compatibility. [Accessed: October 20, 2015], 2008.
  9. Joseph D. Darcy. JDK release types and compatibility regions. https://blogs.oracle.com/darcy/entry/release_types_compatibility_regions. [Accessed: October 20, 2015], 2009.
  10. Jim des Rivières. Evolving Java-based APIs. http://wiki.eclipse.org/Evolving_Java-based_APIs. [Accessed: Nov. 20, 2015], 2007.
  11. Jens Dietrich, Kamil Jezek, and Premek Brada. Broken promises - an empirical study into evolution problems in java programs caused by library upgrades. In Proceedings CSMR-WCRE'14. IEEE, 2014. Google Scholar
  12. Jens Dietrich, Kamil Jezek, and Premek Brada. What java developers know about compatibility, and why this matters. Empirical Software Engineering, pages 1-26, 2015. Google Scholar
  13. Danny Dig and Ralph Johnson. How do APIs evolve? A story of refactoring. Journal of Software Maintenance and Evolution: Research and Practice, 18(2):83-107, 2006. Google Scholar
  14. Danny Dig, Stas Negara, Vibhu Mohindra, and Ralph Johnson. ReBA: refactoring-aware binary adaptation of evolving libraries. In Proceedings ICSE'08. ACM, 2008. Google Scholar
  15. Edsger W Dijkstra. A note on two problems in connexion with graphs. Numerische mathematik, 1(1):269-271, 1959. Google Scholar
  16. Mikhail Dmitriev. Language-specific make technology for the Java programming language. In Proceedings OOPSLA '02, pages 373-385, New York, NY, USA, 2002. ACM. Google Scholar
  17. Sophia Drossopoulou, David Wragg, and Susan Eisenbach. What is Java binary compatibility? In Proceedings OOPSLA'98. ACM, 1998. Google Scholar
  18. David Flanagan and Yukihiro Matsumoto. The ruby programming language. O'Reilly Media, Inc., 2008. Google Scholar
  19. Ira R. Forman, Michael H. Conner, Scott H. Danforth, and Larry K. Raper. Release-to-release binary compatibility in SOM. In Proceedings OOPSLA '95. ACM, 1995. Google Scholar
  20. Andy Georges, Dries Buytaert, and Lieven Eeckhout. Statistically rigorous java performance evaluation. In Proceedings OOPSLA'07. ACM, 2007. Google Scholar
  21. Adele Goldberg and David Robson. Smalltalk-80: the language and its implementation. Addison-Wesley Longman Publishing Co., Inc., 1983. Google Scholar
  22. James Gosling, Bill Joy, Guy Steele, Gilad Bracha, and Alex Buckley. The Java™ Language Specification (Java SE 8 Edition). Oracle America, Inc., February 2015. Google Scholar
  23. Chanwit Kaewkasi. Towards performance measurements for the java virtual machine’s invokedynamic. In Proceedings VIML'10. ACM, 2010. Google Scholar
  24. Ralph Keller and Urs Hölzle. Binary Component Adaptation. In Proceedings ECOOP '98. Springer, 1998. Google Scholar
  25. M. M. Lehman and L. A. Belady, editors. Program evolution: processes of software change. Academic Press Professional, Inc., San Diego, CA, USA, 1985. Google Scholar
  26. Tim Lindholm, Frank Yellin, Gilad Bracha, and Alex Buckley. The Java™ Virtual Machine Specification (Java SE 8 Edition). Oracle America, Inc., February 2015. Google Scholar
  27. Tom Mens, Juan Fernández-Ramil, and Sylvain Degrandsart. The Evolution of Eclipse. In Proceedings ICSM'08. IEEE, 2008. Google Scholar
  28. Charles Nutter. A first taste of invokedynamic. http://blog.headius.com/2008/09/first-taste-of-invokedynamic.html. [Accessed: October 20, 2015], 2008.
  29. Francisco Ortin, Patricia Conde, Daniel Fernandez-Lanvin, and Raul Izquierdo. The runtime performance of invokedynamic: An evaluation with a java library. IEEE software, (4):82-90, 2014. Google Scholar
  30. OSGi Alliance. Semantic versioning - technical whitepaper. Technical report, OSGi Alliance, 2010. Google Scholar
  31. Tom Preston-Werner. Semantic Versioning 2.0.0. http://semver.org/. [Accessed: October 20, 2015], 2010.
  32. Steven Raemaekers, Arie van Deursen, and Joost Visser. Measuring software library stability through historical version analysis. In Proceedings ICSM'12. IEEE, 2012. Google Scholar
  33. Steven Raemaekers, Arie Van Deursen, and Joost Visser. Semantic versioning versus breaking changes: a study of the maven repository. Technical report, Delft University of Technology, Software Engineering Research Group, 2014. Google Scholar
  34. Ian Robertson. A hazard of covariant return types and bridge methods. http://www.artima.com/weblogs/viewpost.jsp?thread=354443. [Accessed: October 20, 2015], 2013.
  35. John R Rose. Bytecodes meet combinators: invokedynamic on the jvm. In Proceedings VMIL'09. ACM, 2009. Google Scholar
  36. Mazeiar Salehie and Ladan Tahvildari. Self-adaptive software: Landscape and research challenges. ACM Trans. Auton. Adapt. Syst., 4(2):14:1-14:42, May 2009. Google Scholar
  37. Guido Salvaneschi, Carlo Ghezzi, and Matteo Pradella. An analysis of language-level support for self-adaptive software. ACM Trans. Auton. Adapt. Syst., 8(2):7:1-7:29, July 2013. Google Scholar
  38. Attila Szegedi. JEP 276: Dynamic Linking of Language-Defined Object Models. http://openjdk.java.net/jeps/276. [Accessed: November 10, 2015], 2015.
  39. Ewan Tempero, James Noble, and Hayden Melton. How do java programs use inheritance? an empirical study of inheritance in java software. In Proceedings ECOOP'08. Springer, 2008. Google Scholar
  40. The OSGi Alliance. OSGi core release 5. http://www.osgi.org/Specifications, 2012.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail