Advertisement

Automatic Control and Computer Sciences

, Volume 52, Issue 7, pp 581–588 | Cite as

Semantics-Driven Migration of Java Programs: A Practical Application

  • A. O. AleksyukEmail author
  • V. M. ItsyksonEmail author
Article
  • 36 Downloads

Abstract

The development of a procedure supporting automated migration of Java programs to a new set of libraries is explored. Code migration is a common task in modern software projects. For example, it may arise when a project must be ported to a more secure or feature-rich library, a new platform, or a new version of an existing library. This paper presents a procedure for semantics-driven automated migration. A metamodel that applies the formalism earlier proposed by the authors and intended to describe libraries in object-oriented languages was developed for the migration procedure. The formalism specifies a library behaviour by using a system of extended finite state machines (EFSMs). The migration is split into five steps and each step is described in the paper. The procedure applies an algorithm of an equivalent path based on a breadth-first search extended for the needs of the migration task. The proposed procedure is implemented in a prototype of the migration tool. The tool includes modules for extraction of the software execution path, visualization of library models, user interaction, and migration. A library description language was developed for the tool. The prototype was tested by both artificial code and a real-world open source project. The article describes the experiments performed, the difficulties that have arisen in the process of migration of test samples, and how they are solved in the proposed procedure. The HTTP protocol and log library are used as libraries in the experiment. The results of the experiments indicate that code migration can be successfully automated through the developed procedures.

Keywords:

software library code migration behavioral description program transformation 

Notes

REFERENCES

  1. 1.
    Itsykson, V.M., Formalism and language tools for specification of the semantics of software libraries, Autom. Control Comput. Sci., 2017, vol. 51, no. 7, pp. 531–538.CrossRefGoogle Scholar
  2. 2.
    Baxter, I.D., Pidgeon, C., and Mehlich, M., DMS/spl reg: Program transformations for practical scalable software evolution, Proceedings of the 26th International Conference on Software Engineering, 2004, pp. 625–634.Google Scholar
  3. 3.
    Bravenboer, M., et al., Stratego/XT 0.17. A language and toolset for program transformation, Sci. Comput. Program., 2008, vol. 72, no. 1, pp. 52–70.MathSciNetCrossRefGoogle Scholar
  4. 4.
    Broeksema, B. and Telea, A., Visual support for porting large code bases, Visualizing Software for Understanding and Analysis (VISSOFT), 2011 6th IEEE International Workshop on, 2011, pp. 1–8.Google Scholar
  5. 5.
    Christoph, A. and Müller, M.M., GREAT: UML transformation tool for porting middleware applications, International Conference on the Unified Modeling Language, 2003, pp. 18–30.Google Scholar
  6. 6.
    Cordy, J.R., The TXL source transformation language, Sci. Comput. Program., 2006, vol. 61, no. 3, pp. 190–210.MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Eisenbarth, T., Koschke, R., and Vogel, G., Static trace extraction, Reverse Engineering, 2002. Proceedings. Ninth Working Conference on, 2002, pp. 128–137.Google Scholar
  8. 8.
    Filman, R.E. and Havelund, K., Source-code instrumentation and quantification of events, Workshop on Foundations of Aspect-Oriented Languages (FOAL) at AOSD Conference, Twente, 2002, pp. 45–49.Google Scholar
  9. 9.
    Jemerov, D., Implementing refactorings in IntelliJ IDEA, Proceedings of the 2nd Workshop on Refactoring Tools, 2008, p. 13.Google Scholar
  10. 10.
    Marosi, A.C., Balaton, Z. and Kacsuk, P., GenWrapper: A generic wrapper for running legacy applications on desktop grids, 2009 IEEE International Symposium on Parallel Distributed Processing, 2009, p. 1–6.Google Scholar
  11. 11.
    Wu, L., et al., Transforming code with compositional mappings for API-library switching, 2015 IEEE 39th Annual Computer Software and Applications Conference, 2015, vol. 2, pp. 316–325.Google Scholar
  12. 12.
    A conformant OpenGL ES implementation for Windows, Mac and Linux. https://github.com/google/angle. Accessed September 3, 2017.Google Scholar
  13. 13.
    Simple Logging Facade for Java (SLF4J). https://www.slf4j.org/. Accessed September 3, 2017.Google Scholar
  14. 14.
    JetBrains, Statically typed programming language for the JVM, Android and the browser. https://kotlinlang.org/. Accessed September 3, 2017.Google Scholar

Copyright information

© Allerton Press, Inc. 2018

Authors and Affiliations

  1. 1.Peter the Great St. Petersburg Polytechnic UniversitySt. PetersburgRussia

Personalised recommendations