Program comprehension during software maintenance involves the acquisition of knowledge about programs, as well as accompanying documentation and operating procedures.
The costs of performing program comprehension have been widely cited as being between 50-90% of overall cost of performing maintenance [Standish84], i.e. that much time is spent on understanding the code rather than just making the changes/fixes.
Prior to making a change it is essential to understand the software product as a whole. This involves:
- having general knowledge of what the software does and how it relates to its environment
- identifying where in the system the changes are to be effected
- having an in-depth knowledge of how the parts to be corrected or modified work
- possible additional domain knowledge, such as tax laws
Maintenance cost increases as the age of the system increases since documentation likely becomes out of date or the work is carried out by maintainers who didn’t write the original code. HP estimated that reading code costs $200 million a year.
Knowledge and Information
There are three main types of knowledge proposed by Shneiderman [Shneiderman79]:
- syntactic knowledge: a type of knowledge which comes from the use of a programming language
- semantic knowledge of software engineering: a high level than above… It may be a solution to debugging a problem or an algorithm to solve a particular problem
- semantic knowledge of task related knowledge: this may be domain knowledge about how the domain procedures are implemented or how a program operates
There are two main strategies for accumulating information [Littman86]:
- systematic: the entire program is examined to establish the interactions between components
- as-needed: the maintainer only attempts to gain an understanding of part of the program so only a partial model of the software is devised prior to modification
Comprehension Needs
Different roles have very different needs for comprehension since they perform vastly different tasks.
Managers
Mangers need to have decision support knowledge in order to make informed decisions. This is usually high level knowledge related to cost.
Analyst
Analysts require an understanding of the domain to determine the requirements of the change and the impact to the system and its environment.
An analyst needs a global understanding; an understanding of the interaction between the major functional units of the system.
Designers
During maintenance the designer’s job is to extract the architectural and detailed design information so they can determine how enhancements could be accommodated by the architecture, data structures and control flow of the system.
They also need to go through the existing source code to get a rough idea of the size of the job, the areas of the system that will be affected and the knowledge that will be needed by the programming team.
Programmers
Maintenance programmers are required to know the execution effect of the systems at different levels of abstraction, the casual knowledge and the knowledge of the product environment relation.
At higher levels of abstraction the programmer needs to know the function of individual components, while at lower levels of abstraction the programmer needs to know what individual source code lines do and the control and data flow.
This information will assist the programmer to:
- decide whether to restructure or rewrite specific code fragments
- predict easily any knock-on effect when making changes that are likely to affect other parts of the system
- hypothesise the location and cause of errors
- determine the feasibility of proposed changes and notify management of anticipated problems
This essentially makes up impact analysis.
References
Standish84 – Standish, T. A., ‘An Essay on Software Reuse’, IEEE Transactions on Software Engineering, Vol. 10, No.5, September 1984
Shneiderman79 – Shneiderman, B., and Mayer, R., ‘Syntactic/Semantic Interactions in Programmer Behaviour: A Model and Experimental Results’, International Journal of Computer and Information Sciences, Vol. 8, No. 3, 1979
Littman86 – Littman, D. C., Pinto, J., Letovsky, S., and Soloway, E., ‘Mental Models and Software Maintenance: Empirical Studies of Programmers’, Albex, Norwoord NJ, 1986.
Related posts:
- Program Comprehension Strategies
- An Introduction to Reverse Engineering
- What Not To Do When Maintaining Software Applications
- An Introduction to Program Slicing
- Static and Dynamic Program Slicing
Bookmarking
-
Stumble | Digg | del.icio.us | RSS


{ 1 trackback }
{ 0 comments… add one now }