计算机工程与应用 ›› 2012, Vol. 48 ›› Issue (1): 76-80.

• 研发、设计、测试 • 上一篇    下一篇

支持MDA的设计模式建模与模型转换方法研究

曾 一,周 吉,孙 政,许 林   

  1. 重庆大学 计算机学院,重庆 400030

  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2012-01-01 发布日期:2012-01-01

Research on MDA-supported design pattern modeling and model transformation method

ZENG Yi, ZHOU Ji, SUN Zheng, XU Lin   

  1. College of Computer Science, Chongqing University, Chongqing 400030, China
  • Received:1900-01-01 Revised:1900-01-01 Online:2012-01-01 Published:2012-01-01

摘要: 设计模式是描述某一类问题的通用解决方案,可以提高软件开发的可重用性,但在设计模式建模中存在模式消失和模式组合复杂化等问题,模型的可扩展性低,不利于模型到代码的自动化转换。由此,在MDA框架下,引入角色的建模思想,提出了一种基于Ecore的设计模式建模和模型转换方法,该方法在元模型层抽象并扩展了设计模式通用元素的元模型,使得不同的模式组合模型通过对相同的模式元素元模型进行转换可以获得相应的应用模型,从而增强了设计模式建模的可扩展性和模型转换的通用性,为MDA框架中设计模式建模和模型转换提供了一种有效的途径。

关键词: 设计模式, 模型转换, 模型驱动架构, 模式通用元素, 元模型

Abstract: Design pattern is a common solution for describing one kind of problems in software development, which helps to improve the reusability in software development. However, it suffers from the pattern lost and complicated pattern combination problems and as a result the design model performs not so well in auto transformation to code. This paper proposes a design pattern method based on Ecore and also a model transformation method in MDA. By introducing role concept in model constructing, it abstracts and extends the generic elements of meta-models of design pattern in the meta-model layer, so as to make different pattern combination models transform on the same elements of pattern meta-models to obtain their corresponding application models. The proposed method improves the extendibility of the design pattern modeling and the availability of model transformation, which provides an effective way to the model constructing and transformation in MDA.

Key words: design patterns, model transformation, Model Driven Architecture(MDA), generic elements of pattern, meta-model