没有合适的资源?快使用搜索试试~ 我知道了~
可视化软件重新模块化:架构元素评估与优化 - Lille科技大学计算机博士论文
0Lille科技大学 - Lille 10SPI Lille UFR IEEA计算机博士培养部0可视化、评估和重新模块化面向对象的架构元素0论文02009年11月24日公开展示和答辩0获得0Lille科技大学博士学位0(计算机专业)0通过0Hani Abdeen0评审委员会成员0主席:Laurence Duchien0评审人:Marianne Huchard(教授 - Montpellier大学)Fran¸coise Balmas(讲师 - 巴黎8大学)0考官:Manuel Oriol(高级讲师 - 约克大学)Laurence Duchien(教授 - Lille I大学)0导师:St´ephane Ducasse(教授 - Lille I大学)0论文的联合导师:Ilham Alloui(讲师 - Savoie大学)0Lille基础计算机实验室 - UMR USTL/CNRS 8022 INRIA Lille - Nord Europe 订单号:401090Hani Abdeen的论文,Lille 1,2009年0©2010版权所有。http://doc.univ-lille1.frThèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr0使用thloria类进行排版。0Hani Abdeen的论文,Lille 1,2009年0©2010版权所有。http://doc.univ-lille1.frThèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr0内容0表目录 ix0第1章引言...701.1背景:面向对象软件模块化...701.2问题:软件重新模块化的挑战...801.2.1理解软件包的问题...901.2.2模块化优化问题...1001.3我们的主张...1201.4贡献...1201.5论文结构...130第2章软件重新模块化:0挑战和方法 1502.1引言...1502.2背景和术语...1602.3软件包理解...2102.3.1定量信息...2302.3.2定性信息(内聚性与耦合性)...2302.3.3角色和上下文信息(中心与外围)...2502.3.4组织信息(开发人员与团队)...2602.4优化模块化的挑战...2602.4.1模块化复杂性...2602.4.2类在软件包中的分布...2602.4.3软件包优化权衡...2702.5理解软件包的现有方法...2902.6评估软件包质量的现有方法...320i0Hani Abdeen的论文,Lille 1,2009年0©2010版权所有。http://doc.univ-lille1.frThèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr2.7Existing Approaches to Optimize Modularizations . . . . . . . . . . . .342.8A Combined Approach for The Maintenance of Software Modularization 37Chapter 3 Package Blueprint:Visually Understanding Package Structure and Interactions393.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393.2Visualization Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . .403.3Package Blueprint basic principles . . . . . . . . . . . . . . . . . . . . .413.4Package Blueprint Detailed Visualizations . . . . . . . . . . . . . . . . .423.4.1Outgoing Reference Blueprints . . . . . . . . . . . . . . . . . . .423.4.2Incoming Reference Blueprints . . . . . . . . . . . . . . . . . . .443.4.3The Case of Inheritance. . . . . . . . . . . . . . . . . . . . . . .463.5An Example: The Network::Kernel Package . . . . . . . . . . . . . . . .473.6Packages Within Their Software System . . . . . . . . . . . . . . . . . .493.6.1Outgoing Reference Package Blueprint Analysis . . . . . . . . .493.6.2Incoming Reference Package Blueprint Analysis . . . . . . . . .523.6.3Inheritance Package Blueprint Overview . . . . . . . . . . . . .553.6.4The views together . . . . . . . . . . . . . . . . . . . . . . . . . .563.7Striking Shapes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .563.7.1Shapes of Packages and Surfaces . . . . . . . . . . . . . . . . . .563.7.2Shapes of Classes . . . . . . . . . . . . . . . . . . . . . . . . . . .593.8User Case Study on Squeak Compiler. . . . . . . . . . . . . . . . . . .603.8.1Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . .613.8.2Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .623.9Evaluation and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . .633.9.1Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .633.9.2Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .643.10 Related Work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .663.11 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66Chapter 4 Package Fingerprints:Visually Summarizing Package Interface Usage694.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .694.2Package Fingerprint Principles. . . . . . . . . . . . . . . . . . . . . . .704.2.1Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .714.2.2Fingerprint Intention . . . . . . . . . . . . . . . . . . . . . . . . .724.2.3Fingerprint Skeleton . . . . . . . . . . . . . . . . . . . . . . . . .73ii0内容Thèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr4.2.4Enriching the Fingerprint Skeleton Layout . . . . . . . . . . . .744.3Decorticating a Fingerprint. . . . . . . . . . . . . . . . . . . . . . . . .764.4Reading the Fingerprint From Far Away . . . . . . . . . . . . . . . . . .794.5Outgoing Fingerprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . .824.6Relevant Visual Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . .854.6.1Black Fill Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . .854.6.2Arrow Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . .894.6.4Diverse Patterns. . . . . . . . . . . . . . . . . . . . . . . . . . .964.7.1Graphical concerns . . . . . . . . . . . . . . . . . . . . . . . . . .984.7.3Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Chapter 5 Automatically Measuring and Optimizing Modularization Quality1035.2Modularization Quality. . . . . . . . . . . . . . . . . . . . . . . . . . . 1055.2.2Measuring Package Quality . . . . . . . . . . . . . . . . . . . . . 1065.3.1Technique Overview . . . . . . . . . . . . . . . . . . . . . . . . . 1075.3.3Modularization Constraints . . . . . . . . . . . . . . . . . . . . . 1095.4Experiments and Validation . . . . . . . . . . . . . . . . . . . . . . . . . 1125.6Conclusion and Future Work. . . . . . . . . . . . . . . . . . . . . . . . 1216.1Open Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126iii04.6.3 马赛克模式. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9204.7 讨论和评估. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9804.7.2 关于耦合和改进的提示. . . . . . . . . . . . 9904.8 结论. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10205.1 引言. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10305.2.1 测量模块化质量. . . . . . . . . . . . . . . . 10505.3 优化技术(方法论). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10705.3.2 评估模块化质量(适应性). . . . . . . . . . . . 10805.3.4 推导新的模块化(邻居). . . . . . . . . . . . . 11005.5 相关工作 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1190第6章 结论与未来工作 1230参考文献 1270Hani Abdeen的论文,Lille 1,2009Thèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.friv0目录0Hani Abdeen的论文,Lille 1,2009Thèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr2.1Example of two modularizations: different decompositions of the setof classes {c1..c9} into 3 packages {p1,p2,p3}.. . . . . . . . . . . . . . . .1616).192.3An Example of Subsystem Notation: the subsystem subsystem1 con-tains two packages (pkg1 and pkg2) and one subsystem (subsystem2).. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212.5An example illustrating the propagations of package change impact. .272.7An Example Illustrating the Kiviat Diagram [Pinzger et al., 2005]. . . . .313.2Surface package blueprint detailed view (Outgoing Reference view forP1).. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433.3To distinguish it from the outgoing reference blueprint (left), we rotatethe incoming reference blueprint (right) by 90°, so that the importantdetails are still read first; in the incoming view, the references are madeby the external classes, at the top, to the internal classes below them. .453.4Package blueprint detailed view (Incoming Reference view for P3Figure 3.2 (p. 43)) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453.5Inheritance package blueprint. Orange bordered classes inherit directlyfrom external classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463.6Analyzing the Network::Kernel Package.. . . . . . . . . . . . . . . . .473.7Interacting with package blueprint: using the mouse and pointing atthe box shows, through a fly-by-help, the class and package names.In this view, the mouse is pointing to the box representing HTTPSocketand the fly-by-help shows, in addition to the class name, the name ofNetwork::Kernel classes that refer to HTTPSocket. . . . . . . . . . . . . . . .50v0图表清单02.2 模块化1中的包循环解释(图2.1(p.02.4 相同数量的类的不同包配置。. . . 2202.6 优化包结构时产生不同影响的示例。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2803.1考虑引用其他三个包中的四个类的P1(a)。蓝图显示了观察包的表面,它们是堆叠的子分区(b)。小方块代表类,可以是观察包中的类(右侧白色部分)或引用包中的类(左侧灰色部分)(c)。42Thèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.frList of Figures3.8Outgoing reference blueprints of some packages of the Network system.In this view, the Kernel package was selected in orange, surfaces withProtocols package are highlighted in yellow, class HTTPSocket in red,class SocksSocket in blue, class InternetConfiguration in green, and classPassword in fuchsia. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .513.9Incoming Reference global view in Network system. In this view, theTelNetWordNet package was selected in orange, surfaces with RemoteDi-rectory package are highlighted in green. . . . . . . . . . . . . . . . . . .533.10 Inheritance global view in Network system . . . . . . . . . . . . . . . .533.11 A Sumo Blueprint: the Critics package in ArgoUML. The view is in thecontext of the subsystem argoUML::uml. . . . . . . . . . . . . . . . . . . .573.12 A Loner Blueprint: Url::Tests and MailSending packages in Network. . . . .583.13 A Tower Blueprint: the Peer package in Azureus. The view is in thecontext of the subsystem azureus::ui::swt::views. . . . . . . . . . . . . . . .583.14 Global view in Compiler system. In this view, the class Parser is high-lighted in green, the class ParseNode in red and the class DecompilerCon-structor in blue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .604.1Terminology – An example of references between packages . . . . . . .714.2Grouping incoming and outgoing references into In- and Out- interfaces. 714.3The Incoming Fingerprint skeleton with P1 (Figure 4.2(a) (p. 71)). . . . .734.4Showing the Incoming Fingerprint of P1 (Figure 4.3 (p. 73)) with theclasses involved in the relations inside each cell. . . . . . . . . . . . . .754.5The Incoming Fingerprint of the package render::renderer, from the themesubsystem of Jboss. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .774.6The Incoming Fingerprint of renderer package (Figure 4.5 (p. 77)) zoomed-out twice. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .794.7Interacting with the Fingerprint.. . . . . . . . . . . . . . . . . . . . . .804.8The Incoming Fingerprint of utils package, from plugins subsystem(Azureus Application). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8104.9 P 1的Outgoing Fingerprint骨架(图4.2(b)(第71页))。. . . . . . . . . . 8204.10 显示P 1的OutgoingFingerprint(图4.2(b)(第71页)),每个单元格内部涉及的类之间的关系。. . . . . . . . . . . . . . 8304.11 impl::api::user包的Outgoing Fingerprint,来自子系统Jboss.portal.core。. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . 8404.12 Black Fill指纹的示例。. . . . . . . . . . . . . . . . . . . . . 8504.13 Black-White模式的示例:来自Jboss系统的调用包的Incoming Fingerprint。. . . .. . . . . . . . . . . . . . . . 8704.14 Arrow模式:来自Squeak38::Monticello子系统的UI包的Incoming Fingerprint。. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8804.15 Arrow模式的变化。. . . . . . . . . . . . . . . . . . . . . . . . . 8904.16 Mosaic模式的示例:来自Squeak38系统的Morphic::Basic包的IncomingFingerprint。. . . . . . . . . . . . . . . . . 9204.17 Mosaic模式的示例:来自Argouml系统的模型包的Incoming Fingerprint。. . . . . .. . . . . . . . . . . . . . . . . . 930第六章0Hani Abdeen的论文,Lille 1,2009年0© 2010版权所有。http://doc.univ-lille1.frThèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr05.1包大小和内聚性在ArgoUML原始(深灰色)和结果(浅灰色)的模块化中。包在图表中的顺序相同。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11305.2包大小、内聚性质(CohesionQ)和循环依赖质量(CyclicDQ)在ArgoUML原始(深灰色)和结果(浅灰色)的模块化中。包在图表中的顺序相同。0约束条件为:(1)包含超过35个类的包的大小不应增加(大小最大值=35);(2)打包在小包中的类(1 < p size < 6)0不应移动的类(即它们是冻结的)。. . . . . . . . . . . . . . . . . . . . . . 1170第七章0Hani Abdeen的论文,Lille 1,2009年0© 2010版权所有。http://doc.univ-lille1.frThèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr0图表清单0第八章0Hani Abdeen的论文,Lille 1,2009年0© 2010版权所有。http://doc.univ-lille1.frThèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr0表格清单05.1 使用的软件应用程序的信息。. . . . . . . . . . . . . . . 11305.2 原始模块化中的包质量。. . . . . . . . . . . . . . . 11505.3 包间连接的优化。顶部表格显示了百分比。0将减少IPD、..、IPCC(表5.1(第113页))转化为模块化。最大的0负值越大,优化效果越好。底部表格显示了当距离最大值被指定并限制在5%时的信息。0当距离最大值被指定并限制在5%时。. . . . . . . . . . . . . . . . . . . . . . . 11505.4 包大小的修改。顶部表格显示了空包的百分比。0(表5.1(第113页)),最大和平均包大小转化为模块化。0底部表格显示了当距离最大值被指定并限制在5%时的信息。. . 11605.5 包质量的优化。顶部表格显示了平均优化情况。0将包质量转化为模块化。数值基于表5.2(第115页)。0最大正值越大,优化效果越好。底部表格显示了这些信息。0当指定并限制distance max为5%时的平均距离。05.6 结果模块化一致性。表格显示了各模块化之间的平均距离。0每个应用程序的十个结果模块化。05.7ArgoUML的包大小修改。显示了空包的百分比(表5.1(第113页)),以及结果模块化中最大和平均包大小。约束条件为:(1)包含超过35个类的包的大小不应增加(最大大小=35);(2)打包在小包中的类(1 < p size <6)不应移动(即它们被冻结)。0包含超过35个类的包的大小不应增加(最大大小=35);(2)打包在小包中的类(1 < p size < 6)不应移动(即它们被冻结)。0打包在小包中的类(1 < p size < 6)不应移动(即它们被冻结)。05.8ArgoUML的包质量优化。数值基于表5.2(第115页)。最大正值越大,优化效果越好。约束条件为:(1)包含超过35个类的包的大小不应增加(最大大小=35);(2)打包在小包中的类(1 < p size <6)不应移动(即它们被冻结)。0包含超过35个类的包的大小不应增加(最大大小=35);(2)打包在小包中的类(1 < p size < 6)不应移动(即它们被冻结)。0移动(即它们被冻结)。05.9ArgoUML的模块间连接优化。显示了IPD、IPCC(表5.1(第113页))在结果模块化中的减少百分比。最大负值越大,优化效果越好。约束条件为:(1)包含超过35个类的包的大小不应增加。0不应增加(最大大小=35);(2)打包在小包中的类(1 < p size < 6)不应移动(即它们被冻结)。0打包在小包中的类(1 < p size < 6)不应移动(即它们被冻结)。0ix0Hani Abdeen的论文,Lille 1,20090© 2010 版权所有。http://doc.univ-lille1.frThèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr0表格列表0x0Hani Abdeen的论文,Lille 1,20090© 2010 版权所有。http://doc.univ-lille1.frThèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr0摘要0为了应对大型面向对象软件系统的复杂性,开发人员使用模块或包的概念将类组织成子系统。这种模块化结构有助于软件系统在面对新需求时进行演化。将类组织成包和/或子系统代表了软件的模块化。软件的模块化通常遵循类之间的相互关系。理想情况下,包应该松耦合并具有一定的内聚性。然而,研究表明,随着软件根据需求和环境的变化而演化,软件的模块化逐渐偏离并丧失了质量。因此,必须对软件的模块化进行维护。因此,理解、评估和优化包的组织和关系非常重要。我们的观点是,维护大型复杂软件模块化需要帮助的方法,这些方法有助于:(1)理解包的结构、使用和关系;(2)评估模块化的质量,以及给定模块化中单个包的质量;(3)优化现有模块化的质量。在这篇论文中,我们集中研究三个领域:软件可视化、度量和算法。首先,我们定义了两种可视化方法,帮助维护人员:(1)理解包的结构、使用和关系;(2)发现模式;(3)识别放错类和结构异常。除了可视化之外,我们还定义了一套度量方法,用于评估包的设计质量(即包的内聚性和耦合性)。我们还定义了一些度量方法,从不同的角度评估一组相互依赖的包的质量,例如包的耦合度和循环度。最后,我们定义了一种基于搜索的算法,通过将类移动到现有包中,自动减少包的耦合度和循环度。我们的优化方法明确考虑了原始的类组织和包结构。它还允许维护人员通过指定以下内容来控制优化过程:(1)可能更改其包的最大类数;(2)候选移动的类和不应移动的类;(3)候选重组的包和不应重组的包;(4)给定包可以包含的最大类数。本论文中提出的方法已应用于真实的大型面向对象软件系统。我们获得的结果证明了我们的可视化和度量的有用性,以及我们的优化算法的有效性。0Hani Abdeen的博士论文,Lille 1,2009年0© 2010版权所有。http://doc.univ-lille1.frThèse de Hani Abdeen, Lille 1, 2009© 2010 Tous droits réservés.http://doc.univ-lille1.fr0摘要0为了应对复杂的面向对象大型软件系统,程序员使用模块或包的概念将类组织成子系统。这样的模块化结构使得软件系统能够适应新的需求。将类组织在包和/或子系统中,我们称之为软件的模块化,通常遵循类之间的关系。通常希望包之间的耦合度低且内聚性足够强。然而,研究表明,当软件系统适应环境的要求和变化时,它们的模块化会逐渐偏离并丧失其质量。因此,必须维护软件系统的模块化。因此,理解、评估和优化包及其关系的组织是非常重要的。本论文所提出的观点是,维护大型复杂软件的模块化需要有助于:(1)理解包及其关系;(2)评估模块化的质量,以及给定模块化上的包的质量;(3)优化现有模块化的质量。在本论文中,我们关注三个研究领域:程序可视化、度量和算法。首先,我们定义了两种可视化方法,帮助维护者:(1)理解包的结构以及它们的使用和关系;(2)识别
下载后可阅读完整内容,剩余1页未读,立即下载
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功