Automated Multi-Language Artifact Binding and Rename Refactoring between Java and DSLs Used by Java Frameworks

  • Philip Mayer
  • Andreas Schroeder
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8586)

Abstract

Developing non-trivial software applications involves using multiple programming languages. Although each language is used to describe a particular aspect of the system, artifacts defined inside those languages reference each other across language boundaries; such references are often only resolved at runtime. However, it is important for developers to be aware of these references during development time for programming understanding, bug prevention, and refactoring. In this work, we report on a) an approach and tool for automatically identifying multi-language relevant artifacts, finding references between artifacts in different languages, and (rename-) refactoring them, and b) on an experimental evaluation of the approach on seven open-source case studies which use a total of six languages found in three frameworks. As our main result, we provide insights into the incidence of multi-language bindings in the case studies as well as the feasibility of automated multi-language rename refactorings.

Keywords

multi language software polyglot programming Java domain-specific languages program comprehension refactoring experiment 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Supplementary material

978-3-662-44202-9_18_MOESM1_ESM.zip (4130 mb)
Electronic Supplementary Material(118 KB)

References

  1. 1.
    Chen, N., Johnson, R.: Toward Refactoring in a Polyglot World. In: Proceedings of the 2nd Workshop on Refactoring Tools, pp. 1–4. ACM (2008)Google Scholar
  2. 2.
    Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise Analysis of String Expressions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 1–18. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  3. 3.
    Fjeldberg, H.C.: Polyglot Programming. A Business Perspective. Master thesis, Norwegian University of Science and Technology (2008)Google Scholar
  4. 4.
    Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Pearson Education (2012)Google Scholar
  5. 5.
    Fowler, M.: Domain-Specific Languages. Addison-Wesley Professional (2010)Google Scholar
  6. 6.
    Kempf, M., Kleeb, R., Klenk, M., Sommerlad, P.: Cross language refactoring for Eclipse plug-ins. In: Proceedings of the 2nd Workshop on Refactoring Tools, pp. 1:1–1:4. ACM (2008)Google Scholar
  7. 7.
    Klenk, M., Kleeb, R., Kempf, M., Sommerlad, P.: Refactoring support for the Groovy-Eclipse plug-in. In: Companion to the 23rd ACM SIGPLAN Conference on Object-Oriented Programming Systems Languages and Applications, pp. 727–728. ACM (2008)Google Scholar
  8. 8.
    Kontogiannis, K., Linos, P., Wong, K.: Comprehension and Maintenance of Large-Scale Multi-Language Software Applications. In: Proceedings of the 22nd IEEE International Conference on Software Maintenance, pp. 497–500. IEEE Computer Society (2006)Google Scholar
  9. 9.
    Linos, P.: PolyCare: A Tool for Re-engineering Multi-language Program Integrations. In: Proceeding of the 1st IEEE International Conference on Engineering of Complex Computer Systems, pp. 338–341. IEEE Computer Society Press (1995)Google Scholar
  10. 10.
    Livshits, B., Whaley, J., Lam, M.S.: Reflection Analysis for Java. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 139–160. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  11. 11.
    Mayer, P., Schroeder, A.: Patterns of Cross-Language Linking in Java Frameworks. In: Proceedings of the 21st IEEE International Conference on Program Comprehension, pp. 113–122 (2013)Google Scholar
  12. 12.
    Mayer, P., Schroeder, A.: Towards Automated Cross-Language Refactorings between Java and DSLs used by Java Frameworks. In: Proceedings of the 6th ACM Workshop on Refactoring Tools, pp. 1–4 (2013)Google Scholar
  13. 13.
    Nguyen, H.V., Nguyen, H.A., Nguyen, T.T., Nguyen, T.N.: BabelRef: detection and renaming tool for cross-language program entities in dynamic web applications. In: Proceedings of the 34th International Conference on Software Engineering, pp. 1391–1394. IEEE Press (2012)Google Scholar
  14. 14.
    Pfeiffer, R.-H., Wąsowski, A.: Cross-Language Support Mechanisms Significantly Aid Software Development. In: France, R.B., Kazmeier, J., Breu, R., Atkinson, C. (eds.) MODELS 2012. LNCS, vol. 7590, pp. 168–184. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  15. 15.
    Pfeiffer, R.-H., Wąsowski, A.: TexMo: A Multi-language Development Environment. In: Vallecillo, A., Tolvanen, J.-P., Kindler, E., Störrle, H., Kolovos, D. (eds.) ECMFA 2012. LNCS, vol. 7349, pp. 178–193. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  16. 16.
    Schink, H., Kuhlemann, M., Saake, G., Lämmel, R.: Hurdles in Multi-language Refactoring of Hibernate Applications. In: Proceedings of the 6th International Conference on Software and Data Technologies, pp. 129–134. SciTePress (2011)Google Scholar
  17. 17.
    Sobernig, S., Zdun, U.: Evaluating java runtime reflection for implementing cross-language method invocations. In: Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java, pp. 139–147. ACM (2010)Google Scholar
  18. 18.
    Steimann, F., Thies, A.: From Public to Private to Absent: Refactoring Java Programs under Constrained Accessibility. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 419–443. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  19. 19.
    Strein, D., Kratz, H., Lowe, W.: Cross-Language Program Analysis and Refactoring. In: Proceedings of the 6th IEEE International Workshop on Source Code Analysis and Manipulation, pp. 207–216. IEEE Computer Society (2006)Google Scholar
  20. 20.
    Strein, D., Lincke, R., Lundberg, J., Löwe, W.: An Extensible Meta-Model for Program Analysis. IEEE Transactions on Software Engineering 33(9), 592–607 (2007)CrossRefGoogle Scholar
  21. 21.
    Tatlock, Z., Tucker, C., Shuffelton, D., Jhala, R., Lerner, S.: Deep typechecking and refactoring. In: Proceedings of the 23rd ACM SIGPLAN Conference on Object-Oriented Programming Systems Languages and Applications, pp. 37–52. ACM (2008)Google Scholar
  22. 22.
    Vakilian, M., Chen, N., Negara, S., Rajkumar, B.A., Bailey, B.P., Johnson, R.E.: Use, disuse, and misuse of automated refactorings. In: Proceedings of the 34th International Conference on Software Engineering, pp. 233–243. IEEE Press (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Philip Mayer
    • 1
  • Andreas Schroeder
    • 1
  1. 1.Programming & Software Engineering GroupLudwig-Maximilians-Universität MünchenGermany

Personalised recommendations