Impact of class attributes on cognitive complexity

Original Article
  • 119 Downloads

Abstract

Understanding, an internal process of human beings, is difficult to measure but not impossible. Therefore attempts have been made to measure the understandability of software system in terms of its complexity. Understandability of source code can be measured in terms of its cognitive complexity which is also called psychological complexity. This paper presents a metrics for measuring understandability of a class integral to Object Oriented Software System. The manuscript proposes metrics for measuring cognitive complexity of class due to its attributes. The proposed metrics takes into consideration the complexity introduced by data types of attributes that forms data elements of a class. The primitive, system defined and user-defined data types, used for defining the attributes have been weighted to measure the cognitive complexity of a class. Also an empirical study has been performed to gain insight on the correlation between the proposed measure and the understandability of the program. The results show the significance of measuring contribution of attributes towards cognitive complexity of a class. A metrics meant to measure cognitive complexity of a class should consider weighted measure of complexity introduced by different attributes of a class.

Keywords

Attributes Cognitive complexity Complexity measure Maintainability and understandability 

References

  1. Atkinson DC, Griswold WG (1998) Effective whole-program analysis in the presence of pointers. In: Proceedings of the 6th ACM SIGSOFT international symposium on foundations of software engineering, SIGSOFT ’98/FSE-6, pp 46–55, New York, NY, USA, ACMGoogle Scholar
  2. Bandi RK, Vaishnavi VK, Turk DE (2003) Predicting maintenance performance using object-oriented design complexity metrics. IEEE Trans Softw Eng 29:77–87CrossRefGoogle Scholar
  3. Bastani FB, Iyengar SS (1987) The effect of data structures on the logical complexity of programs. Commun ACM 30:250–259CrossRefGoogle Scholar
  4. Bennett KH, Cornelius BJ, Munro M, Robson DJ (1988) Software maintenance: a key area for research. Univ ComputGoogle Scholar
  5. Boehm BW, Brown JR, Lipow M (1976) Quantitative evaluation of software quality. In: Proceedings of the 2nd international conference on software engineering, ICSE ’76, pp 592–605, Los Alamitos, CA, USA, 1976 IEEE Computer Society PressGoogle Scholar
  6. Booch G (1986) Object-oriented development. IEEE Trans Softw Eng 12:211–221CrossRefGoogle Scholar
  7. Bradley JT (2003) An examination of aspect-oriented programming in industry. Technical reportGoogle Scholar
  8. Briand LC, Daly JW, Wüst JK (1999) A unified framework for coupling measurement in object-oriented systems. IEEE Trans Softw Eng 25:91–121CrossRefGoogle Scholar
  9. Cant SN, Ross Jeffery D, Brian H-S (1995) A conceptual model of cognitive complexity of elements of the programming process. Inf Softw Technol 37(7):351–362CrossRefGoogle Scholar
  10. Chhabra JK, Aggarwal KK, Yogesh S (2003) Code and data spatial complexity: two important software understandability measures. Inf Softw Technol 45(8):539–546CrossRefGoogle Scholar
  11. Chhabra JK, Aggarwal KK, Yogesh S (2004) Measurement of object-oriented software spatial complexity. Inf Softw Technol 46:689–699CrossRefGoogle Scholar
  12. Chidamber SR, Kemerer CF (1994) A metrics suite for object oriented design. IEEE Trans Softw Eng 20:476–493CrossRefGoogle Scholar
  13. Corbi TA (1989) Program understanding: challenge for the 1990’s. IBM Syst J 28:294–306CrossRefGoogle Scholar
  14. Cruz-Lemus JA, Maes A, Genero M, Poels G, Piattini M (2010) The impact of structural complexity on the understandability of uml statechart diagrams. Inf Sci 180(11):2209–2220MathSciNetCrossRefGoogle Scholar
  15. Curtis B, Sheppard SB, Milliman P, Borst MA, Love T (1979) Measuring the psychological complexity of software maintenance tasks with the Halstead and McCabe metrics. IEEE Trans Softw Eng 5:96–104MATHCrossRefGoogle Scholar
  16. Genero M, Poels G, Piattini M (2008) Defining and validating metrics for assessing the understandability of entity-relationship diagrams. Data Knowl Eng 64:534–557CrossRefGoogle Scholar
  17. Halstead MH (1977) Elements of software science (operating and programming systems series). Elsevier Science Inc, New YorkGoogle Scholar
  18. Jindasawat N, Kiewkanya M, Muenchaisri P (2004) Investigating correlation between the object-oriented design maintainability and two sub-characteristics: understandability and modifiability. In: IASSE’04, pp 151–156Google Scholar
  19. Kafura D, Reddy GR (1987) The use of software complexity metrics in software maintenance. IEEE Trans Softw Eng 13:335–343CrossRefGoogle Scholar
  20. Laitinen K (1996) Estimating understandability of software documents. SIGSOFT Softw Eng Notes 21:81–92CrossRefGoogle Scholar
  21. Li W, Henry S (1993) Object-oriented metrics that predict maintainability. J Syst Softw 23(2):111–122CrossRefGoogle Scholar
  22. McCabe TJ (1976) A complexity measure. IEEE Trans Softw Eng 2(4):308–320MathSciNetMATHCrossRefGoogle Scholar
  23. Miller GA (1956) The magical number seven plus or minus two: some limits on our capacity for processing information. Psychol Rev 63(2):81–97CrossRefGoogle Scholar
  24. Misra S (2006) Modified cognitive complexity measure. In: Levi A, Savas E, Yenign H, Balcisoy S, Saygin Y (eds) Computer and information sciences ISCIS 2006, volume 4263 of Lecture Notes in Computer Science. Springer, Berlin, pp 1050–1059Google Scholar
  25. Misra S, Akman I (2008) A model for measuring cognitive complexity of software. In: KES (2), pp 879–886Google Scholar
  26. Munson JC, Werries DS (1996) Measuring software evolution. In: Proceedings of the 3rd international symposium on software metrics: from measurement to empirical results, METRICS ’96Google Scholar
  27. Ottenstein KJ, Ottenstein LM (1984) The program dependence graph in a software development environment. SIGPLAN Notices 19:177–184CrossRefGoogle Scholar
  28. Sheldon FT, Jerath K, Chung H (2002) Metrics for maintainability of class inheritance hierarchies. J Softw Maint 14:147–160MATHCrossRefGoogle Scholar
  29. Singh Y, Kaur A, Malhotra R (2010) Empirical validation of object-oriented metrics for predicting fault proneness models. Softw Qual Control 18:3–35CrossRefGoogle Scholar
  30. Wang Y, Shao J (2003) Measurement of the cognitive functional complexity of software. In: IEEE ICCI, pp 67–74Google Scholar
  31. Weyuker EJ (1988) Evaluating software complexity measures. IEEE Trans Softw Eng 14:1357–1365MathSciNetCrossRefGoogle Scholar

Copyright information

© The Society for Reliability Engineering, Quality and Operations Management (SREQOM), India and The Division of Operation and Maintenance, Lulea University of Technology, Sweden 2012

Authors and Affiliations

  1. 1.Centre for Development of Advanced ComputingNoidaIndia
  2. 2.USICT, GGSIP UniversityDelhiIndia

Personalised recommendations