
Automatic code generation from unified modelling language sequence diagrams
Author(s) -
Kundu Debasish,
Samanta Debasis,
Mall Rajib
Publication year - 2013
Publication title -
iet software
Language(s) - English
Resource type - Journals
ISSN - 1751-8814
DOI - 10.1049/iet-sen.2011.0080
Subject(s) - computer science , sequence diagram , applications of uml , unified modeling language , uml tool , programming language , code generation , class diagram , communication diagram , object constraint language , systems modeling language , activity diagram , metamodeling , software engineering , software , computer security , key (lock)
Unified modelling language (UML) is a visual modelling language, which has gained popularity among software practitioners. In a model‐driven software development environment, the existing UML tools mainly support automatic generation of structural code from UML class diagrams. However, the code generation from UML diagrams such as statechart, activity, collaboration and sequence diagrams (SDs) are not supported by most UML tools and also have scarcely been reported in the literatures. This work proposes an approach to automatic generation of code from UML 2.x SDs of use cases. From the XML metadata interchange (XMI) representation of an SD of a use case, the authors construct a graph model called sequence integration graph (SIG). The SIG encapsulates information related to messages, control flow and method scope of interactions. These information are then used to generate code. The proposed approach has been tested using a number of real‐life application systems and the results substantiate the efficacy of the approach to synthesise the code for controller classes. The authors observe that approximately 48% of the total lines of code within controller class methods can be generated with the proposed approach. The proposed approach can be easily extended to other behavioural UML models such as interaction‐overview diagrams, communication diagrams and activity diagrams.