QVT based model transformation for design pattern evolutions

合集下载

纹理物体缺陷的视觉检测算法研究--优秀毕业论文

纹理物体缺陷的视觉检测算法研究--优秀毕业论文

摘 要
在竞争激烈的工业自动化生产过程中,机器视觉对产品质量的把关起着举足 轻重的作用,机器视觉在缺陷检测技术方面的应用也逐渐普遍起来。与常规的检 测技术相比,自动化的视觉检测系统更加经济、快捷、高效与 安全。纹理物体在 工业生产中广泛存在,像用于半导体装配和封装底板和发光二极管,现代 化电子 系统中的印制电路板,以及纺织行业中的布匹和织物等都可认为是含有纹理特征 的物体。本论文主要致力于纹理物体的缺陷检测技术研究,为纹理物体的自动化 检测提供高效而可靠的检测算法。 纹理是描述图像内容的重要特征,纹理分析也已经被成功的应用与纹理分割 和纹理分类当中。本研究提出了一种基于纹理分析技术和参考比较方式的缺陷检 测算法。这种算法能容忍物体变形引起的图像配准误差,对纹理的影响也具有鲁 棒性。本算法旨在为检测出的缺陷区域提供丰富而重要的物理意义,如缺陷区域 的大小、形状、亮度对比度及空间分布等。同时,在参考图像可行的情况下,本 算法可用于同质纹理物体和非同质纹理物体的检测,对非纹理物体 的检测也可取 得不错的效果。 在整个检测过程中,我们采用了可调控金字塔的纹理分析和重构技术。与传 统的小波纹理分析技术不同,我们在小波域中加入处理物体变形和纹理影响的容 忍度控制算法,来实现容忍物体变形和对纹理影响鲁棒的目的。最后可调控金字 塔的重构保证了缺陷区域物理意义恢复的准确性。实验阶段,我们检测了一系列 具有实际应用价值的图像。实验结果表明 本文提出的纹理物体缺陷检测算法具有 高效性和易于实现性。 关键字: 缺陷检测;纹理;物体变形;可调控金字塔;重构
Keywords: defect detection, texture, object distortion, steerable pyramid, reconstruction
II

模型驱动架构MDA浅述

模型驱动架构MDA浅述

模型驱动架构MDA浅述模型驱动架构(MDA,Model Driven Architecture)浅述袁峰 2007年7月10日前言西西弗斯是古希腊神话中的科林斯国王,他被罚将一块巨石推到山上,但无论西西弗斯如何努力,每次石头到达山顶之前都不可避免地滚下来,周而复始,永无休止。

前言西西弗斯是古希腊神话中的科林斯国王,他被罚将一块巨石推到山上,但无论西西弗斯如何努力,每次石头到达山顶之前都不可避免地滚下来,周而复始,永无休止。

在《应用MDA》一书中,作者Frankel将IT人比作现代版的西西弗斯,面对日新月异层出不穷的技术平台,不可避免地不断重复一些工作。

理想的MDAer,试图阻止这一悲剧的继续发生。

今天,我们通过分析MDA的概念,了解其内涵,看看MDA是否有希望完成这个艰巨的任务。

定义MDA是由OMG(Object Management Group,国际对象管理集团)[1]于2001年提出来的。

其核心思想是抽象出与实现技术无关、完整描述业务功能的核心平台无关模型(PIM,Platform Independent Model),然后针对不同实现技术制定多个转换规则,通过这些转换规则及辅助工具将PIM 转换成与具体实现技术相关的平台相关模型(PSM,Platform Specific Model),最后将经过充实的PSM 转换成代码。

通过PIM和PSM,MDA的目的是分离业务建模与底层平台技术,以保护建模的成果不受技术变迁的影响。

图1 MDA结构示意图[1]图1为MDA的结构示意图。

最内环是MDA的核心技术:MOF(Meta Object Facility,元对象设施)、CWM(Common Warehouse Metamodel,公共数据仓库元模型)和UML。

MDA的主要工作就是要把基于这些技术建立的PIM转换到不同的中间件平台上,得到对应的PSM。

中间环上给出的是目前主要针对的实现平台:CORBA、XML、JAVA、Web Services和.NET。

8.模型转换技术-QVT Relation及其工具

