Skip to main content

Automated Translation of Java Source Code to Eiffel

  • Conference paper
Book cover Objects, Models, Components, Patterns (TOOLS 2011)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6705))

Abstract

Reusability is an important software engineering concept actively advocated for the last forty years. While reusability has been addressed for systems implemented using the same programming language, it does not usually handle interoperability with different programming languages. This paper presents a solution for the reuse of Java code within Eiffel programs based on a source-to-source translation from Java to Eiffel. The paper focuses on the critical aspects of the translation and illustrates them by formal means. The translation is implemented in the freely available tool J2Eif; it provides Eiffel replacements for the components of the Java runtime environment, including Java Native Interface services and reflection mechanisms. Our experiments demonstrate the practical usability of the translation scheme and its implementation, and record the performance slow-down compared to custom-made Eiffel applications: automatic translations of java.util data structures, java.io services, and SWT applications can be re-used as Eiffel programs, with the same functionalities as their original Java implementations.

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. Achee, B.L., Carver, D.L.: Creating object-oriented designs from legacy FORTRAN code. Journal of Systems and Software 39(2), 179–194 (1997)

    Article  Google Scholar 

  2. Canfora, G., Cimitile, A., Lucia, A.d., Lucca, G.A.D.: A case study of applying an eclectic approach to identify objects in code. In: IWPC, pp. 136–143 (1999)

    Google Scholar 

  3. Cordy, J.R.: Source transformation, analysis and generation in TXL. In: PEPM, pp. 1–11 (2006)

    Google Scholar 

  4. de Lucia, A., Di Lucca, G.A., Fasolino, A.R., Guerra, P., Petruzzelli, S.: Migrating legacy systems towards object-oriented platforms. In: Proc. of ICSM, pp. 122–129 (1997)

    Google Scholar 

  5. Dietrich, W.C., Nackman Jr., L.R., Gracer, F.: Saving legacy with objects. SIGPLAN Not. 24(10), 77–83 (1989)

    Article  Google Scholar 

  6. Gall, H., Klosch, R.: Finding objects in procedural programs: an alternative approach. In: WCRE, pp. 208–216 (1995)

    Google Scholar 

  7. Google Web toolkit (2010), http://code.google.com/webtoolkit/

  8. J2Eif. The Java to Eiffel translator (2010), http://jaftec.origo.ethz.ch

  9. Kontogiannis, K., Patil, P.: Evidence driven object identification in procedural code. In: STEP, pp. 12–21 (1999)

    Google Scholar 

  10. Llamosí, A., Strohmeier, A. (eds.): Ada-Europe 2004. LNCS, vol. 3063. Springer, Heidelberg (2004)

    Google Scholar 

  11. Mauve project (2010), http://sources.redhat.com/mauve/

  12. Mcilroy, D.: Mass-produced software components. In: ICSE, pp. 88–98 (1968)

    Google Scholar 

  13. Meyer, B.: The component combinator for enterprise applications. In: JOOP, vol. 10(8), pp. 5–9 (1998)

    Google Scholar 

  14. Millham, R.: An investigation: reengineering sequential procedure-driven software into object-oriented event-driven software through UML diagrams. In: COMPSAC, 2002, pp. 731–733 (2002)

    Google Scholar 

  15. Müller, P., Nordio, M.: Proof-Transforming Compilation of Programs with Abrupt Termination. In: SAVCBS 2007, Dubrovnik, Croatia, pp. 39–46 (2007)

    Google Scholar 

  16. Newcomb, P., Kotik, G.: Reengineering procedural into object-oriented systems. In: WCRE, pp. 237–249 (1995)

    Google Scholar 

  17. Nordio, M.: Proofs and Proof Transformations for Object-Oriented Programs. PhD thesis, ETH Zurich (2009)

    Google Scholar 

  18. Postema, M., Schmidt, H.W.: Reverse engineering and abstraction of legacy systems. Informatica, 37–55 (1998)

    Google Scholar 

  19. Serrano, M.A., Carver, D.L., de Oca, C.M.: Reengineering legacy systems for distributed environments. J. Syst. Softw. 64(1), 37–55 (2002)

    Article  Google Scholar 

  20. Sneed, H.M.: Migration of procedurally oriented cobol programs in an object-oriented architecture. In: Software Maintenance, pp. 105–116 (1992)

    Google Scholar 

  21. Subramaniam, G.V., Byrne, E.J.: Deriving an object model from legacy Fortran code. In: ICSM, pp. 3–12 (1996)

    Google Scholar 

  22. Wiggerts, T., Bosma, H., Fielt, E.: Scenarios for the identification of objects in legacy systems. In: WCRE, pp. 24–32 (1997)

    Google Scholar 

  23. Yeh, A., Harris, D., Reubenstein, H.: Recovering abstract data types and object instances from a conventional procedural language. In: WCRE, pp. 227–236 (1995)

    Google Scholar 

  24. Zou, Y., Kontogiannis, K.: A framework for migrating procedural code to object-oriented platforms. In: APSEC, pp. 390–399 (2001)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Trudel, M., Oriol, M., Furia, C.A., Nordio, M. (2011). Automated Translation of Java Source Code to Eiffel. In: Bishop, J., Vallecillo, A. (eds) Objects, Models, Components, Patterns. TOOLS 2011. Lecture Notes in Computer Science, vol 6705. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-21952-8_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-21952-8_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-21951-1

  • Online ISBN: 978-3-642-21952-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics