Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
On the conversion of indirect to direct recursion
Kaser O., Ramakrishnan C., Pawagi S. ACM Letters on Programming Languages and Systems2 (1-4):151-164,1993.Type:Article
Date Reviewed: May 1 1995

Inline expansion replaces a call to a procedure with the procedure’s body. Inline expansion, among other benefits, eliminates procedure call overhead and improves addressing locality. Recursion presents a problem, since a recursive call has an infinite inline expansion. In direct recursion, a procedure contains a call to itself; in indirect recursion, procedure A calls procedure B which (calls procedure C which…) calls procedure A. Direct recursion is preferred over indirect recursion because direct recursion is simpler to eliminate or simulate, and some program analyses can handle only direct recursion.

The authors develop a nontrivial condition indicating when it is possible to convert indirect recursion to direct recursion, and give an algorithm for the conversion. They examine the interactions between expansion and tail-call elimination and show that the special case of indirect recursion involving only tail recursion can always be converted to direct recursion. The authors also show that the termination rule of not expanding directly recursive procedures is not by itself strong enough to avoid infinite expansion.

The assumptions used in the paper are modest, the data structures used are common to compilers, and the analysis techniques are not expensive. The paper itself is short and clear.

Reviewer:  R. Clayton Review #: CR118405
Bookmark and Share
 
Procedures, Functions, And Subroutines (D.3.3 ... )
 
 
Optimization (D.3.4 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Procedures, Functions, And Subroutines": Date
The usefulness of standard functions in Modula-2: an example in relation to VDI
So . Journal of Pascal, Ada & Modula-2 6(1): 5-9, 1987. Type: Article
Dec 1 1988
Routines: an argument against the conventional approach to functions and procedures
Middleton A. Software--Practice & Experience 16(2): 119-130, 1986. Type: Article
Dec 1 1986
Parameter transmission abstractions
Jokinen M. The Computer Journal 33(2): 133-139, 1990. Type: Article
Jun 1 1991
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy