This text presents the knowledge-based approach to the automation of program understanding which plays an important role in nearly all software related tasks: it is vital to the development, maintenance and re-use activities, and is useful in improving the quality of software development. The approach generates program documentation mechanically by combining and building on the strengths of a practical program decomposition method, the axiomatic correctness notation, and the knowledge-based analysis approach. This text is aimed at: computer science students at the advanced graduate level and researchers and practitioners interested in software development, maintenance and re-use.
1 Introduction.- 1.1 Research Goals.- 1.2 Research Approach.- 1.3 Outline.- 2 Background.- 2.1 Loop Analysis.- 2.2 Program Analysis and Understanding.- 3 Overview and Basic Definitions.- 3.1 Definitions.- 3.2 A Loop Taxonomy.- 4 Analysis of Flat Loops.- 4.1 Normalization of the Loop Representation.- 4.2 Decomposition of the Loop Body.- 4.3 Formation of the Loop Events.- 4.4 A Knowledge Base of Plans.- 4.5 Analysis of the Events.- 5 Analysis of Nested Loops.- 5.1 Definitions.- 5.2 Analysis of Inner Loops.- 5.3 Representation of Inner Loops Analysis Results.- 5.4 Analysis of Outer Loops.- 5.5 Adaptation of Inner Loops Specifications.- 6 Discussion of the Analysis Approach.- 7 Case Study.- 7.1 Objectives.- 7.2 Method.- 7.3 Results and Analysis.- 8 Prototype Implementation.- 8.1 Design.- 8.2 Operation.- 9 Applications.- 9.1 Assisting Maintenance and Reuse.- 9.2 Assisting Formal Development.- 10 Conclusions.- 10.1 Summary of Approach.- 10.2 Observations.- 10.3 Future Work.- References.