Skip to main content

Towards Roundtrip Engineering - A Template-Based Reverse Engineering Approach

  • Conference paper
Model Driven Architecture – Foundations and Applications (ECMDA-FA 2008)

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

Abstract

Model driven development suggests to make models the main artifact in software development. To get executable models in most cases code generation to a “traditional” programming language like e.g. Java is used. To obtain customizable code generation template-based approaches are applied, commonly. So, to adapt the generated code to platform specific needs templates are modified by the user. After code generation, in real world application the generated code is often changed e.g. by refactorings. To keep the code and the model synchronous reverse engineering is needed. Many approaches use a Java parser and a mapping from the Java parse tree to the UML model for this task. This causes maintenance issues since every change to a template potentially results in a change to this parse tree - model mapping. To tackle this maintenance problem our solution does not use a common language parser but uses the templates as a grammar to parse the generated code, instead. This way changes to the templates are automatically taken into account in the reverse engineering step. Our approach has been implemented and tested in the Fujaba CASE tool as a part of the model and template-based code generator CodeGen2 [11].

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 99.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.00
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. Velocity (2006), http://velocity.apache.org/

  2. Java Emitter Templates Tutorial (2008), http://www.eclipse.org/articles/Article-JET/jet_tutorial1.html/

  3. JavaCC (2008), https://javacc.dev.java.net/

  4. JJTree Reference Documentation (2008), https://javacc.dev.java.net/doc/JJTree.html

  5. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers, Principles, Techniques, and Tools. Addison-Wesley (1986)

    Google Scholar 

  6. Bork, M.: Reverse Engineering generierten Quelltexts durch Analyse von Velocity Templates. Master’s thesis, Kassel, Germany, Diploma I Thesis (2007)

    Google Scholar 

  7. Bork, M.: Reverse Engineering von Legacy Code: Optimierung des templatebasierten Reverse Engineerings zu einem transparenten und flexiblen Erkennungsmechanismus. Master’s thesis, Kassel, Germany (2007)

    Google Scholar 

  8. Briand, L., Labiche, Y., Miao, Y.: Towards the Reverse Engineering of UML Sequence Diagrams. wcre 0, 57 (2003)

    Google Scholar 

  9. Ferenc, R., Magyar, F., Beszedes, A., Kiss, A., Tarkiainen, M.: Columbus - Reverse Engineering Tool and Schema for C++. icsm 00, 172 (2002)

    Google Scholar 

  10. Fujaba Group. The Fujaba Toolsuite (1999), http://www.fujaba.de/

  11. Geiger, L., Schneider, C., Record, C.: Template- and modelbased code generation for MDA-Tools (2005)

    Google Scholar 

  12. Kaastra, M., Kapser, C.: Toward a semantically complete java fact extractor. Department of Computer Science, University of Waterloo (April 2003)

    Google Scholar 

  13. Klein, T.: Rekonstruktion von uml aktivitats- und kollaborationsdiagrammen aus java quelltexten. Master’s thesis, Paderborn University (1999)

    Google Scholar 

  14. Klen, T., Nickel, U.A., Niere, J., Zündorf, A.: From uml to java and back again. Technical Report tr-ri-00-216, University of Paderborn, Paderborn, Germany (September 1999)

    Google Scholar 

  15. Korshunova, E., Petkovic, M., van den Brand, M.G.J., Mousavi, M.R.: CPP2XMI: Reverse Engineering of UML Class, Sequence, and Activity Diagrams from C++ Source Code. In: WCRE, pp. 297–298. IEEE Computer Society (2006)

    Google Scholar 

  16. Nickel, U.A., Niere, J.: Modelling and simulation of a material flow system. In: Proc. of Workshop ’Modellierung’ (Mod), Bad Lippspringe, Germany, Gesellschaft für Informatik (2001)

    Google Scholar 

  17. Nickel, U.A., Niere, J., Wadsack, J.P., Zündorf, A.: Roundtrip engineering with fujaba. In: Ebert, J., Kullbach, B., Lehner, F. (eds.) Proc of 2nd Workshop on Software-Reengineering (WSR), Bad Honnef, Germany, Fachberichte Informatik, Universität Koblenz-Landau (August 2000)

    Google Scholar 

  18. Niere, J., Schäfer, W., Wadsack, J.P., Wendehals, L., Welsh, J.: Towards pattern-based design recovery. In: Proc. of the 24th International Conference on Software Engineering (ICSE), Orlando, Florida, USA, pp. 338–348. ACM Press (May 2002)

    Google Scholar 

  19. Niere, J., Wadsack, J.P., Wendehals, L.: Design pattern recovery based on source code analysis with fuzzy logic. Technical Report tr-ri-01-222, University of Paderborn, Paderborn, Germany (March 2001)

    Google Scholar 

  20. Niere, J., Wendehals, L., Zündorf, A.: An interactive and scalable approach to design pattern recovery. Technical Report tr-ri-03-236, University of Paderborn, Paderborn, Germany (January 2003)

    Google Scholar 

  21. Rountev, A., Volgin, O., Reddoch, M.: Control flow analysis for reverse engineering of sequence diagrams. Technical Report OSU-CISRC-3/04-TR12, Ohio State University (March 2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Ina Schieferdecker Alan Hartman

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bork, M., Geiger, L., Schneider, C., Zündorf, A. (2008). Towards Roundtrip Engineering - A Template-Based Reverse Engineering Approach. In: Schieferdecker, I., Hartman, A. (eds) Model Driven Architecture – Foundations and Applications. ECMDA-FA 2008. Lecture Notes in Computer Science, vol 5095. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69100-6_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69100-6_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69095-5

  • Online ISBN: 978-3-540-69100-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics