Browse > Article

Code Generation from the Statechart Based on XMI  

Lim, Joa-Sang (상명대학교 디지털미디어학부)
Kim, Jin-Man (상명대학교 일반대학원 컴퓨터과학과)
Publication Information
Journal of Internet Computing and Services / v.12, no.6, 2011 , pp. 161-170 More about this Journal
Abstract
Despite some practical confusion over the variations in the diagram which may be drawn differently depending upon the CASE, the statechart of UML has been widely used to show the dynamic behaviour of the systems. Prior research has employed either simple switch-case statement or the state design pattern to generate source code from the statechart, which may result in varying source codes. This paper made an attempt to formally define the statechart and generate source codes from it. Firstly we cleaned up the XMI which was generated from different CASEs. This XMI has been translated to the EHA to identify automata contained in it. Then the elements of the statechart metamodel were mapped to the java programs. We also verified the quality of source codes by measuring functionality and maintainability. The case employed in this study was the air conditioner. The reason was that the case includes various states and transitions of interest. It was found that XMI was well extracted by removing some legacy codes in the CASE and the source codes were then successfully generated with the concurrency and hierarchy of the statechart. Further research is required to validate it practical significance with a larger case.
Keywords
Statechart; XMI; Code Generation;
Citations & Related Records
연도 인용수 순위
  • Reference
1 Mikk, E., Y. Lakhnechi, and M. Siegel. 'Hierarchical automata as model for statecharts', In R. Shyamasundar and K. Euda, editors, Third Asian Computing Science Conference. Advances in Computing Sience ASIAN' 97, volume 1345 of Lecture Notes in Computer Science, SpringerVerlag, pp.181-196, 1997.
2 Bokhari, A. and S. Poehlman, 'Formalization of UML State-Charts: Approaches for Handling Composite States', Department of Computing & Software, McMaster University, Technical Report CAS, 2005
3 Chow, T. S., 'Testing Software Design Modeled by Finite-State Machines', Software Engineering IEEE, pp.178-187, 1978
4 Coleman, D., D. Ash, B. Lowther, and P. Oman, 'Using metrics to evaluate software system maintainability', IEEE COMPUTER, pp.44-49, 1994
5 Czarnecki, K. and U. Eisenecker, 'Generative Programming: Methods, Tools, and Applications', Addison-Wesley, 2000.
6 Ali, J. and J. Tanaka, 'Implementing the dynamic behavior represented as multiple state diagrams and activity diagrams', ACIS Int. J Comp. Inf. Sci., VOL.2(1), pp.24-36, 2001.
7 Zhang, H., S. Jarzabek, and S. Soe Myat, 'XVCL approach to separating concerns in product family assets', Erfurt, Germany: Springer-Verlag, 2001.
8 Cleaveland, J.C., 'Program Generators with XML and Java', Prentice Hall, 2001.
9 Ray, W.J. and A. Farrar, 'Object Model Driven Code Generation for the Enterprise, in Rapid System Prototyping', IEEE International Workshop. 2001.
10 Niaz, I.A. and J. Tanaka, 'CODE GENERATION FROM UML STATECHARTS', The 7th IASTED International Conference on Intelligent Systems and Control (SEA2003), 2003.
11 Blech, J.O., S. Glesner, and J. Leitner, 'Formal Verification of Java Code Generation from UML Models', the 3rd International Fujaba Days 2005, 2005.
12 Pinter, G. and I. Majzik, 'AUTOMATIC CODE GENERATION BASED ON FORMALLY ANALYZED UML STATECHART MODELS', Formal Methods for Railway Operation and Control Systems, 2003.
13 Pinter, G. and I. Majzik, 'PROGRAM CODE GENERATION BASED ON UML STATECHART MODELS', Periodica Polytechnica Electrical Engineering, VOL. 47, NO. 3-4, pp.187-204, 2003.
14 Niaz, I.A. and J. Tanaka, 'MAPPING UML STATECHARTS TO JAVA CODE', IASTED International Conf. on Software Engineering (SE2004), 2004.
15 Niaz, I.A. and J. Tanaka, 'An Object-Oriented Approach To Generate Java Code From UML Statecharts', Computer & Information Science, VOL. 6, NO. 2, 2005.
16 Douglass, B.P. and D. Harel, 'Real-Time UML: Developing Efficient Objects for Embedded Systems', Addison Wesley Longman, 1998.
17 Telelogic Inc., Rhapsody, http://modeling.telelogic.com/
18 Sengupta, S., A. Kanjilal, and S. Bhattacharya, 'Automated Translation of behavioral models using OCL and XML', TENCON 2005 IEEE Region 10, pp.1-6, 2005.
19 Sturm, T., J.v. Voss, and M. Boger, 'Generating Code from UML with Velocity Templates', the 5th International Conference on The Unified Modeling Language, Springer-Verlag, 2002.