Skip to main content
Log in

A novel approach with an extensive case study and experiment for automatic code generation from the XMI schema Of UML models

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3

source model

Fig. 4
Fig. 5

source model

Fig. 6

Similar content being viewed by others

References

  1. 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

  2. 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

    Article  Google Scholar 

  3. 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

    Article  Google Scholar 

  4. 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

    Article  Google Scholar 

  5. 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

    Article  Google Scholar 

  6. Babenko LP (2003) UML-based software engineering. Cybernet Syst Anal 39(1):65–70

    Article  Google Scholar 

  7. Zou Y, Xiao H, Chan B (2007) Weaving business requirements into model transformations. Business, 1–10

  8. 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

    Article  Google Scholar 

  9. 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

  10. 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

    Article  Google Scholar 

  11. Czarnecki K, Helsen S (2003) Classification of model transformation approaches. pp 1–17

  12. 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

    Article  Google Scholar 

  13. 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

    Article  Google Scholar 

  14. 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

    Google Scholar 

  15. Niaz IA, Tanaka J, Mapping uml statecharts to java code

  16. Niaz IA, Tanaka J Code generation from uml statecharts

  17. Jakimi A, Elkoutbi M (2009) Automatic code generation from UML statechart. Int J Eng Technol 1(2):165–168

    Article  Google Scholar 

  18. Burke PW, Sweany P (2007) Automatic code generation through model-driven design

  19. Usman M, Nadeem A (2009) Automatic generation of java code from UML diagrams using UJECTOR. Int J Softw Eng Appl 3(2):21–37

    Google Scholar 

  20. Parada AG, Siegert E, de Brisolara LB (2011) Generating java code from UML class and sequence diagrams. Int J Comput Inf Sci, 99–101

  21. 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

  22. Reinhartz-berger I, Dori D (2004) “Object-process methodology (OPM) vs. UML : a code generation perspective

  23. 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

  24. Singh S (2012) Effort reduction by automatic code generation. Int J Comput Sci Eng Technol (lJCSET) 3(8):366–369

    Google Scholar 

  25. 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

  26. 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

    Article  Google Scholar 

  27. 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

    Article  Google Scholar 

  28. Bruno, “BOUMLtutorial,” 2011. http://www.bouml.fr/tutorial/tutorial.html

  29. 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

  30. 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

    Article  Google Scholar 

  31. 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

  32. 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

    Article  Google Scholar 

  33. 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

  34. 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

    Article  Google Scholar 

  35. 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

    Article  Google Scholar 

  36. 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

    Article  Google Scholar 

  37. Oliveira B, Santos V, Belo O (2013) Processing XML with Java—A Performance Benchmark. Int J New Comput Architect Appl 3(1):72–85

    Google Scholar 

  38. “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

  39. 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

    Article  MathSciNet  MATH  Google Scholar 

  40. 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

  41. 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

    Article  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Mythily Ganesh.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-021-04164-x

Keywords

Navigation