| With the object-oriented software development methods widely used, Modeling Driven Architecture is becoming an important way of software development, it focuses on modeling and model transformation during the entire system development process. Code generation as the final step of MDA development method has obvious engineering application values. Currently code generation of UML static structure model based on the static structure have been a mature technology both at home and abroad. But there are fewer dynamic model code generation tools.In view of lack of code generation tool for dynamic model, this thesis analyzes the model driven software development process, designs and implements state machine C code generator, solves the problem of dynamic structure model code generation. The generator uses QEP state machine code conversion technology to define the mapping rules and oAW code generation technology to achieve the underlying framework C code of the system from the state machine model. This thesis focuses on the mapping rules of the conversion from state machine to C code. Finally, the generator is integrated into the development environment, and conductes a white-box testing on the code generator. The result shows that the code generator achieves the expected goal and meets use need. |