8 PROGRAM COMPREHENSION

The most incomprehensible thing about the world is that it is comprehensible.

— Albert Einstein

8.1 GENERAL IDEA

It is important to comprehend the details of any complex artifact to be able to maintain it, because maintenance requires modifications to portions of the systems—and maintaining a software system is no different. Inaccurate and incomplete understanding of a software system before performing a modification on it is likely to severely degrade its performance and reliability. Therefore, good program comprehension plays an important role in providing effective software maintenance and enabling successful evolution of software systems. In order to get a handle on the role of program comprehension, we look at the five types of tasks commonly associated with software maintenance and evolution and the types of activities involving those tasks. As listed in Table 8.1, the five kinds of maintenance and evolution tasks are adaptive, perfective, and corrective maintenance; reuse; and code leverage. The detailed activities associated with each of the five tasks have been listed in the second column of Table 8.1. Table 8.1 indicates that understanding the system or problem is common to all maintenance and evolution tasks. It may be noted that understanding of a system is a cognitive issue, and to study the cognitive processes behind the tasks in Table 8.1, a number of cognition models have been developed, as listed in Table 8.2.

TABLE 8.1 Tasks and ...

Get Software Evolution and Maintenance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.