Analysis of Nested Loops

  • Salwa K. Abd-El-Hafiz
  • Victor R. Basili
Part of the The Springer International Series in Engineering and Computer Science book series (SECS, volume 325)


To rigorously analyze nested loops, the following problems need to be solved:
  1. 1.

    How to identify the initializations of inner loops? In Chapter 4, it has been assumed that a loop is immediately preceded by its initialization. Because the syntax of most imperative programming languages does not satisfy this assumption, a method for identifying the initialization statements of inner loops needs to be defined. Identifying the initialization of an outermost loop is not as crucial because the analysis results of this loop are not used in analyzing other loops. Specifications of the whole nested construct can be written relative to the program state just before its start.

  2. 2.

    How to represent and utilize the analysis results of inner loops? A technique for analyzing flat loops has been described in Chapter 4. Can the same basic technique be used for outer loops (loops containing other loops)? What modifications, if any, need to be performed on the basic analysis technique to analyze outer loops?

  3. 3.

    How to modify the resulting specifications to facilitate Hoare-style verification [23]? This problem can be further divided into two subproblems, which are explained using the nested construct shown in Figure 5.1. In this nested construct, let I; and 10 be the invariants of the inner and outer loops, respectively.



Outer Loop Nest Loop Symbolic Execution Analysis Knowledge Context Adaptation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer Science+Business Media New York 1995

Authors and Affiliations

  • Salwa K. Abd-El-Hafiz
    • 1
  • Victor R. Basili
    • 2
  1. 1.Cairo UniversityEgypt
  2. 2.University of MarylandUSA

Personalised recommendations