Abstract
Software models at different levels of abstraction and from different perspectives contribute to the creation of compilable code in the implementation phase of the SDLC. Traditionally, the development of the code is a human-intensive act and prone to misinterpretation and defects. The defect elimination process is again an arduous time-consuming task with increased time-to-deliver and cost. Hence, a novel approach is proposed to generate the code with the activity diagram and sequence diagram as the focus. The activity diagram and sequence diagrams and are defined as part of the UML definition to define the object flow of the system and interaction between the objects, respectively. An XMI schema is a text representation of any software model that is exported from a modeling tool. The modeling tool BoUML exports the required schema from the given input models such as sequence diagrams and activity diagrams. The proposed JC_Gen extracts artifacts from the XMI schema of these two models to generate the code automatically. The focus is mainly on class definition, member declaration, methods’ definition, and function call in generated code.
Similar content being viewed by others
References
James B, “System Development Life Cycle (SDLC)—Risk Management Frammework.” https://www.oreilly.com/library/view/risk-management-framework/9781597499958/B9781597499958000053.xhtml Accessed June 03 2021
Zhu ZJ, Zulkernine M (2009) A model-based aspect-oriented framework for building intrusion-aware software systems. Inf Softw Technol 51(5):865–875. https://doi.org/10.1016/j.infsof.2008.05.007
George MLV, Vadakkumcheril T, Mythily M (2013) A simple implementation of UML sequence diagram to java code generation through XMI representation. Int J Comput Theory Eng 3(12):35–41. https://doi.org/10.7763/IJCTE.2009.V1.6
Kong J, Zhang K, Dong J, Xu D (2009) Specifying behavioral semantics of UML diagrams through graph transformations. J Syst Softw 82(2):292–306. https://doi.org/10.1016/j.jss.2008.06.030
Cruz-Lemus JA, Genero M, Caivano D, Abrahão S, Insfrán E, Carsí JA (2010) Assessing the influence of stereotypes on the comprehension of UML sequence diagrams: a family of experiments. Inf Softw Technol 53(12):1391–1403. https://doi.org/10.1016/j.infsof.2011.07.002
Babenko LP (2003) UML-based software engineering. Cybernet Syst Anal 39(1):65–70
Zou Y, Xiao H, Chan B (2007) Weaving business requirements into model transformations. Business, 1–10
de Castro V, Marcos E, Vara JM (2011) Applying CIM-to-PIM model transformations for the service-oriented development of information systems. Inf Softw Technol 53(1):87–105. https://doi.org/10.1016/j.infsof.2010.09.002
Asztalos M, Lengyel L (2008) A metamodel-based matching algorithm for model transformations. Computational Cybernetics, 2008. ICCC 2008. IEEE International Conference on, pp 151–155
Sanchez Cuadrado J, Guerra E, de Lara J (2014) A component model for model transformations. IEEE Trans Softw Eng 40(11):1042–1060. https://doi.org/10.1109/TSE.2014.2339852
Czarnecki K, Helsen S (2003) Classification of model transformation approaches. pp 1–17
Bollati VA, Vara JM, Jiménez Á, Marcos E (2013) Applying MDE to the (semi-)automatic development of model transformations. Inf Softw Technol 55(4):699–718. https://doi.org/10.1016/j.infsof.2012.11.004
Mythily M, Valarmathi ML, Durai CAD (2018) Model transformation using logical prediction from sequence diagram: an experimental approach. Clust Comput. https://doi.org/10.1007/s10586-017-1618-5
Niaz IA, Tanaka J (2005) An object-oriented approach to generate java code from UML statecharts. Int J Comput Inf Sci 6(2):83–98
Niaz IA, Tanaka J, Mapping uml statecharts to java code
Niaz IA, Tanaka J Code generation from uml statecharts
Jakimi A, Elkoutbi M (2009) Automatic code generation from UML statechart. Int J Eng Technol 1(2):165–168
Burke PW, Sweany P (2007) Automatic code generation through model-driven design
Usman M, Nadeem A (2009) Automatic generation of java code from UML diagrams using UJECTOR. Int J Softw Eng Appl 3(2):21–37
Parada AG, Siegert E, de Brisolara LB (2011) Generating java code from UML class and sequence diagrams. Int J Comput Inf Sci, 99–101
Engels GW, Hücking R, Sauer S (1999) UML collaboration diagrams and their transformation to Java. In: International Conference on the Unified Modeling Language, pp 473–488. https://doi.org/10.1007/3-540-46852-8_34
Reinhartz-berger I, Dori D (2004) “Object-process methodology (OPM) vs. UML : a code generation perspective
Stavrou A, Papadopoulos GA (2007) Automatic generation of executable code from software architecture models. In: information system development, Springer, Boston, MA, 2007, pp 1–12. https://doi.org/10.1007/978-0-387-78578-3_36
Singh S (2012) Effort reduction by automatic code generation. Int J Comput Sci Eng Technol (lJCSET) 3(8):366–369
Rugina A, Thomas D, Olive X, Veran G (2008) Gene-auto : automatic software code generation for real-time embedded systems. In: proceedings of DASIA 2008 data systems in aerospace, no 1
Robbins JE, Redmiles DF (2000) Cognitive support, UML adherence, and XMI interchange in Argo/UML. Inf Softw Technol 42(2):79–89. https://doi.org/10.1016/S0950-5849(99)00083-X
Chen H (2020) Design and implementation of automatic code generation method based on model driven. J Phys Conf Series. https://doi.org/10.1088/1742-6596/1634/1/012019
Bruno, “BOUMLtutorial,” 2011. http://www.bouml.fr/tutorial/tutorial.html
Barclay K, Savage AJ (2004) Object-oriented design with UML and java. Elsevier Butterworth-Heinemann, [Online]. Available: http://digilib.mercubuana.ac.id/manager/n!@file_ebook/Isi1964329425705.pdf
Domínguez E, Lloret J, Pérez B, Rodríguez Á, Rubio ÁL, Zapata MA (2011) Evolution of XML schemas and documents from stereotyped UML class models: a traceable approach. Inf Softw Technol 53(1):34–50. https://doi.org/10.1016/j.infsof.2010.08.001
Dimaridou V, Kyprianidis AC, Papamichail M, Diamantopoulos T, Symeonidis A (2019) Towards modeling the user-perceived quality of source code using static analysis metrics. ICSOFT 2017—Proceedings of the 12th International Conference On Software Technologies, no. March 2019, pp 73–84, 2017, https://doi.org/10.5220/0006420000730084
Kosower DA, Lopez-Villarejo JJ (2015) Flowgen: flowchart-based documentation for C++ codes. Comput Phys Commun 196:497–505. https://doi.org/10.1016/j.cpc.2015.05.029
Flater D, Martin P, Crane M (2009) Rendering UML Activity Diagrams as Human-Readable Text. Ike, pp 207–213, [Online]. Available: http://dblp.uni-trier.de/db/conf/ike/ike2009.html#FlaterMC09
Riesco M, Fondón MD, Álvarez D (2008) Using graphviz as a low-cost option to facilitate the understanding of unix process system calls. Electron Notes Theor Comput Sci 224(2):89–95. https://doi.org/10.1016/j.entcs.2008.12.052
Kraft NA, Lloyd EL, Malloy BA, Clarke PJ (2006) The implementation of an extensible system for comparison and visualization of class ordering methodologies. J Syst Softw 79(8):1092–1109. https://doi.org/10.1016/j.jss.2005.10.019
Haw SC, Rao GSVRK (2007) A comparative study and benchmarking on XML parsers. Int Conf Adv Commun Technol ICACT 1:321–325. https://doi.org/10.1109/ICACT.2007.358364
Oliveira B, Santos V, Belo O (2013) Processing XML with Java—A Performance Benchmark. Int J New Comput Architect Appl 3(1):72–85
“UML sequence diagrams overview of graphical notation - lifeline, message, execution specification, interaction use, etc.” https://www.uml-diagrams.org/sequence-diagrams.html Accessed Mar 05 2018
Geary RF, Rahman N, Raman R, Raman V (2006) A simple optimal representation for balanced parentheses. Theoret Comput Sci 368(3):231–246. https://doi.org/10.1016/j.tcs.2006.09.014
Giuseppe N (2018) Template-based code generation with apache velocity, Part 1 - O’Reilly Media. http://www.onjava.com/pub/a/onjava/2004/05/05/cg-vel1.html Accessed Mar 05 2018
Li Z, Jiang Y, Zhang XJ, Xu HY (2020) The metric for automatic code generation. Procedia Comput Sci 166:279–286. https://doi.org/10.1016/j.procs.2020.02.099
Acknowledgements
This research is done with the financial support by the Deanship of Scientific Research at King Khalid University under research grant number RGP.1/210/42.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Durai, A.D., Ganesh, M., Mathew, R.M. et al. A novel approach with an extensive case study and experiment for automatic code generation from the XMI schema Of UML models. J Supercomput 78, 7677–7699 (2022). https://doi.org/10.1007/s11227-021-04164-x
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-021-04164-x