{"title":"Code Generation from UML State Chart Diagrams","authors":"Xingchan Li, Xinquan Wu","doi":"10.1109/icmss55574.2022.00010","DOIUrl":null,"url":null,"abstract":"Event-driven systems can be modeled and implemented by Unified Modeling Language (UML) state chart. However, with the increase of complexity of the state chart diagram has a serious effect on code generation and code coupling. This paper presents a pattern-based approach to generate code from the UML state chart diagram. Firstly, a novel design pattern is exploited for the implementation of the state diagram which includes hierarchical, concurrent, and history states. The proposed pattern is an extension of state pattern by using the concept of object composition and delegation. Secondly, the mapping rules are defined for correspondence to the new pattern. Then, the code templates are customized by complying with the mapping rules. Finally, The effectiveness of the method proposed in this paper is analyzed based on the case of a microwave oven control system.","PeriodicalId":338995,"journal":{"name":"2022 International Conference on Management Engineering, Software Engineering and Service Sciences (ICMSS)","volume":"163 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 International Conference on Management Engineering, Software Engineering and Service Sciences (ICMSS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/icmss55574.2022.00010","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
Event-driven systems can be modeled and implemented by Unified Modeling Language (UML) state chart. However, with the increase of complexity of the state chart diagram has a serious effect on code generation and code coupling. This paper presents a pattern-based approach to generate code from the UML state chart diagram. Firstly, a novel design pattern is exploited for the implementation of the state diagram which includes hierarchical, concurrent, and history states. The proposed pattern is an extension of state pattern by using the concept of object composition and delegation. Secondly, the mapping rules are defined for correspondence to the new pattern. Then, the code templates are customized by complying with the mapping rules. Finally, The effectiveness of the method proposed in this paper is analyzed based on the case of a microwave oven control system.