软件学报
軟件學報
연건학보
JOURNAL OF SOFTWARE
2009年
2期
256-270
,共15页
周天琳%徐宝文%史亮%周毓明
週天琳%徐寶文%史亮%週毓明
주천림%서보문%사량%주육명
软件度量%内聚性%包
軟件度量%內聚性%包
연건도량%내취성%포
software measurement%cohesion%package
为了一致而高效地计算包内聚性,许多研究者提出了大量的包内聚性度量方法.然而,这些方法主要依赖于包内部的数据流关系,常导致度量结果与实际开发经验相悖.为了解决这一问题,首先以包的职责为基础将包划分为4类.然后,提出了共同重用内聚CRC,并根据包的分类框架讨论了CRC的适用性.CRC的核心思想是若多个类总被共同重用,则它们之间存在紧密耦合.最后,提出了度量CRC的海明内聚度HC.与现有方法相比,HC同时考虑了包内和包间的数据依赖.因而,该方法能够有效地反映包内部类间的语义关系.此外,HC利用包的使用模式提高了度量结果的可区分性.实验研究表明HC能够有效评估包的内聚程度.充分说明了作为HC基础的CRC具有较高的合理性.
為瞭一緻而高效地計算包內聚性,許多研究者提齣瞭大量的包內聚性度量方法.然而,這些方法主要依賴于包內部的數據流關繫,常導緻度量結果與實際開髮經驗相悖.為瞭解決這一問題,首先以包的職責為基礎將包劃分為4類.然後,提齣瞭共同重用內聚CRC,併根據包的分類框架討論瞭CRC的適用性.CRC的覈心思想是若多箇類總被共同重用,則它們之間存在緊密耦閤.最後,提齣瞭度量CRC的海明內聚度HC.與現有方法相比,HC同時攷慮瞭包內和包間的數據依賴.因而,該方法能夠有效地反映包內部類間的語義關繫.此外,HC利用包的使用模式提高瞭度量結果的可區分性.實驗研究錶明HC能夠有效評估包的內聚程度.充分說明瞭作為HC基礎的CRC具有較高的閤理性.
위료일치이고효지계산포내취성,허다연구자제출료대량적포내취성도량방법.연이,저사방법주요의뢰우포내부적수거류관계,상도치도량결과여실제개발경험상패.위료해결저일문제,수선이포적직책위기출장포화분위4류.연후,제출료공동중용내취CRC,병근거포적분류광가토론료CRC적괄용성.CRC적핵심사상시약다개류총피공동중용,칙타문지간존재긴밀우합.최후,제출료도량CRC적해명내취도HC.여현유방법상비,HC동시고필료포내화포간적수거의뢰.인이,해방법능구유효지반영포내부류간적어의관계.차외,HC이용포적사용모식제고료도량결과적가구분성.실험연구표명HC능구유효평고포적내취정도.충분설명료작위HC기출적CRC구유교고적합이성.
A number of package cohesion metrics have been proposed in the last decade, but they mainly converge on intra-package data dependencies between classes, which are inadequate to represent the semantics of packages in many cases. To address this problem, the authors first classify packages into four categories in terms of the kinds of their tasks. Next, a new package cohesion called CRC based on client usages is proposed by considering the fact that several classes are closely related if they are always reused together. And then the application areas of CRC in terms of the package classification framework are analyzed. Finally, a CRC measure called HC is presented. Compared to existing package cohesion metrics, HC considers not only intra-package but also inter-package data dependencies. It is hence able to reveal semantic relationships between classes. Furthermore, HC takes into account how the clients of a package use the package, thereby providing a finer-grain evaluation of the cohesion of a package. Experimental results demonstrates the effectiveness of HC, which likewise proves the feasibility of CRC.