8.模型转换技术-QVT Relation及其工具
relation PackageToSchema /* map each package to a schema */ { domain uml p:Package {name=pn} domain rdbms s:Schema {name=pn} }
When and Where Clauses
A relation can be constrained by two sets of predicates, a when clause and a where clause. The when clause specifies the conditions under which the relationship needs to hold. The where clause specifies the condition that must be satisfied by all model elements participating in the relation, and it may constrain any of the variables in the relation and its domains. The when and where clauses may contain any arbitrary OCL expressions in addition to the relation invocation expressions.
relation ClassToTable { domain uml c:Class { namespace = p:Package {}, kind='Persistent', name=cn } domain rdbms t:Table { schema = s:Schema {}, name=cn, column = cl:Column { name=cn+'_tid', type='NUMBER'}, primaryKey = k:PrimaryKey { name=cn+'_pk', column=cl} } when { PackageToSchema(p, s); } where { AttributeToColumn(c, t); }

跨模态迁移学习的图像生成

跨模态迁移学习的图像生成

跨模态迁移学习的图像生成第一章:引言1.1 研究背景跨模态迁移学习是指在不同任务或域之间进行模型训练和知识迁移的一种方法。

近年来,图像生成技术取得了巨大的进展,但传统的图像生成方法通常依赖于大量的标注数据,限制了其应用的范围。

为了克服这一问题,跨模态迁移学习被引入到图像生成领域,用于通过从一个模态到另一个模态的转换来生成图像。

这种方法可以帮助我们在缺乏标注数据的情况下进行图像生成,并提供更大的灵活性。

1.2 研究目的和意义跨模态迁移学习的图像生成技术在许多领域都具有广泛的应用潜力。

例如,在医学图像处理中,将一种模态的医学图像转化为另一种模态可以帮助医生更好地进行诊断和治疗。

此外,在计算机视觉和计算机图形学中,将文本描述转化为图像可以用于视觉搜索和图像操纵。

因此,探索和研究跨模态迁移学习的图像生成技术具有重要的理论和实际意义。

第二章:相关工作2.1 传统的图像生成方法传统的图像生成方法通常基于生成对抗网络(GANs)或变分自动编码器(VAEs)等模型。

这些方法需要大量的标注数据来学习图像的分布,并且只能在训练期间生成相似的图像。

然而,在真实世界的应用中,我们通常无法获得如此多的标注数据,并且需要生成不同的图像。

2.2 跨模态迁移学习方法跨模态迁移学习的图像生成方法通过学习不同模态之间的对应关系,将声音、文本或其他形式的输入转化为图像。

这些方法通常包括一个编码器网络和一个解码器网络。

编码器网络将输入转化为潜在空间的表示,解码器网络则将潜在空间的表示转化为目标模态的图像。

第三章:跨模态迁移学习的图像生成方法3.1 从文本到图像的生成跨模态迁移学习的图像生成方法可以通过将文本描述转化为图像来实现。

给定一个文本描述,我们可以使用递归神经网络(RNN)或卷积神经网络(CNN)等模型来提取文本的表示。

然后,使用解码器网络将文本的表示转化为图像。

3.2 从声音到图像的生成声音到图像的生成是另一种跨模态迁移学习的图像生成方法。

基于模型驱动架构的决策支持系统开发方法

基于模型驱动架构的决策支持系统开发方法

—48—基于模型驱动架构的决策支持系统开发方法宋旭东1,徐连鹏1,刘晓冰2(1. 大连交通大学软件学院,大连 116028;2. 大连理工大学管理学院,大连 116024)摘 要:针对当前决策支持系统开发所面临的系统复杂度高、扩展性差等问题,提出一个基于模型驱动架构的决策支持系统的开发方法,给出一个基于模型驱动框架的决策支持系统开发框架,并通过一个具体的开发实例说明如何应用该框架进行决策支持系统开发。

应用表明,该方法可有效地缩短开发周期,降低系统复杂度,提高开发效率,同时保证实施的可行性和扩展性。

关键词:模型驱动架构;决策支持系统;模型驱动;开发方法Development Approach of Decision Support SystemBased on Model Driven ArchitectureSONG Xu-dong 1, XU Lian-peng 1, LIU Xiao-bing 2(1. Software Institute, Dalian Jiaotong University, Dalian 116028; 2. School of Management, Dalian University of Technology, Dalian 116024) 【Abstract 】In order to solve the existing problems of the complexity of the system, expansion of poor issues and so on, this paper presents an approach based on Model Driven Architecture(MDA) for the development of decision support system, and proposes a framework based on MDA. A case study is provided to exemplify the benefits of the approach. Practice proves that the method effectively shortens the development cycle and improves the efficiency of development.【Key words 】Model Driven Architecture(MDA); decision support system; model driven; development approach计 算 机 工 程 Computer Engineering 第35卷 第18期Vol.35 No.18 2009年9月September 2009·软件技术与数据库· 文章编号:1000—3428(2009)18—0048—03文献标识码:A中图分类号:TP3111 概述决策支持系统(Decision Support System, DSS)是指具有辅助决策功能的高级计算机信息系统[1]。

基于QVT模型转换的研究

基于QVT模型转换的研究

Abstrac t
M odel transfor m a tion is one o f the core techniques inM DA (M ode lD r iven A rchitecture) and is the resea rch ho tspo t in th is are
a . OM G ( Ob jec tM anagement G roup) advanced Q uery /V iews /T ransforma tions ( QVT ) as a standa rdized sche m e of the model transfor m a tion. T h is paper introduces w eave and ex isting m ode l transfo r m ation techn iques as w ell as the defects o f them. To satisfy the dem and of con fo r m ance and d issipation, the paper introducesM DA and the structure o f attr ibutes based on QVT. In language di m ens ions, three languages ofQVT are introduced respectively . A ccording to the transfor m ation rules , QVT i m ple m ents the transfor m a tion fro m relation language to co re language . Based on QVT standard and the function ofm ode l transfor m ation in K e r me ta Languag e , F M T P syste m des igns a mode l transfo r ma tion too l of a four lay er QVT struc ture based on m apping by de lam ina ting the co re o fQVT. K eywords M DA W eave T ransfor m ation Confor m ance D issipa tion

基于二维变分模态分解和Hilbert变换的局放信号特征提取方法

基于二维变分模态分解和Hilbert变换的局放信号特征提取方法

0引言 局部放电(Partial Discharga, PD)是导致电气设备
内部绝缘缺陷产生的主要原因之一,是电气设备绝缘
*基金项目:国家自然科学基金资助项目(51677072);中央高 校基本科研业务费专项资金资助项目(2017XS118)
完整性退化的标志&因此,局部放电监测是电气设备 绝缘状态评估的一项重要内容&局部放电类型的模式 识别包括特征提取与分类两方面,而提取特征量的优 劣直接影响到分类结果的好坏&
二维变分模态分解twodimensionsvavationalmodedecomposition2dvmd是dvgomivwkiy等人在vmd基础上拓展得到的二维信号分解算法它是一种具有可靠数学基础的非递归自适应的稀疏图像分解方法它能够将非平稳信号分解为一系列有限带宽的固有模态分量bandlimitedintensicmodefunctionblimf有效克服了二维emd的缺陷10amp
Abslrah: A feature extraction method based on 2D vvoational moda decomposition ( VMD) and HilbeO transform is prgt posed in this papar by improviny tha 2D HilbeO-Huany transform method. Firstly,tha paOiat discharga ( PD) yrayscata yas are formed by tha measuod PD sampts. Secondly,tha PD yrayscate imayas are decomposed by 2D-TMD alyoritOm to obtain tha modas on dCfereni centar frequencies. Then,quateoion HilbeO transform are used to obtain tha correspondiny characteOstic graphs,and tha correspondiny einenvector of each PD sampta is coma inW possession by tha texture featuras of

基于本质变形曲面技术的地形生成研究

基于本质变形曲面技术的地形生成研究

基于本质变形曲面技术的地形生成研究第一章、前言地形生成是计算机图形学中一个非常重要的研究领域,它可以为游戏、虚拟现实、建筑设计等领域提供高质量的地形效果。

其中,基于本质变形曲面技术的地形生成技术,因为其具备优良的可操作性和高效性,在近年来得到了广泛的研究和应用。

本文主要对基于本质变形曲面技术的地形生成进行详细的介绍,以期对该技术有深入的理解。

第二章、本质变形曲面技术概述本质变形曲面技术(EMDS)是一种基于物理模拟的曲面细分技术,它的主要思想是使用一个二维网格来模拟物体的表面曲面,并利用各种物理定律来模拟物体的形变和运动。

与传统的Bézier曲线和Bézier曲面相比,EMDS技术具有更好的逼真度和自然度,并且可以实现高效的细分和变形。

第三章、EMDS技术的地形生成应用在地形生成领域中,EMDS技术主要应用于地形的细分和形变。

EMDS技术可以依据某一地形的高程数据生成一张二维网格,再利用各种物理定律来实现网格的细分和形变,从而生成逼真的三维地形模型。

此外,EMDS技术还可以用于实现动态地形的实时变化,比如由于风吹草动、雨水冲刷等原因,地形形态的动态变化。

第四章、EMDS技术的优点和局限EMDS技术具有优良的可操作性和高效性,能够以比较简单的方式生成高质量的地形效果,同时可以实现动态地形的实时变化。

与传统的Bézier曲线和Bézier曲面相比,EMDS技术还具有更好的逼真度和自然度。

然而,EMDS技术也存在一些局限性。

首先,它的实现需要大量的计算资源和算法优化,对计算机配置要求较高。

此外,它还需要针对具体地形进行一定的参数调整,使得生成的地形效果更加符合实际情况。

第五章、EMDS技术的改进和发展趋势随着计算机硬件和算法技术的不断发展,EMDS技术也得到了不断的改进和优化。

其中,一些研究者提出了多重分辨率EMDS技术(MMREMD),应用于地形构建中更加细致的细分和变形,从而提高地形效果的逼真度和自然度。

基于阈值优化算法的角度道集提取

基于阈值优化算法的角度道集提取

基于阈值优化算法的角度道集提取下载提示:该文档是本店铺精心编制而成的,希望大家下载后,能够帮助大家解决实际问题。

文档下载后可定制修改,请根据实际需要进行调整和使用,谢谢!本店铺为大家提供各种类型的实用资料,如教育随笔、日记赏析、句子摘抄、古诗大全、经典美文、话题作文、工作总结、词语解析、文案摘录、其他资料等等,想了解不同资料格式和写法,敬请关注!Download tips: This document is carefully compiled by this editor. I hope that after you download it, it can help you solve practical problems. The document can be customized and modified after downloading, please adjust and use it according to actual needs, thank you! In addition, this shop provides you with various types of practical materials, such as educational essays, diary appreciation, sentence excerpts, ancient poems, classic articles, topic composition, work summary, word parsing, copy excerpts, other materials and so on, want to know different data formats and writing methods, please pay attention!基于阈值优化算法的角度道集提取引言随着数字图像处理和计算机视觉技术的发展,图像分割作为一项重要的研究领域受到了广泛关注。

下采样迭代和超分辨率重建的图像风格迁移

下采样迭代和超分辨率重建的图像风格迁移
时,选择的 内 容 特 征 模 型 是 c
onv4_2 和 conv5_2 所
输出的矩阵,将这两个矩阵进行加权求和,权重各为
理后产生的图片进 行 下 采 样 处 理,选 择 的 下 采 样 倍
0.
5,这样可以比较有效地反映内容图像不同层次的
特征,使白噪声图像更好地学习到内容图像的特征.
数不宜过大,否则最 后 重 建 得 到 的 风 格 迁 移 图 片 视
加速整个图像风格迁移网络的迭代速度,在输出端 进 行 超 分 辨 率 的 重 建,最 终 输 出 高 分 辨 率 的 图 像. 实 验 结 果 表
明,该方法减少了整个网络的迭代时间,输出的超分辨率图像也有较好效果.
[关键词]深度学习;图像风格迁移;图像下采样;超分辨率重建
[中图分类号]TP183 [文献标识码]A
其中每一层的损失计算公式如下:
率重建的图像风格 迁 移,大 量 减 少 了 网 络 迭 代 的 时
间,优化了 整 个 网 络 的 迭 代 效 率,生 成 的 图 片 效 果
较好.
图像特征更加明显;接 着 对 预 处 理 过 后 的 内 容 图 片
输入图像分辨率相同的风格迁移图片.
2 图像预处理和下采样
2.
1 图像预处理
为了使图像的细节更突出,特征更加明显,需要
Ba
t
chNo
rma
l
i
z
a
t
i
on 方法,显 著 提 升 了 生 成 网 络 的
像预处理网络对内 容 图 片 和 风 格 图 片 进 行 锐 化,使
效果.图像风格迁 移 技 术 已 经 取 得 了 较 好 的 成 果,
和风格图片进行下采样,得到低分辨率图像,以降低

基于混沌系统的 DES 加密算法的研究与实现

基于混沌系统的 DES 加密算法的研究与实现

基于混沌系统的 DES 加密算法的研究与实现
徐健楠;王贺元
【期刊名称】《辽宁工业大学学报(自然科学版)》
【年(卷),期】2012(000)004
【摘要】介绍了 DES 加密算法和混沌加密算法,在结合两者优良特性的基础上,提出了一种基于 Lorenz 系统和 DES 加密算法的混合加密方案,该算法利用Lorenz 混沌方程生成 DES 所需要的密钥,大大扩展了 DES 加密算法的密钥空间,同时通过 C++程序实现了该加密算法,实验结果表明该算法具有可行性。

【总页数】4页(P273-276)
【作者】徐健楠;王贺元
【作者单位】辽宁工业大学理学院,辽宁锦州121001;辽宁工业大学理学院,辽宁锦
州121001
【正文语种】中文
【中图分类】O157
【相关文献】
1.基于混沌映射和DES的云平台文件加密算法 [J], 樊勇;田立伟
2.基于混沌理论和DES的图像加密算法 [J], 刘平
3.基于混沌系统的独立密钥DES数字图像加密算法 [J], 丁文霞;卢焕章;谢剑斌;王

4.基于混沌序列的DES彩色图像加密算法 [J], 李谦
5.基于离散混沌CAT的图像加密算法研究与实现 [J], 王小鸥
因版权原因,仅展示原文概要,查看原文内容请购买。

基于图像特性和DES算法的快速图像加密研究

基于图像特性和DES算法的快速图像加密研究

基于图像特性和DES算法的快速图像加密研究靳冰;李恒波【期刊名称】《西华大学学报(自然科学版)》【年(卷),期】2012(031)001【摘要】The basic characteristics and the essence of DES are introduced and analysed. A new method of fast image encryption based on image characteristics and DES is presented. Firstly, image transform is conducted based on rol and col. Then a part of image is encrypted by DES. Most ofthe image data are encrypted using DES XOR operation. Experimental results show that this method has better safety , efficiency and is easy tobe realized.%介绍了DES加密算法的基本特点,分析了DES的加密实质,并且结合图像数据的行列变换特性,提出了基于图像特性和DES的快速图像加密解密算法.该算法首先对图像进行行列变换,然后进行小部分图像数据的正常DES加密,对大部分图像数据进行DES异或运算,得到加密图像.实验结果表明此算法具有较好的安全性、高效性,且易于实现.【总页数】3页(P38-40)【作者】靳冰;李恒波【作者单位】南阳理工学院软件学院,河南南阳473004;南阳理工学院软件学院,河南南阳473004【正文语种】中文【中图分类】TP309.7【相关文献】1.基于图像信息摘要和RSA的图像加密技术研究 [J], 杨夷梅;杨玉军2.Logistic混沌序列和DES算法的图像加密方法 [J], 汤任君;段竞哲;邓洪敏3.基于仿DES算法MFC实现快速文件加密的研究 [J], 闫显达4.基于图像重组和比特置乱的多图像加密 [J], 郭媛;周艳艳;敬世伟5.一种基于图像特性的快速运动估计算法 [J], 王磊;刘上乾;廖怡因版权原因,仅展示原文概要,查看原文内容请购买。

给对象导管子16种方法

给对象导管子16种方法

给对象导管子16种方法对象导管子(Object Management Group,简称OMG)是一个国际性的计算机标准化组织,成立于1989年,其目标是促进和发展面向对象技术的标准化,以便实现不同平台和系统之间的互操作性。

OMG定义了丰富的标准,涵盖了软件开发的方方面面。

在本文中,我将介绍OMG定义的对象导管子的16种方法。

1. UML(Unified Modeling Language):UML是一种用于软件系统建模的标准化语言,OMG定义了UML的规范。

UML提供了一套丰富的图形符号和工具,帮助开发人员在需求分析、设计和实现过程中进行可视化建模。

3. MOF(Meta Object Facility):MOF是OMG定义的一种元模型语言,用于描述和定义其他对象模型的元模型。

它提供了一种规范的方式来描述元数据和元模型,并支持扩展和自定义。

5. BPMN(Business Process Model and Notation):BPMN是一种OMG定义的标准化的业务流程建模语言,用于描述和管理业务流程和工作流程。

它提供了一套图形符号和规则,帮助企业分析、设计和优化业务流程。

6. MOF Model to Text Transformation(MOFM2T):MOFM2T是OMG 定义的一种将MOF模型转换为文本的转换技术。

它允许开发人员根据特定的模板和规则将MOF模型转换为各种文本格式,如代码、配置文件等。

7. MOF Model to Model Transformation(MOFM2M):MOFM2M是OMG 定义的一种将MOF模型转换为其他MOF模型的转换技术。

它允许开发人员根据特定的转换规则和映射关系将一个MOF模型转换为另一个MOF模型,从而实现模型的转换和重用。

8. OCL(Object Constraint Language):OCL是一种OMG定义的对象约束语言,用于描述和定义对象模型中的约束条件。

基于混沌映射密钥空间拓展的DES算法

基于混沌映射密钥空间拓展的DES算法

基于混沌映射密钥空间拓展的DES算法
张卿;盛利元
【期刊名称】《现代电子技术》
【年(卷),期】2004(027)004
【摘要】提出一种基于混沌映射产生一种伪随机密钥流发生器,并结合shanon的"一次一密"思想,建立一种基于混沌映射的"分组密码密钥空间拓展"理论,很好地解决DES加密算法密钥空间小的问题,实现了一种混沌的DES变形密码算法.
【总页数】3页(P34-35,39)
【作者】张卿;盛利元
【作者单位】中南大学,物理科学与技术学院,湖南,长沙,410083;中南大学,物理科学与技术学院,湖南,长沙,410083
【正文语种】中文
【中图分类】TN918
【相关文献】
1.一种基于混沌映射的DES密钥空间拓展方法 [J], 盛利元;张卿;孙克辉;王文广
2.基于智能卡的扩展混沌映射异步认证密钥协商协议 [J], 王松伟;陈建华
3.基于混沌映射的云存储动态密钥种子分配仿真 [J], 王铁滨
4.基于扩展混沌映射的动态身份认证密钥协商协议 [J], 曹阳
5.基于高维混沌离散系统的动态密钥3DES算法 [J], 王凤英
因版权原因,仅展示原文概要,查看原文内容请购买。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

QVT BASED MODEL TRANSFORMATION FOR DESIGN PATTERNJing Dong, Sheng Yang Computer Science Department University of Texas at Dallas Richardson, TX 75083, USA {jdong,syang}@Yongtao SunAmerican Airlines4333 Amon Carter BlvdFort Worth, TX 76155, USAYongtao.Sun@W. Eric WongComputer Science DepartmentUniversity of Texas at DallasRichardson, TX 75083, USAewong@ABSTRACTIn this paper, we present our methods on explicitly documenting the evolution processes of a design pattern based on two-level transformations. We provide tool support to automate such process based on the Query, View, Transformation (QVT). In this way, a software system design with the applications of design patterns represented in UML model may be automatically evolved to a new design based on the model transformation rules defined for the corresponding design patterns applied. KEY WORDSDesign pattern, Model Transformation, UML, QVT, MDA, Eclipse, Design pattern evolution.1IntroductionLarge web-based applications become more and more difficult to design due to increasing size and complexity. To cope with the complexity, design patterns [6] have been proposed to reuse good design experience in different application domains, such as hypermedia design patterns [13]. Design patterns capture expert design experience by partitioning software designs into a stable part and changeable part. By separating and encapsulating both parts, the change impact of a software design can be minimized. Thus, most of the design patterns encapsulate future changes that may only affect a limited part of a design pattern. This evolution process can be achieved by adding or removing design elements in existing design patterns. In the documentation of each design pattern, however, the evolution information is generally not explicitly specified. When changes are needed, a designer has to read between the lines of the documentation of a design pattern to figure out the correct ways of changing the design. More importantly, the evolution process of a design pattern may involve the addition or removal of several parts of a design pattern. Misunderstanding of a design pattern may result in missing parts of the evolution process. The addition and removal of system parts should not violate the constraints and properties of design patterns. Thus, it is important to have, in the documentation of the design pattern, information about the evolution of the patterns. The evolution of a software system at the design level is less costly than it is at the implementation level.The Query, View, Transformation (QVT) [18] is a specification by the Object Management Group (OMG). The QVT standardizes the model transformation by splitting model transformations into two-level architecture: relations metamodel and core metamodel. In the relations metamodel, the model transformation between model candidates is specified as a set of relations, as for example illustrated in Figure 1. These relations must hold for a successful model transformation. The core metamodel is defined using minimal extension to essential MOF (EMOF) and OCL. A transformation in the core metamodel is defined as a set of mapping. The relations metamodel can be transformed to the core metamodel by a set of mapping rules.In this paper, we explicitly define the evolutions of design patterns as model transformation rules based on two-level evolution processes: the primitive level and the pattern level. These model transformation rules are defined in QVT which may transform a design model to a new model by adding or removing modeling elements. For each design pattern, thus, we define the model transformation rules in QVT for its possible evolutions. We also automate such evolution processes in the IBM Eclipse environment.The remainder of this paper is organized as follows: the next section introduces the transformation rules of design pattern evolutions based on QVT. Section 3 discusses our tool support for automating the model transformation processes. The last two sections cover related work and conclusions.2.QVT Based Model TransformationIn this paper, we investigate the QVT-based model transformations for the pattern-level evolutions. Unlike automating the pattern evolution by XSLT processor [5], the pattern evolutions based on IBM Model Transformation Framework (MTF) perform the evolutionin a single step, which reduces execution time and improves the evolution performance. MTF is a set of tools which help designers to develop transformations between the Eclipse Modeling Framework (EMF) models, such as the UML2, Java Development Tools (JDT), XML Schema Infoset Model (XSD), and Ecore models. The Ecore model is an essential model in EMF and all other models in EMF are mapped to Ecore either explicitly orEVOLUTIONSimplicitly. Model transformation in EMF is performed by creating mapping objects between source model and target model. Transformation in EMF is defined in a declarative way, i.e., the user can specify a set of transformation rules between models, and the transformation engine performs the transformation between models based on these pre-defined transformation rules. The transformation engine performs model transformation in two steps, mapping and reconciliation. In the mapping stage, the transformation engine evaluates the transformation rules and generates the mapping between source model objects and target model objects. By performing mapping between source and target model objects, some models may become inconsistent with respect to the pre-defined transformation rules. The reconciliation stage tries to solve these inconsistencies by creating missing elements, modifying existing elements and deleting elements.The transformation rules are defined in the EMF as a set of relations within one file. Figure 1 illustrates an example of the relation between two classifiers (ClfToClf), which maps one classifier (e.g., class or interface) to another classifier depending on the type of the model elements defined for design pattern evolution. The relation ClfToClf (line 1 and 2 in Figure 1) has two arguments, the source classifier (srcClf) and the target classifier (tgtClf), which represents the source class/interface and the target class/interface of the transformation, respectively. Both arguments have a typeof “uml:Classifier” where the prefix “uml” is the namespace which is associated with the EMF Ecore model at http:///com/ibm/mtf/uml.ecore and the “Classifier” is one of the types defined in the uml Ecore model. The relation ClfToClf is defined as abstract because we are dealing with two different types of classifier in a single mapping relation. Depending on the types of the arguments in the relation, a different type of classifier mapping is performed. If the arguments have the type of “uml:Class”, for instance, the mapping relation ClassToClass (lines 3 to 8 in Figure 1) is performed to map the source class (srcClass) in the source model to the target class (tgtClass) in the target model. The when clause in the relation ClfToClf states that the mapping will perform only if the source classifier and the target classifier have the same name.The mapping relation ClassToClass is shown from lines 3 to 8 in Figure 1, which is a sub-relation of relation ClfToClf to deal with the mapping between classes from the source model and classes from the target model. In the body of the ClassToClass relation, the relation hierarchically maps the subclasses of the class (line 4), the generalization relationship the class has (line 5), the attributes the class has (line 6), and the operations the class has (line 7). The relation ClfToClf in line 4 is invoked in relation ClassToClass to map the subclasses of the source class by recursively invoking the mapping relation ClfToClf with the nestedClassifier of the source class as arguments. The keyword over in relation ClfToClf invocation in line 4 indicates that the corresponding argument represents collections and a mapping should be created between elements of the collections. Hence, the rule of line 4 simply means to create mappings between all subclasses of srcClass and all subclasses of tgtClass. The invocation of relation GenToGen in line 5 maps the generalization relationshipof the mapped class. The keyword ordered in the rule of line 5 indicates that the mappings between the elements which appear in the same positions within their respective domains are created. The multiplicity [0..1] in generalization mapping relation means that the mapping between the generalization relationship should be mappedat most once. In addition, the relation PropToProp in line6 and the relation OpToOp in line7 map all attributes and operations between the classes from source model and the classes from target model, respectively.Similarly, the relation IntToInt (lines 9 through 14) 7in Figure 1 defines the mapping relation from the interfaces of the source model to the interfaces of the target model. It also hierarchically maps the sub-interfaces, generalization relationship, attributes and3.Automating the Pattern Evolution byModel TransformationThere are typically three kinds of actions that can be taken to perform the design pattern evolutions. The first action is to add a model element or a group of model elements, such as classes, attributes/operations, and relationships into the original system design. The second action is to remove model element(s) from the original system design. The third action is to replace existing model elements by some new model elements. Since replacing existing model elements can be considered as first removing the existing model elements from the system design, then adding new model elements to the system design, we only discuss the addition and removalof model elements in the following sections.3.1The Addition of Model ElementsAdding a model element into a system may result in the addition of a group of model elements into the system depending on the type of pattern-level evolution the user chooses. For instance, Figure 2 shows an Observer pattern with two concrete observer classes,ConcreteObserver1 and ConcreteObserver2. There are two states, s1 and s2 in classes ConcreteObserver1, ConcreteObserver2, and ConcreteSubject. There exist two kinds of pattern-level evolutions for the Observer pattern [4][5]. First, we can add a new class, say ConcreteObserver3, which contains two states, s1 and s2, into the Observer pattern. In addition, a generalization relationship between class ConcreteObserver3 and class Observer needs to be added into the Observer pattern. Figure 3 shows the evolved Observer pattern with three concrete observer classes. Second, we can add a state, say s3, to class ConcreteSubject, state s3 is also added into classes ConcreteObserver1 and ConcreteObserver2 to keep the observer pattern consistent. Figure 4 shows the evolved Observer pattern with three states, s1, s2 and s3.ConcreteSubject s1s2ConcreteObserver1s1s2ConcreteObserver2s1s2Figure 2 Observer Pattern with Two Concrete ObserversConcreteSubject s1s2ConcreteObserver1s1s2ConcreteObserver2s1s2ConcreteObserver3s1s2Figure 3 Observer Pattern with Three Concrete ObserversConcreteSubject s1s2s3ConcreteObserver1s1s2s3ConcreteObserver2s1s2s3Figure 4 Observer Pattern with Three Attributes When the design patterns are applied and evolved, the names of the classes, attributes, and operations may not be the same as the role names they play in the pattern. For example, the new concrete observer class may not be named “ConcreteObserver3” in some applications. It may be named, for example, “ChartView”. Hence, we provide an assistant tool for the designer to supply the names of the modeling elements that are added in the design. Our tool can automatically add the corresponding modeling elements into the original design based on the pattern-level evolution process of the corresponding pattern, e.g., the packaged pattern-level evolution [4] of the Observer pattern in this case.Figure 5 illustrates the user interface for the designer to perform pattern evolution. After the Observer pattern expressed in XMI-UML2 format is uploaded by the user interface, the design pattern applied in the system and the possible evolutions for each design pattern are shown in the left panel of the interface in a tree structure. For this example, there exists only the Observer pattern. Thus, only Observer pattern is shown. The items under each design pattern are possible pattern-level evolutions for that design pattern, e.g., for the applications of the Observer pattern, there are two possible evolutions, adding/removing a concrete observer class and adding/removing a state. Each possible evolution has two actions, Add and Remove. When the designer selects the Add action in the Observer pattern, for example shown in Figure 5, the right panel will display a table to collect all necessary information to perform the Add action. The user enters the name of concrete observer and click on the Add button to perform the addition of a concrete observer class into the Observer pattern.Figure 5 User Interface for Adding Model ElementFigure 7 explains the process when the Add button is clicked in the user interface. The flow labeled with the plus (+) sign indicates the process of the addition of a concrete observer class with its corresponding states, i.e., a concrete observer class shown in Figure 7 (B), is inserted into the Observer pattern shown in Figure 7 (A). The resulting Observer pattern is shown in Figure 7 (C). Figure 7 (A) is the UML representation of an Observer pattern with five classes, Subject, ConcreteSubject, Observer, ConcreteObserver1 and ConcreteObserver2. Class ConcreteSubject is a subclass of class Subject, whereas the ConcreteObserver1 and ConcreteObserver2 classes are the subclasses of class Observer. Every concrete class has two states represented as properties in Figure 7 (A), i.e., property s1 and property s2. Figure 7 (B) represents a concrete observer class which is added into the original Observer pattern. This model is automatically generated when the addition process is triggered. From the pattern-level evolution of the Observer pattern, when a concrete observer class is added into the Observer pattern, a generalization relationship between the concrete observer class and class which plays the role of Observer in the Observer pattern should be added. In addition, the states in existing concrete observer classes should also be added. Figure 7 (B) shows a class with the name of ConcreteObserver3 and two attributes s1 and s2 is added into the Observer class. The evolved Observer pattern with three concrete observer classes is generated after the addition process is performed.The second possible evolution of the Observer pattern is to add a new subject state to be observed. This new state should also be added into all concrete observer classes and concrete subject class to keep the Observer pattern consistent. The designer can use the interfaceshown in Figure 5 to perform such evolution. In this case,the State on the left panel may be selected so that the designer can input the name of the new state and click onthe Add button to perform the evolution.Figure 8 depicts this pattern-level evolution process ofthe Observer design pattern. The flow labeled with theplus (+) sign indicates the process of the addition of model elements, i.e., all the model elements recorded in Figure 8 (B) will be added into the original Observer pattern shown in Figure 8 (A) and the evolved Observer pattern is depicted in Figure 8 (C). Figure 8 (A) shows thetree representation of the Observer pattern with two statesin the concrete subject and the concrete observer classesas shown in Figure 2. To add a state in the concrete subject class of the Observer pattern, a state should be added simultaneously in the concrete observer classes tokeep the observer pattern consistent. In this example, states3 should be added into classes ConcreteSubject, ConcreteObserver1 and ConcreteObserver2. Figure 8 (B) shows the model elements which are needed to be addedinto the Observer pattern. After performing model transformation, the evolved Observer pattern is depictedin Figure 8 (C) with three states in classes ConcreteSubject, ConcreteObserver1 and ConcreteObserver2.3.2The Removal of Model ElementsSimilar to the addition of a model element, the removal of a model element may also result in the removal of a group of model elements simultaneously.For instance, the Observer pattern has two possible choices of removing a model element, one is removing a concrete observer class from the Observer pattern, and theother is removing a state from a concrete observer class.If we remove a concrete observer class, ConcreteObserver3, from the Observer pattern shown in Figure 3, the attributes of ConcreteObserver3 class andthe generalization relationship associated with ConcreteObserver3 class with class Observer should alsobe removed. The evolved Observer pattern is shown in Figure 2. If we remove state s3 from the ConcreteSubjectclass in the Observer pattern shown in Figure 4, the states3 should also be removed from the classes ConcreteObserver1 and ConcreteObserver2, and the application result of the Observer pattern is shown in Figure 2.Figure 6 shows the user interface to perform the deletion action in the Observer pattern. When the designer selects the Remove action under the possible evolutions of the Observer pattern in the left panel of the interface, all removable classes, such as ConcreteObserver1, ConcreteObserver2 and ConcreteObserver3, are displayed in a dropdown list inthe right panel. The designer may select one of the classes, e.g. ConcreteObserver3, and click on the Remove button. The chosen class, its attributes, and its relationswith other classes are removed from the design automatically. Figure 8 also depict such deletion process. The flowlabeled with the minus (-) sign in Figure 8 indicates the process of the deletion of model elements. Figure 8 (C) is the original Observer pattern with three states. Figure 8 (B) shows the model elements which are needed to be deleted from the Observer pattern. After performing the delete action, the resulting Observer pattern is shown in Figure 8 (A).Figure 6 User Interface for Removing Model Element3.3Model Transformation EnvironmentFigure 9 depicts IBM Eclipse interface for design pattern evolution process. The left panel of interface shows the project packages, including java application source, libraries used in the package, source model, target model and pre-defined transformation rules. The invocation of the application is through an application invocation interface. There exist two ways to invoke the model transformation application. One way is to invoke the application through Mapping Rule Editor, and the other way is through a java application. The former is usually used to develop and debug transformation rules and the latter has a wider usage, such as the java application can be embedded into other applications, such as the user interface shown in Figure 5.4.Related WorkDesign pattern evolutions in software development processes are discussed in [10], where software development processes are considered as the evolutions of analysis and design patterns. The evolution rules are specified in Java-like operations to change the structure of patterns. Although some primitive-level evolution rules are introduced, there is no discussion on pattern-level evolution rules. In addition, our approach automates the evolutions based on model transformations by QVT.Improving software system quality by applying design patterns in existing systems has been discussed in [2]. When the user selects a design pattern to be applied in a chosen location of a system, automated application is supported by applying transformations corresponding to the mini-patterns. The main goal of their software evolution is to apply design patterns in existing systems, whereas our evolution goal is to change the design patterns that have already been applied in a system.A) Observer Model with twoConcrete ObserverB) Single Class in Observer ModelC) Observer Model with threeConcrete ObserverFigure 7 The Evolution of Observer Design Pattern (Addition/Removal of a Class)A) Observer Model with two StatesB) Single State in Observer ModelC) Observer Model with three StatesFigure 8 The Evolution of Observer Design Pattern (Addition/Removal of a State)EvolutionApplicationLibrariesRulesTarget ModelFigure 9 The Design Pattern Evolution Process InterfaceThe tool support for UML model evolution is provided in [9], which is also based on XMI. The design and development of the tool applies several design patterns. In contrast, we focus on the evolution of design patterns, instead of the evolution of UML models.Mazon et al. [11] applied MDA to data warehouse (DW) development framework to address the design of the whole DW. The framework consists of five layers and each layer represents a part of the whole DW system. Each layer has different viewpoints, including the Platform Independent Model (PIM), Platform Specific Model (PSM) and Computation Independent Model (CIM), according to MDA. Each layer and viewpoints requires different model formalisms. Once PIM models in each layer are developed, other models can be transformed based on relational layer of QVT.D’Ambrogio [3] applied QVT model transformation to automatically build a performance model from the UML model. The performance model is necessary to effectively validate the performance of a software system through its development lifecycle. Building performance models based on model transformation obtains a high degree of automation in the generation of performance models from software development models.Kalnins et al. [7][8] proposed a graphical procedural transformation language MOLA. The model transformation defined by MOLA is a sequence of graphical statements linked by arrows. MOLA is more suitable for the transformation between two models, such as transformation from UML diagram to RDBMS schema. Other model transformation languages, such asQVT-Merge[19], ATL[14], MTF[16], Tefkat[20], and Fujaba Story diagrams (SDM)[15], which are either textual or graphical languages, address the transformation from one model to another. Muller et al. [12] also proposed a model transformation language (Kermeta) to better describe the behavioral aspect of model transformation. In contrast, our purpose is to describe the pattern evolution and automate this process based on QVT.5. ConclusionSince the evolution information of a design pattern is generally implicit in the descriptions of the pattern, a designer has to dig into the pattern descriptions to understand the particular ways of evolutions encapsulated in design patterns. There are several problems when the evolution information is implicit: first, it is hard for the designer to take advantage of the benefits of using a design pattern when changes are needed. Second, the evolution of a design pattern generally involves several classes and relationships. Missing one part may cause inconsistencies and errors in the design which are difficult to find and correct. Third, the evolution processes are not reusable if not documented. As discussed previously, many of the evolution processes recur in different patterns.In this paper, we define the evolution processes of each design pattern as model transformation rules based on QVT. These transformation rules are defined based on our classifications of two-level transformations: the primitive level and the pattern level. We also providetool support for the automation of such model transformation processes. In this way, the evolution information of each design pattern is not only made explicit to the designers, but also automated for them to apply as a transformation.References[1]G. Booch, J. Rumbaugh, I. Jacobson. The UnifiedModeling Language User Guide (Addison-Wesley, 1999). [2]M. Ó Cinnéide and P. Nixon. Automated SoftwareEvolution Towards Design Patterns, Proceedings of the International Workshop on the Principles of Software Evolution, pp162-165, Vienna, Austria, September, 2001. [3]Andrea D’Ambrogio, A Model Transformation Frameworkfor the Automated Building of Performance Model from UML Models, Proceeding of the 5th International Workshop on Software and Performance, pp 75-86, Palma,Illes Balears, Spain, July 2005[4]J. Dong, S. Yang and K. Zhang, A Model TransformationApproach for Design Pattern Evolutions, the Proceedings of the Annual IEEE International Conference on Engineering of Computer Based Systems (ECBS), pp 80-89, Germany, March 2006.[5]J. Dong, S. Yang and D. T. Huynh, Evolving DesignPatterns Based on Model Transformation, Proceedings of the Ninth IASTED International Conference on Software Engineering and Applications (SEA), pp 344-350, USA,Nov. 2005.[6] E. Gamma, R. Helm, R. Johnson, J. Vlissides, DesignPatterns: Elements of Reusable Object-Oriented Software(Addison-Wesley, 1995).[7] A. Kalnins, J. Barzdins, E. Celms. Model TransformationLanguage MOLA, Proceedings of MDAFA 2004 (Model-Driven Architecture: Foundations and Applications 2004),pp. 14-28, Linkoeping, Sweden, June 2004[8] A. Kalnins, J. Barzdins, E. Celms. Model TransformationLanguage MOLA: Extended Patterns. 6th InternationalBaltic Conference DB@IS 2004, IOS Press, FAIA vol. 118,2005, pp. 169-184[9] F. Keienburg and A. Rausch, Using XML/XMI for toolSupported Evolution of UML Models, Proceeding ofInternational Conference Hawaii International Conferenceon System Science, Maui, Hawaii, Jan. 2001.[10]T. Kobayashi and M. Saeki. Software Development Basedon Software Pattern Evolution, Proceedings of the SixthAsia-Pacific Software Engineering Conference (APSEC),pp 18-25, Takamatsu, Japan, 1999.[11]Jose-Norberto Mazon, Juan Trujillo, Applying MDA to theDevelopment of Data Warehouses, Proceedings of the 8thACM International Workshop on Data Warehousing andOLAP, pp 57-66, Bremen, Germany, November, 2005[12]P.-A. Muller, F. Fleurey, D. Vojtisek, Z. Drey, D. Pollet, F.Fondement, P. Studer, J.M Jezequel, On ExecutableMeta_Languages Applied to Model Transformations,Proceedings of INRIA Workshop of Model TransformationsIn Practice, Jamaica, October 2005[13]Gustavo Rossi, Daniel Schwabe, and Alejandra Garrido.Design Reuse in Hypermedia Applications Development.Proceedings of the ACM International Conference onHypertext, pages 57–66, April 1997.[14]ATL http://www.sciences.univ-nantes.fr/lina/atl/[15]Fujaba User Documentation http://wwwcs.uni-paderborn.de/cs/fujaba/documents/user/manuals/FujabaDoc.pdf[16]MTF /tech/mtf[17]Model Driven Architecture. /mda/[18]OMG QVT specification /docs /ptc/05-11-01.pdf[19]QVT-Merge, /docs/ad/05-03-02.pdf[20]Tefkat .au/Research/Projects/Pegamento/tefkat/[21]W3C, Extensible Markup Language (XML),/[22]W3C, XSL Transformations (XSLT), /。

相关文档
最新文档