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].
Keywords
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Velocity (2006), http://velocity.apache.org/
Java Emitter Templates Tutorial (2008), http://www.eclipse.org/articles/Article-JET/jet_tutorial1.html/
JavaCC (2008), https://javacc.dev.java.net/
JJTree Reference Documentation (2008), https://javacc.dev.java.net/doc/JJTree.html
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers, Principles, Techniques, and Tools. Addison-Wesley (1986)
Bork, M.: Reverse Engineering generierten Quelltexts durch Analyse von Velocity Templates. Master’s thesis, Kassel, Germany, Diploma I Thesis (2007)
Bork, M.: Reverse Engineering von Legacy Code: Optimierung des templatebasierten Reverse Engineerings zu einem transparenten und flexiblen Erkennungsmechanismus. Master’s thesis, Kassel, Germany (2007)
Briand, L., Labiche, Y., Miao, Y.: Towards the Reverse Engineering of UML Sequence Diagrams. wcre 0, 57 (2003)
Ferenc, R., Magyar, F., Beszedes, A., Kiss, A., Tarkiainen, M.: Columbus - Reverse Engineering Tool and Schema for C++. icsm 00, 172 (2002)
Fujaba Group. The Fujaba Toolsuite (1999), http://www.fujaba.de/
Geiger, L., Schneider, C., Record, C.: Template- and modelbased code generation for MDA-Tools (2005)
Kaastra, M., Kapser, C.: Toward a semantically complete java fact extractor. Department of Computer Science, University of Waterloo (April 2003)
Klein, T.: Rekonstruktion von uml aktivitats- und kollaborationsdiagrammen aus java quelltexten. Master’s thesis, Paderborn University (1999)
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)
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)
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)
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)
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)
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)
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)
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)
Author information
Authors and Affiliations
Editor information
Rights 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)