Improving Cohesion Metrics for Classes By Considering Dependent Instance Variables

의존 인스턴스 변수를 고려한 클래스 응집도 척도의 개선

  • 채흥석 (부산대학교 컴퓨터 공학과) ;
  • 권용래 (한국과학기술원 전자전산학과) ;
  • 배두환 (한국과학기술원 전자전산학과)
  • Published : 2004.09.01

Abstract

Cohesion refers to the degree of the relatedness of the elements in a module, and it is widely accepted that the module of higher cohesion is easier to understand, maintain, and reuse. Recently, several cohesion metrics have been proposed to measure the cohesiveness of classes in an object-oriented program. However, the existing cohesion metrics do not consider the characteristics of dependent instance variables that are commonly used in a class and, thus, do not properly reflect the cohesiveness of the class. This paper presents an approach for improving the cohesion metrics by considering the characteristics of the dependent instance variables in an object-oriented program. To demonstrate the importance of the dependent instance variables, a case study has been conducted on a class library.

응집도는 모듈의 구성 요소들 사이의 관련성 정도를 나타내는 척도로서, 응집도가 높을수록 소프트웨어에 대한 이해 및 유지보수가 용이하다고 알려져 있다. 최근에 응집도의 개념을 객체지향 시스템의 클래스에 적용하기 위하여 많은 응집도 척도들이 제안되고 있다. 그러나, 기존의 응집도 척도들은 다른 인스턴스 변수의 값에 의존하는 의존 인스턴스 변수의 특성을 고려하지 않았기 때문에 클래스의 응집도를 정확하게 측정하지 못하였다. 본 논문에서는 응집도 평가 시 의존 인스턴스 변수에 대한 고려를 통하여 기존의 응집도 척도를 개선시킬 수 있음을 소개한다. 그리고, 의존 인스턴스의 특성을 기존의 응집도 척도에 반영한 실험을 통하여 의존 인스턴스 변수에 대한 고려의 중요성을 소개한다.

Keywords

References

  1. W. Stevens. G. Myers and L. Constantine. 'Structured Design.' IBM Systems Journal, Vol, 12, No. 2, 1974
  2. N. N. Card, G. T. Page and F. E. McGarry, 'Criteria for Software Modularization,' Proc. of 8th Int. Conf. on Software Engineering, pp. 372-377, 1985
  3. N. N. Card, V. E. Chruch and W. W. Agresti, 'An Empirical Study of Software Design Practices,' IEEE Trans. on Software Engineering, Vol 12, No.2, pp. 264-271, 1986 https://doi.org/10.1109/TSE.1986.6312942
  4. A. Snyder, 'Encapsulation and Inheritance in Object-Oriented Programming Languages,' Proc. of lth ACM Conf. on Object-Oriented Systems, Languages, and Applications, pp. 84-91, September 1986
  5. J. M. Bieman and B. -K. Kang, 'Cohesion and Reuse in an Object-Oriented System,' in: Proc. Symp. on Software Reusability, pp. 259-262, 1995
  6. L. C. Briand, J. . Daly and J. Wust, 'A Unified Framework for Cohesion Measurement in Object-Oriented Systems:' Empirical Software Engineering Journal. Vol. 1, pp. 65-117, 1998 https://doi.org/10.1023/A:1009783721306
  7. H. -S. Chae, Y. -R. Kwon and D. -H. Bae. 'A Cohesion Measure for Object-Oriented Classes,' Software Practice and Experience, Vol. 30, pp. 1405-1431, 2000 https://doi.org/10.1002/1097-024X(200010)30:12<1405::AID-SPE330>3.0.CO;2-3
  8. S. R. Chidamber and C. F. Kemerer, 'Towards a Metrics Suite for Object-Oriented Design,' in: Proc. 6th ACM Conf. on Object-Oriented Systems, Languages and Applications, pp. 197-211, 1991
  9. Chidamber S. R., Kemerer C. F., A Metric Suit for Object Oriented Design, PP. 476-493, IEEE Transactions on Software Engineering, 20(6), 1994 https://doi.org/10.1109/32.295895
  10. B. Henderson-Sellers, Software Metrics, Prentice-Hall, 1996
  11. M. Hitz and B. Montazeri, 'Measuring Coupling and Cohesion in Object-Oriented Systems,' in: Proc. of Symp, on Applied Corporate Computing, 1995
  12. W. Li, S. Henry, 'Object Oriented Metrics Which Predict Maintainability,' Journal of Systems and Software, Vol.23, No.2, pp.111-122, Nov., 1993 https://doi.org/10.1016/0164-1212(93)90077-B
  13. James Rumbaugh, Michael Blaha, William Premerlani, Frederick Eddy, and William Lorensen, Object-Oriented Modeling and Design, Prentice Hall International, 1991
  14. P. Devanbu, 'GENOA a customizable, language-and front-end independent code analyzer,' in: Proc. Conf. on Software Engineering, 1992, 307-317 https://doi.org/10.1145/143062.143148