This Article 
 Bibliographic References 
 Add to: 
Loop Monotonic Statements
June 1995 (vol. 21 no. 6)
pp. 497-505
A statement is considered to be monotonic with respect to a loop if its execution, during the successive iterations of a given execution of the loop, assigns a monotonically increasing or decreasing sequence of values to a variable. We present static analysis techniques to identify loop monotonic statements. The knowledge of loop monotonicity characteristics of statements which compute array subscript expressions is of significant value in a number of applications. We illustrate the use of this information in improving the efficiency of run-time array bound checking, run-time dependence testing, and on-the-fly detection of access anomalies. Given that a significant percentage of subscript expressions are monotonic, substantial savings can be expected by using these techniques.

[1] A.V. Aho, R. Sethi, and J.D. Ullman, Compilers, Principles, Techniques and Tools.New York: Addison-Wesley, 1985.
[2] Z. Ammarguellat and W. Harrison III, "Automatic Recognition of Induction Variable and Recurrence Relations by Abstract Interpretation," Proc. ACM SIGPLAN 1990 Conf. Programming Language Design and Implementation, pp. 283-295,White Plains, New York, June20-22, 1990.
[3] U. Banerjee,Dependence Analysis for Supercomputing. Norwell, MA: Kluwer, 1988.
[4] A. Dinning and E. Shonberg,“An empirical comparison of monitoring algorithms for access anomalydetection,” Second ACM SIGPLAN Symp. on Principles and Practice of ParallelProgramming, 1990.
[5] P.A. Emrath and D.A. Padua,“Automatic detection of nondeterminacy in parallel programs,” Proc. Workshop Parallel and Distributed Debugging, pp. 89-99,Madison, Wis., 1988.
[6] P.A. Emrath,S. Ghosh,, and D.A. Padua,“Event synchronization analysis for debugging parallel programs,” Proc. Supercomputing’89 Conf., pp. 580-588,Reno, Nev., 1989.
[7] R. Gupta, “A Fresh Look at Optimizing Array Bound Checking,” Proc. SIGPLAN '90 Conf. Programming Language Design and Implementation, pp. 272–282, June 1990.
[8] R. Gupta,“Optimizing array bound checks using flow analysis,” ACM Letters on Programming Languages and Systems, vol. 2, nos. 1-4, pp. 135-150, Mar.-Dec. 1994.
[9] R. Gupta and M. Spezialetti,“Loop monotonic computations: An approach for the efficient run-time detection of races,” Proc. SIGSOFT Symp. Testing, Analysis, and Verification, pp. 98-111,Victoria, Canada, Oct. 1991.
[10] M.R. Haghighat and C.D. Polychronopoulos,“Symbolic program analysis and optimization for parallelizingcompilers,” Proc. Fifth Workshop Languages and Compilers for Parallel Computing, pp. 355-369, Yale Univ., Aug. 1992.
[11] P. Jouvelot and B. Dehbonei,“A unified semantic approach for the vectorization and parallelization of generalized reductions,” Proc. Third Int’l Conf. Supercomputing, pp. 186-194,Crete, Greece, 1989.
[12] B. Miller and J-D. Choi,“A mechanism for efficient debugging of parallel programs,” Proc. SIGPLAN’88 Conf. Programming Language Design and Implementation, pp. 135-144,Atlanta, Ga., 1988.
[13] V. Markstein,J. Cocke,, and P. Markstein,“Optimization of range checking,” Proc. SIGPLAN’82 Symp. Compiler Construction, pp. 114-119, 1982.
[14] I. Nudler and L. Rudolph,“Tools for the efficient development of parallel programs,” Proc. First Israeli Conf. Computer System Eng., 1988.
[15] E. Schonberg, "On-the-Fly Detection of Access Anomalies," Proc. ACM/SIGPLAN '89 Conf. Programming Language Design and Implementation, pp. 285-297, 1989.
[16] Z. Shen,Z. Li,, and P.C. Yew,“An empirical study on array subscripts and data dependencies,” Proc. Int’l Conf. Parallel Processing, vol. II, pp. 145-152, Aug. 1989.
[17] M. Spezialetti and R. Gupta,“Automatic generation of assertions for detecting errors in parallel programs on shared-memory multiprocessors,” ACM/ONR Workshop Parallel and Distributed Debugging, pp. 266-268,Santa Cruz, Calif., May 1991.
[18] R. Tarjan,“Depth-first search and linear graph algorithms,” Siam J. Computing, vol. 1, no. 2, pp. 146-160, June 1972.
[19] M. Wolfe,“Beyond induction variables,” Proc. SIGPLAN Conf. Programming Language Design and Implementation, pp. 162-174,San Francisco, Calif., June 1992.

Index Terms:
Access anomalies (data races), array bound checking, run-time dependence checking, static analysis, induction variables.
Madalene Spezialetti, Rajiv Gupta, "Loop Monotonic Statements," IEEE Transactions on Software Engineering, vol. 21, no. 6, pp. 497-505, June 1995, doi:10.1109/32.391376
Usage of this product signifies your acceptance of the Terms of Use.