Abstract
Model-driven software modernization is a discipline in which model-driven development (MDD) techniques are used in the modernization of legacy systems. When existing software artifacts are evolved, they must be transformed into models to apply MDD techniques such as model transformations. Since most modernization scenarios (e.g., application migration) involve dealing with code in general-purpose programming languages (GPL), the extraction of models from GPL code is an essential task in a model-based modernization process. This activity could be performed by tools to bridge grammarware and MDD technical spaces, which is normally carried out by dedicated parsers. Grammar-to-Model Transformation Language (Gra2MoL) is a domain-specific language (DSL) tailored to the extraction of models from GPL code. This DSL is actually a text-to-model transformation language which can be applied to any code conforming to a grammar. Gra2MoL aims to reduce the effort needed to implement grammarware-MDD bridges, since building dedicated parsers is a complex and time-consuming task. Like ATL and RubyTL languages, Gra2MoL incorporates the binding concept needed to write mappings between grammar elements and metamodel elements in a simple declarative style. The language also provides a powerful query language which eases the retrieval of scattered information in syntax trees. Moreover, it incorporates extensibility and grammar reuse mechanisms. This paper describes Gra2MoL in detail and includes a case study based on the application of the language in the extraction of models from Delphi code.
Similar content being viewed by others
References
Heckel, R., Correia, R., Matos, C., El-Ramly, M., Koutsoukos, G., Andrade, L.: Architectural transformations: from legacy to three-tier and services. In: Mens, T., Demeyer, S. (eds.) Software Evolution, p. 170. Springer, Heidelberg (2008)
Cánovas Izquierdo, J.L., García Molina, J.: An architecture-driven modernization tool for calculating metrics. IEEE Softw. 27, 37–43 (2010)
Andrade, L.F., Gouveia, J., Antunes, M., El-Ramly, M., Koutsoukos, G.: Forms2Net - migrating oracle forms to Microsoft. NET. In: Generative and Transformational Techniques in Software Engineering, pp. 261–277 (2006)
Reus, T., Geers, H., Deursen, A.: Harvesting software systems for MDA-based reengineering. In: European Conference on Model Driven Architecture: Foundations and Applications, LNCS, vol. 4066, pp. 213–225 (2006)
ADM initiative website. http://adm.omg.org. Accessed 6 March 2012
ADM Task Force: Architecture-driven modernization scenarios. OMG, USA (2006)
Kurtev, I., Bézivin, J., Aksit, M.: Technological spaces: An initial appraisal. In: Cooperative Information Systems, DOA’2002 Federated Conferences, Industrial track (2002)
Xtext project. http://www.eclipse.org/Xtext. Accessed 6 March 2012
EMFText project. http://emftext.org. Accessed 6 March 2012
Czarnecki, K., Helsen, S.: Feature-based survey of model transformation approaches. IBM Syst. 45(3), 621–646 (2006)
Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL: A model transformation tool. Sci. Comp. Program. 72(1–2), 31–39 (2008)
Heaton, L.: Meta Object Facility (MOF) Query/View/ Transformation Specification. OMG, New York (2005)
Sánchez Cuadrado, J., García Molina, J., Mernárguez Tortosa, M.: RubyTL: A practical, extensible transformation language. In: European Conference on Model Driven Architecture: Foundations and Applications, LNCS, vol. 4066, pp. 158–172 (2006)
Mofscript project. http://www.eclipse.org/gmt/mofscript. Accessed 6 March 2012
Xpand website. http://wiki.eclipse.org/Xpand. Accessed 6 March 2012
Cánovas Izquierdo, J.L., Sánchez Cuadrado, J., García Molina, J.: Gra2MoL: A domain specific transformation language for bridging grammarware to modelware in software modernization. In: Workshop Model Driven Software Evolution (2008)
Cánovas Izquierdo, J.L., García Molina, J.: A domain specific language for extracting models in software modernization. In: European Conference on Model Driven Architecture Foundations and Applications, LNCS, vol. 5562, pp. 82–97 (2009)
Gra2MoL website. http://modelum.es/gra2mol. Accessed 6 March 2012
Wijngaarden, J., Visser, E.: Program transformation mechanics: a classification of mechanisms for program transformation with a survey of existing transformation systems. Tech. Rep. UU-CS-2003-048. The Department of Information and Computing Sciences, Utrecht University, The Netherlands (2003)
JDT Eclipse project. http://www.eclipse.org/jdt. Accessed 6 March 2012
MoDisco. http://www.eclipse.org/gmt/modisco. Accessed 6 March 2012
GMT Eclipse project. http://www.eclipse.org/gmt. Accessed 6 March 2012
KDM metamodel specification. http://www.omg.org/spec/KDM. Accessed 6 March 2012
Fowler, M.: Domain-Specific Languages. Addison Wesley, USA (2011)
Scheidgen, M.: Textual Modelling Embedded into Graphical Modelling. In: European Conference on Model Driven Architecture Foundations and Applications, LNCS, vol. 4530, pp. 153–168 (2008)
Jouault, F., Bézivin, J., Kurtev, I.: TCS: a dsl for the specification of textual concrete syntaxes in model engineering. In: Generative Programming and Component, Engineering, pp. 249–254 (2006)
JAMOPP project. http://jamopp.inf.tu-dresden.de. Accessed 6 March 2012
Wimmer M., Kramler, G.: Bridging grammarware and modelware. In: Satellite Events at the MoDELS 2005 Conference, pp. 159–168 (2006)
Kunert, A.: Semi-automatic generation of metamodels and models from grammars and programs. In: Fifth International Workshop on Graph Transformation and Visual Modeling Techniques. E. N. in Theorical Computer Science, vol. 211, pp. 111–119 (2008)
Prinz, A., Scheidgen, M., Tveit, M.S.: A model-based standard for SDL. In: International SDL Forum Conference on Design for Dependable Systems, pp. 1–18 (2007)
Stratego/XT. http://strategoxt.org. Accessed 6 March 2012
TXL. http://www.txl.ca. Accessed 6 March 2012
OCL constraint language. OMG (2006)
Wijngaarden, J.: Code Generation from a Domain Specific Language: M.Sc. Thesis (2003)
ASTM metamodel specification. http://www.omg.org/spec/ASTM Accessed 6 March 2012
Xpath. http://www.w3.org/TR/xpath. Accessed 6 March 2012
CDO project. http://www.eclipse.org/cdo. Accessed 6 March 2012
Czarnecki, K., Helsen, S.: Classification of model transformation approaches. In: Proceedings of the 2nd OOPSLA Workshop on Generative Technique in the Context of the Model Driven, Architecture (2003)
Espinazo-Pagán, J., Sánchez Cuadrado, J., García Molina, J.: Morsa: A scalable approach for persisting and accessing large models. In: International Conference on Model Driven Engineering Languages and Systems, pp. 77–92 (2011)
Acknowledgments
This work has been supported by the Spanish government (TIN2009-11555 project) and the Fundación Séneca of the Regional Government of Murcia (15389/PI/10 grant).
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Dr. D. Tamzalit, B. Schätz, D. Deridder and A. Pierantonio.
Rights and permissions
About this article
Cite this article
Cánovas Izquierdo, J.L., García Molina, J. Extracting models from source code in software modernization. Softw Syst Model 13, 713–734 (2014). https://doi.org/10.1007/s10270-012-0270-z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-012-0270-z