基于模型集成计算的领域建模研究与应用

上传人:E**** 文档编号:118199956 上传时间:2019-12-11 格式:PDF 页数:61 大小:2.71MB
返回 下载 相关 举报
基于模型集成计算的领域建模研究与应用_第1页
第1页 / 共61页
基于模型集成计算的领域建模研究与应用_第2页
第2页 / 共61页
基于模型集成计算的领域建模研究与应用_第3页
第3页 / 共61页
基于模型集成计算的领域建模研究与应用_第4页
第4页 / 共61页
基于模型集成计算的领域建模研究与应用_第5页
第5页 / 共61页
点击查看更多>>
资源描述

《基于模型集成计算的领域建模研究与应用》由会员分享,可在线阅读,更多相关《基于模型集成计算的领域建模研究与应用(61页珍藏版)》请在金锄头文库上搜索。

1、杭州电子科技大学 硕士学位论文 基于模型集成计算的领域建模研究与应用 姓名:程东武 申请学位级别:硕士 专业:计算机应用技术 指导教师:吴国华 20091101 杭州电子科技大学硕士学位论文 I 摘摘 要要 随着计算机技术的发展,软件功能日益丰富。基于反复编码测试的传统软件开发方法费 时且开发的系统不易维护。模型驱动的软件工程是指在软件开发过程中应用建模技术,其目 的是软件开发过程中应用建模技术提高抽象层次。纵观软件工程的历史,计算机软件开发方 法的每一次变革都是通过提高系统的抽象层次实现,软件开发语言经历汇编语言到第三代语 言,如 FORTRAN 和 C 到面向对象语言 C+和 Java。当

2、前,可视化建模语言是计算机语言的 最高水平。 统一建模语言 UML 和 MDA 的流行,使得模型成为软件开发的核心制品,提升了软件开 发的抽象层次,从而提高软件开发效率和软件的可维护性。但是,UML 作为一种通用的建模 语言过于通用,还难以从 UML 模型生成完整的应用程序系统。首先,UML 建模工具生成的 代码还是应用程序的框架代码, 具体的实现还需手工编写。 其次, UML 所包含的建模概念 (如 类,对象、属性和操作等)都是来源于面向对象编程语言,而不是应用系统的问题域,现在 还难以实现 UML 模型生成完整的应用系统,使得 UML 建模概念与问题域之间存在隔阂。再 次,UML 虽然是通

3、用建模语言,但是它也并非万能,不同的领域可能需要不同的建模语言。 因此,人们通常根据应用系统的需求建立自己的建模语言及其建模环境。 面向领域建模被称为“下一代建模方法” ,通过对特定领域分析和抽象,得到该领域的共 性和特性,建立该领域的构建库,最后通过领域模型和代码生成实现领域应用。面向领域建 模采用的建模语言是具有严格语法和丰富语义的面向领域建模语言,而不是通用的 UML。面 向领域的建模语言是对特定领域的抽象,而不是对代码的抽象,它符合特定领域的使用习惯, 具有特定领域的语义。模型集成计算是面向领域的模型驱动开发方法,其开发过程包括领域 抽象、元建模、领域建模和应用程序。本文采用的建模工具

4、是通用建模环境,它是一个基于 COM 技术的可配置工具。开发人员可以在通用建模环境中构建领域元模型,经过解释注册生 成领域建模语言和领域建模环境,然后利用领域建模语言搭建领域模型。开发基于元模型的 模型解释器,遍历模型中的相关信息并以 XML 文档格式保存,定义为 PIM 文档,它是最终 生成代码的元数据。 本文设计并开发了代码生成系统实现领域模型到代码的自动生成。代码自动生成系统的 输入文件包括 PIM 文档、领域模板文件和配置文件,输出文件是源代码文件。其中,PIM 文 档是模型解释器生成的 XML 格式文档,提供模型相关信息。领域模板文件主要由经验丰富 的开发人员设置,一般开发人员只要只

5、要掌握设置规则,也可以根据需求设置模板内容。配 置文件用于指定代码生成引擎调用哪些模板文件以及生成文件名的命名,类似于 C 语言的 makefile 文件。模板文件和配置文件都是自定义的,通过不同的自定义标签,把 PIM 文档信 息整合到模板文件,实现源代码文件生成。 杭州电子科技大学硕士学位论文 II 本文最后通过洗衣机控制系统实例来阐述基于领域建模的开发方法,在通用建模环境下 构建洗衣机的元模型和洗衣机控制系统的建模环境,搭建洗衣控制系统模型。开发洗衣机控 制系统的解释器,生成洗衣机控制系统模型的 PIM 文档。编写模板文件和配置文件,利用代 码生成系统实现领域模型到代码的转换。结果显示,

6、在整个系统的开发过程中能够减少开发 时间和费用。 关键字:关键字:统一建模语言,模型驱动开发,面向领域建模,代码自动生成 杭州电子科技大学硕士学位论文 III ABSTRACT With the development of computer technology, the application system become more complex .The traditional development method base on coding and testing is time consuming and system is not easy to maintain. Model-

7、driven software engineering (MDSE) is a software engineering technology in which modeling techniques are applied in the software development process. The objective of MDSE is to raise the level of abstraction by applying modeling techniques during the software development process. Throughout the his

8、tory of software engineering, raising the level of abstraction has been the main goal that has driven the significant advances in developer productivity. It is this goal that has driven the evolution of software design from assembly languages to Third Generation Languages (3GLs), such as FORTRAN and

9、 C, to the object-orient languages, such as Java and C+. Today, visual modeling languages are the state of the art computation languages adopted by MDSE. With the popularity of Unified Modeling Language (UML) and Model Driven Architecture (MDA), models are becoming the core artifacts of software dev

10、elopment and maintenance. However, UML as generous modeling language, the complete application is difficult to generate by UML models. Today, UML modeling tools can only generate skeleton codes and implement codes need to be done by hand. Second, UML contains modeling concepts that are come form obj

11、ect-oriented programming language, such as class, object, attribute and operation, not application system question domain. It brings a gap between UML concepts and question domain. Last, UML is generous language, but it is not universal. Different domain may require different modeling language, thus

12、 developers must create domain-specific modeling language and environment according to application system requirement. Domain-specific modeling is praised as the “Next Generation Modeling Method”. Domain commonalities and characteristics are acquired through domain analysis and abstract, then buildi

13、ng domain component library, applying domain by domain model and code generation. Domain-specific language is a language with strictly syntax and rich semantic. Domain-specific language is conformed to domain usage. In this paper, the modeling tool we take is generic modeling environment, which is a

14、 configurable tool base on COM. Developers create domain meta-model in GME, which is considered as domain-specific language through interpret and register. Model interpreter is developed based on meta-model, which used to traversal model relevant informant and store information in xml formant, named

15、 PIM document. PIM document is meta data of automatically code generation. 杭州电子科技大学硕士学位论文 IV In this paper, Model-integrated Computing is introduced for Domain special modeling .The MIC development process contain domain abstract, meta modeling ,domain modeling and application. Generic Modeling Envi

16、ronment (GME) is a configurable modeling tool based on COM technology which is used to construct meta-model, and interpreted meta-model into domain specific modeling language (DSML). Developers take DSML to build domain models. In order to acquire domain model information, the objects in model must be traversed and relevant information stored in XML format file, named PIM document. PIM document is meta-data of model for final code gen

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号