What Is Program Comprehension?

Program understanding is the process of obtaining knowledge from computer programs. This knowledge can be used for troubleshooting, enhancing programs, reusing programs, and organizing documents. Program understanding is an important part of software engineering.

The task of program understanding is to reveal the function and implementation mechanism of the program, that is, to understand the external behavior and internal structure of the system. The specific tasks can be broken down as follows.
1) By examining a single program design structure, the program is represented as an abstract syntax tree, symbol table, or ordinary source text, including manual code reading, artifact extraction, program analysis, static analysis, and dynamic analysis.
2) Try to make explicit the implicit information of the program and visualize the internal relations of the program. Such as control flow and data flow analysis, the construction of various program views.
3) Extract information from the source code and store it in a common database, and then query the database through a query language.
4) Check the structural relationship in the process of program construction, and clearly indicate the dependencies between program components.
5) Identify high-level concepts of the program, such as standard algorithms, data structures, syntax, and semantic matching. [2]
After analysis, comprehensive, accurate, and rapid understanding of the program, for software development, maintenance, quality assurance and
Sentence analysis
Similar to natural language, program files are composed of statements, including identifiers,
From
The following briefly introduces several program understanding methods.
1. Engineering method: Use engineering method to understand program. Engineering methods include forward engineering,
Reading source code is an important activity for program understanding, but reading other people's code is tedious and difficult work, so the development of auxiliary tools has become an important research content of program understanding, and there have been many in this field. Results. These tools can organize and represent source code in a clearer, more readable, and more understandable way, removing people from the irritating
Understanding the program correctly, completely, and quickly means that the program is understood efficiently. In the process of program understanding, maintenance personnel must collect as much information as possible (program documents, source code, program organization and representation, etc.), and the integrity, legibility, and reliability of these information directly affect the efficiency of understanding. In addition, software personnel's own professional knowledge and application domain knowledge are also important. These are factors that affect program understanding. For these factors, the following countermeasures can be adopted.
1. Improve the quality of maintenance personnel
The maintenance personnel are the main body of the software understanding process, so the quality of the maintenance personnel directly affects the efficiency of understanding. The more maintenance personnel have in the application area or programming language, the easier it is to understand the program and the entire software system. Therefore, more opportunities should be given to the training of maintenance personnel to improve their professional level and improve the overall quality of the maintenance team. In addition, the knowledge area of maintenance personnel should be widened. For example, if you want to understand a certain system applied in the financial field, at the beginning of the understanding, you should invite experts in the field to do the corresponding training for the understanders, broaden their knowledge, and help them to enter faster Software understands the environment.
2. Manage the development process scientifically
Program understanding is performed on the basis of existing systems and saved information. Therefore, participants in program development activities often need to be consulted during program development activities. However, there are certain difficulties. One of the reasons may be that these staff members have heavy tasks or it is difficult to cooperate with the maintenance staff due to forgetting; or they may have left the unit and could not consult at all. Therefore, scientific management should be adopted during system development. It contains two levels of meaning: one is to keep all relevant documents and keep them updated. For example, from the initial requirements specifications, system design documents to maintenance documents, they must be properly stored and updated in a timely manner. This information directly affects the quality of information collected by maintenance personnel. The second is to pay attention to the implementation of the system, such as naming styles, comments, nesting levels, it is best to use unified rules, which directly affect the ease and depth of maintenance staff understanding.
3 Effective use of automation aids
Development of auxiliary tools is an important research content of software understanding, and there have been many achievements in this field. These tools can organize and represent source code in a clearer, more readable, and more understandable way, freeing people from tedious code reading. Common auxiliary tools are program slicer, static analyzer, dynamic analyzer and so on. The program slicer can help the maintenance personnel to select and observe only the program components to be modified and affected by the modification, without being disturbed by other unrelated components, displaying the data link and related features, so that the maintenance personnel can track the impact of the change. The static analyzer can help maintainers quickly extract information about modules, processes, variables, data elements, objects and classes, and class hierarchies. During the understanding process, maintenance personnel should use these tools to improve understanding efficiency. [4]

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?