摘要
构件的内聚性度量是衡量构件质量的一个重要指标。度量构件内聚度的经典方法程序切片,由于切片划分的不同,其度量值不同。本文不仅很好地度量构件的内聚度且度量值唯一。本文首先给出了构件内各个要素的形式表示,并针对构件建立依赖图,以描述构件中的变量、方法等依赖关系。根据所描述的依赖关系,度量构件的变量之间、方法与变量之间、方法之间的内聚度。同时给出了相应的实现算法,提出了影响构件内聚度的性质,便于实现高内聚的构件。
It is important to cohesion metric in the quality metric of component. Classical Program slice is a good way to measure component cohesion, but its value is different to different slice of the same component. This paper not only can measure component cohesion hut also makes the value exclusive. Firstly, the formal definition of elements in the component is given. Then a dependence graph of component can be created to describe the relationship of variable, function and so on. Cohesion between variable and variable, function and variable, function and function of component is measured on the above dependence graph. What's more, the implement algorithms are given, and the theorems which influence component cohesion are proposed to make implementing high cohesion component easy.
出处
《微计算机信息》
2009年第18期190-192,共3页
Control & Automation
关键词
构件
内聚度
软件工程
依赖图
算法
Component
cohesion
software engineering
dependence graphics
algorithm