摘要
介绍了面向对象软件 C& K度量学理论与方法 ,结合 C+ +语言的特征 ,分析了 C& K度量指标存在的缺点 ,提出了改进方法 .然后描述了作者开发的基于改进 C& K度量学理论与方法的针对 C+ +的软件度量工具SMTCPP,该工具使用 L L(1)分析法对源程序进行语法分析 ,从而提取程序中有关类、类成员、成员函数、对象等信息 ,计算出类的方法数、方法最大复杂度、继承树深度、子类数目、耦合度、响应集、相对内聚缺乏度等指标 ,以指导软件开发过程 .这些度量结果还可以存放在数据库中 ,以便为建立软件质量评价模型收集充足的数据 .论文最后对采用 SMTCPP所做的 3个实用软件度量实验结果进行了分析 ,表明了 SMTCPP的实用性 .
Software metrics is an important branch of software engineering. First this paper introduces a metrics suite suggested by R Chidamber and F Kemerer for object-oriented design, analyses its shortcoming, and provides an improved metrics. Then the paper describes a practical software measurement tool, SMTCPP, developed by authors. The design of SMTCPP is based on the improved metrics and the tool is for measure of C++ programs. SMTCPP makes parse to C++ programs by LL(1) method, extracts information about classes, members, and objects, counts out the indications such as methods per class, the biggest complexity among methods, depth of inheritance tree, number of children, coupling between object classes, response for class, and relative lack of cohesion in methods. The measure values are very useful to guide software process. The tool may also put the values into database to collect sufficient data for building software quality evaluation model. Last, the paper analyses the experiments for three practical programs. The result shows SMTCPP is useful.
出处
《计算机学报》
EI
CSCD
北大核心
2000年第11期1220-1225,共6页
Chinese Journal of Computers
基金
机械部发展基金!(96 JA0 2 0 5 )