摘要
UML是一种被广泛用于软件系统需求分析和详细设计的标准建模语言,研究将UML描述的软件详细设计自动生成代码的技术可以大大加速软件产品的开发进度,提高软件的质量。提出一种将UML类图和顺序图相结合生成具有静态结构和动态行为信息的C++代码的方法,从而解决现在多数代码生成工具只能将静态图转换为C++代码框架而不能处理动态行为模型转换的问题。该方法包括UML类图和顺序图的元模型以及相应的转换规则。最后通过一个采用Velocity技术实现的代码生成器生成代码的实例描述了代码生成的具体过程及结果。
UML is a standard modelling language and is widely used in requirement analysis and high level design of software system. Research on the technology of generating C + + code automatically from high !evel software design depicted by UML can greatly accelerate the development process of software products and improve its quality. We propose an approach, which integrates UML class and sequence diagrams to form the C + + code containing both the static structure and dynamic behaviour information of the software system, therefore solves the problems of the current code generation tools that they are only able to transform static diagrams to C + + code frame other than dealing with the transformation of dynamic behaviour models. This approach consists of meta models of UML class and sequence diagrams as well as the corresponding transformation rules. A case of code generation by code generator, which is realized by Velocity, is used to present the specific process and result of code generation.
出处
《计算机应用与软件》
CSCD
北大核心
2013年第1期190-195,共6页
Computer Applications and Software