节点文献

面向对象软件复杂性度量方法的研究

Study on Measurement Method of Object-Oriented Software Complexity

【作者】 吴光金

【导师】 曾一;

【作者基本信息】 重庆大学 , 计算机软件与理论, 2008, 硕士

【摘要】 软件复杂性是软件质量的重要组成部分,其度量是软件度量的重要方面。当前,面向对象软件开发方法已经成为主流的软件开发方法但缺乏较为完善的面向对象软件复杂性度量方法。基于这样的现状,本文提出了面向对象软件复杂性度量方法的研究课题。本文将介绍软件度量基本理论及软件复杂性度量方法,以及度量方法评估准则。接着介绍面向对象方法的特性,以及此前已由其他学者提出的面向对象度量方法,对这些方法进行分析,并指出现有方法存在的不足之处,如C&K的DIT没有考虑所有继承路径、NOC没有考虑非直接子类、CBO没有考虑类间的耦合程度等。这些方法仅从面向对象的某些特性进行度量,不够全面。本文同时分析了面向对象度量与结构化度量的区别。在对传统软件复杂性度量方法、面向对象度量方法等进行分析的基础上,本文对面向对象软件复杂性进行分析,并提出复杂性分解的思想,将面向对象软件复杂性分解为类的复杂性、继承复杂性、多态复杂性、耦合复杂性和成员关系复杂性等多个复杂性分量。其中多态复杂性又可分解为强制多态、重载多态、参数多态和包含多态等复杂性。这些分量能较为全面地体现面向对象的特性。本文在分解的基础上分别为这些复杂性分量提出度量方法。其中,类的复杂性采用类所实现的成员的复杂性SIMC、类接口复杂性之和SCIC反映。继承复杂性可以通过继承图表示,由继承成员个数NIM、覆盖成员个数NOM、成员名重复数NRN、继承路径距离LIP和访问方式更改数NMA等几个方面反映,并采用加权合成的方式得到继承复杂性。多态复杂性可由四种类型的多态复杂性组合反映。类之间的耦合性可以通过耦合图表示,耦合复杂性可以通过耦合图中顶点间边的数量和耦合程度表示。类的成员关系使用伪二部图表示,成员关系复杂性由类成员间的交互程度表示。最后确定整体复杂性的组成成分并采用加权合成的方式得到面向对象软件的复杂性。为验证度量方法的有效性,本文随机选取3个VC++程序进行度量并对度量结果分析。结果表明本方法的度量结果与对这些程序复杂性的分析结果一致,从而从实际应用这个角度验证了该方法的合理性和可行性。

【Abstract】 Software Complexity is an important composition of software quality and its measurement is vital aspect of software measurement. At the present time, object-oriented software method has become the main software development method, but there is short of perfect measurement method of object-oriented software complexity. Base on these facts, this thesis put forward study subject of measurement method of object-oriented software complexity.This thesis will recommends elementary theory of software measurement and estimate criterion of measurement method. Then, recommends characteristic of object-oriented method and object-oriented measurement method had put forward by other researchers, and analyze these methods and put out their faults, for example, DIT of C&K not calculate all inheritance path, NOC not calculate in-immediate descendent class, CBO not calculate how cohesion between class, etc.. These methods are measurement parts of object-oriented incompletely. At the same time, analyze the difference between object-oriented measurement and structured measurement.Base on analysis of traditional software complexity measurement method and object-oriented measurement method, this thesis analyze object-oriented software complexity, and put forward idea of complexity decompose, decompose object-oriented complexity into several complexity subsection such as class complexity, inheritance complexity, polymorphism complexity, couple complexity and member relation complexity. Furthermore, polymorphism complexity decompose into complexity of compel polymorphism, overload polymorphism, Parameter polymorphism, Contain Polymorphism. This complexity subsection can reflect characteristic of object-oriented completely.Base on complexity decompose, this thesis will put forward measurement method for each complexity subsection. Class complexity is reflected by Sum of Implemented Method Complexity (SIMC) and Sum of Class Interface Complexity (SCIC). Inheritance is expressed by inheritance graph and Inheritance complexity reflected by Number of Inherited Members (NIM), number of overriding members (NOM), Number of Repeat Names of member (NRN), Length of Inheritance Path (LIP), Number of Modified Access mode (NMA), use weighted synthesis gain inheritance complexity. Polymorphism complexity reflected by composition of four kind of Polymorphism. Couple between classes expressed by couple graph and couple complexity is reflected by edge between vertex of couple graph and couple degree. Class member relation expressed by fake bipartite graph, class member relation complexity reflected by relative of class member. Finally, figure out component which compose integrate complexity and use weighted synthesis gain object-oriented software complexity.In order verify validity of measurement method, the paper select 3 VC++ program randomly to measure their complexity and analyze measurement results. Analyze result imply that the measure results of measurement method that put forward by this paper are consistent with intuitionistic judgment. Sequentially validate rationality and feasibility of this method from side of real application.

  • 【网络出版投稿人】 重庆大学
  • 【网络出版年期】2009年 06期
节点文献中: 

本文链接的文献网络图示:

本文的引文网络