Font Size: a A A

Research On Automatic Code Generation Based On Activity Diagram

Posted on:2011-02-19Degree:MasterType:Thesis
Country:ChinaCandidate:Z C WangFull Text:PDF
GTID:2178330338479949Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Over the years, for Model Software, the development productivity is too low, the cycle is too long, the cost is too high, and the risk is too difficult to control. It has been a key factor for restricting the pace of upgrade and reducing production efficiency of weapons and equipment. Using Automatic Code Generation approach can fully inherit the previous software development experience. Based on Software Reuse, we can find a rapid software development way of high-quality, high-security and high-reliability.UML activity diagram model can describe system workflow and concurrent activities. It is an important tool for describing system behavior, and it's the blueprint for the visualization of system functions. UML activity diagram includes fork and join nodes, which can create and combine process. By using these nodes, we can intuitively and easily show interations between multiple process. UML activity diagram is a powerful tool for studying multi-process concurrency.This paper mainly does the research on relevant technologies of UML Activity Diagram based Automatic Code Generation, and design an Automatic Code Generation System for part of the nodes in Activity Diagram. The paper includes following aspects:Firstly, we do the semantic analysis on all the nodes of Activity Diagram to understand the basic semantics of each node, judging that whether it can be generated to code automatically, and what kind of code it can be generated to. Then, we choose six kinds of nodes which can completely describe the concurrency as the research target. Further more, design an Automatic Code Generation System. As the Java language features to support multi-threaded programming, the object code identified as Java code.The core idea of the Automatic Code Generation System is described as below: at first, XML file format is defined to describe the activity diagram. Secondly, activity diagram in XML file format is imported into the program using DOM technology. Thirdly, the activity diagram splits into separate activity sub-graphs. Then, the sub-graph spilts into some threads and semaphores which can control the running of threads. At last, for every thread and semaphore, the corresponding code is generated.Finally presented multi-nested and complex concurrent activity diagram test cases. By using the system, realize the cases'automatic code generation, and analysis the running result of the generated code, judging that whether it is consistent with activity diagram semantics. Through these process, display the function of the system.
Keywords/Search Tags:UML Activity Diagram, Automatic Code Generation, Concurrency
PDF Full Text Request
Related items