Measurement of Complexity and Comprehension of a Program Through a Cognitive Approach


Computer Science and Engineering, Birla Institute of Technology


The inherent complexity of the software systems creates problems in the software engineering industry. Numerous techniques have been designed to comprehend the fundamental characteristics of software systems. To understand the software, it is necessary to know about the complexity level of the source code. Cognitive informatics perform an important role for better understanding the complexity of the software. These informatics also facilitate researchers to understand the behavior of the source code, internal as well as the control structure. This paper presents a new cognitive complexity measure (C2M) for measuring the complexity of the software system and it is tested on 50 ‘C’ programs. The proposed C2M measure was also validated with the help of Weyuker property; eight out of nine properties were satisfied by the proposed measure. The performance of the proposed measure was also compared with other existing cognitive complexity measures. The test data was distributed among 10 undergraduate students of our institute and they were asked to understand the source code. The time taken by the individual student was recorded and the meantime of the recorded data from students was considered as the actual time required to understand the program. It was further correlated with the estimated time, which was calculated through C2M measure. From the experimental results, it was observed that proposed measure provided better quality results.