Title :
Automatic code generation from unified modelling language sequence diagrams
Author :
Kundu, Debasis ; Samanta, Debasis ; Mall, Raghvendra
Author_Institution :
Sch. of Inf. Technol., Indian Inst. of Technol., Kharagpur, Kharagpur, India
Abstract :
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.
Keywords :
Unified Modeling Language; XML; directed graphs; software maintenance; visual programming; SIG; UML 2.x SD; UML class diagrams; UML tools; XMI; XML metadata interchange representation; activity diagrams; automatic structural code generation; behavioural UML models; communication diagrams; interaction-overview diagrams; model-driven software development environment; sequence integration graph model; unified modelling language sequence diagrams; visual modelling language;
Journal_Title :
Software, IET
DOI :
10.1049/iet-sen.2011.0080