Automated Translation of Java Source Code to Eiffel

  • Marco Trudel
  • Manuel Oriol
  • Carlo A. Furia
  • Martin Nordio
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6705)


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, services, and SWT applications can be re-used as Eiffel programs, with the same functionalities as their original Java implementations.


Exception Handling Java Application Java Class Automate Translation Java Source Code 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 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)CrossRefGoogle Scholar
  2. 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. 3.
    Cordy, J.R.: Source transformation, analysis and generation in TXL. In: PEPM, pp. 1–11 (2006)Google Scholar
  4. 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. 5.
    Dietrich, W.C., Nackman Jr., L.R., Gracer, F.: Saving legacy with objects. SIGPLAN Not. 24(10), 77–83 (1989)CrossRefGoogle Scholar
  6. 6.
    Gall, H., Klosch, R.: Finding objects in procedural programs: an alternative approach. In: WCRE, pp. 208–216 (1995)Google Scholar
  7. 7.
    Google Web toolkit (2010),
  8. 8.
    J2Eif. The Java to Eiffel translator (2010),
  9. 9.
    Kontogiannis, K., Patil, P.: Evidence driven object identification in procedural code. In: STEP, pp. 12–21 (1999)Google Scholar
  10. 10.
    Llamosí, A., Strohmeier, A. (eds.): Ada-Europe 2004. LNCS, vol. 3063. Springer, Heidelberg (2004)Google Scholar
  11. 11.
    Mauve project (2010),
  12. 12.
    Mcilroy, D.: Mass-produced software components. In: ICSE, pp. 88–98 (1968)Google Scholar
  13. 13.
    Meyer, B.: The component combinator for enterprise applications. In: JOOP, vol. 10(8), pp. 5–9 (1998)Google Scholar
  14. 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. 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. 16.
    Newcomb, P., Kotik, G.: Reengineering procedural into object-oriented systems. In: WCRE, pp. 237–249 (1995)Google Scholar
  17. 17.
    Nordio, M.: Proofs and Proof Transformations for Object-Oriented Programs. PhD thesis, ETH Zurich (2009)Google Scholar
  18. 18.
    Postema, M., Schmidt, H.W.: Reverse engineering and abstraction of legacy systems. Informatica, 37–55 (1998)Google Scholar
  19. 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)CrossRefGoogle Scholar
  20. 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. 21.
    Subramaniam, G.V., Byrne, E.J.: Deriving an object model from legacy Fortran code. In: ICSM, pp. 3–12 (1996)Google Scholar
  22. 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. 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. 24.
    Zou, Y., Kontogiannis, K.: A framework for migrating procedural code to object-oriented platforms. In: APSEC, pp. 390–399 (2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Marco Trudel
    • 1
  • Manuel Oriol
    • 2
  • Carlo A. Furia
    • 1
  • Martin Nordio
    • 1
  1. 1.Chair of Software EngineeringETH ZurichSwitzerland
  2. 2.University of YorkUnited Kingdom

Personalised recommendations