## Abstract Program Transformation by Solving Recurrences

Citations: | 2 - 0 self |

### BibTeX

@MISC{Luca_abstractprogram,

author = {Beatrice Luca and Stefan Andrei and Hugh Anderson and Siau-cheng Khoo},

title = {Abstract Program Transformation by Solving Recurrences},

year = {}

}

### OpenURL

### Abstract

Recursive programs may require large numbers of procedure calls and stack operations, and many such recursive programs exhibit exponential time complexity, due to the time spent re-calculating already computed sub-problems. As a result, methods which transform a given recursive program to an iterative one have been intensively studied. We propose here a new framework for transforming programs by removing recursion. The framework includes a unified method of deriving low time-complexity programs by solving recurrences extracted from the program sources. Our prototype system, ������, is an initial implementation of the framework, automatically finding simpler “closed form ” versions of a class of recursive programs. Though in general the solution of recurrences is easier if the functions have only a single recursion parameter, we show a practical technique for solving those with multiple recursion parameters.

### Citations

570 | A Transformation System for Developing Recursive Programs
- Burstall, Darlington
- 1976
(Show Context)
Citation Context ...pute each sub-problem only once, remembering a specific number of previous values. Traditional techniques for program transformation are tupling [4, 21], memoization [1, 6, 7, 14, 19, 24], tabulation =-=[2, 3, 13, 23]-=- and static incrementalization [18]. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility for parallel evaluation. It can be made automatic on subclasses ... |

508 |
Concrete Mathematics: A Foundation for Computer Science
- Graham, Knuth, et al.
- 1990
(Show Context)
Citation Context ... by the traditional techniques. This puzzle asks the question: How many ways, U(n) are there to tile a 3×n rectangle with dominos? A solution program (O(e n )) derived using the approach suggested in =-=[12]-=- consists of two mutually recursive functions: U( n ) � �� (n = 0) ���� 1 ���� �� (n = 1) ���� 0 ���� U(n − 2) + 2 ∗ V(n − 1)� V( n ) � �� (n = 0) ���� 0 ���� �� (n = 1) ���� 1 ���� U(n − 1) + V(n − 2... |

73 |
Towards an automated tupling strategy
- Chin
- 1993
(Show Context)
Citation Context ...incrementalization [18]. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility for parallel evaluation. It can be made automatic on subclasses of problems =-=[5]-=- and to work on more general forms [8]. It is also extended to store lists of values [23], but such lists are generated in a fixed way, which is not the most appropriate way for many programs. A speci... |

70 | Analysis and caching of dependencies
- Abadi, Lampson, et al.
- 1996
(Show Context)
Citation Context ...problems, an improvement is to compute each sub-problem only once, remembering a specific number of previous values. Traditional techniques for program transformation are tupling [4, 21], memoization =-=[1, 6, 7, 14, 19, 24]-=-, tabulation [2, 3, 13, 23] and static incrementalization [18]. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility for parallel evaluation. It can be ma... |

69 |
Incremental computation via function caching
- Pugh, Teitelbaum
- 1989
(Show Context)
Citation Context ...problems, an improvement is to compute each sub-problem only once, remembering a specific number of previous values. Traditional techniques for program transformation are tupling [4, 21], memoization =-=[1, 6, 7, 14, 19, 24]-=-, tabulation [2, 3, 13, 23] and static incrementalization [18]. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility for parallel evaluation. It can be ma... |

67 |
Tabulation techniques for recursive programs
- Bird
- 1980
(Show Context)
Citation Context ...pute each sub-problem only once, remembering a specific number of previous values. Traditional techniques for program transformation are tupling [4, 21], memoization [1, 6, 7, 14, 19, 24], tabulation =-=[2, 3, 13, 23]-=- and static incrementalization [18]. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility for parallel evaluation. It can be made automatic on subclasses ... |

52 |
Lazy Memo-functions
- Hughes
- 1985
(Show Context)
Citation Context ...problems, an improvement is to compute each sub-problem only once, remembering a specific number of previous values. Traditional techniques for program transformation are tupling [4, 21], memoization =-=[1, 6, 7, 14, 19, 24]-=-, tabulation [2, 3, 13, 23] and static incrementalization [18]. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility for parallel evaluation. It can be ma... |

47 | Hypergeometric solutions of linear recurrences with polynomial coefficients
- Petkovšek
- 2013
(Show Context)
Citation Context ...ifferential equation (ODE). Unfortunately there are no general methods for finding closed form solutions to the resultant ODEs. However, an algorithm to solve the first-order case (equation 2) exists =-=[20]-=-. The general form is: Xn = α(n) · Xn−1 + p(n) (2) where α(n) and p(n) are polynomials in n. For these kind of recurrences there is only one initial value, usually it is Xo, but depending on the domai... |

46 | Static caching for incremental computation
- Liu, Stoller, et al.
- 1998
(Show Context)
Citation Context ...a specific number of previous values. Traditional techniques for program transformation are tupling [4, 21], memoization [1, 6, 7, 14, 19, 24], tabulation [2, 3, 13, 23] and static incrementalization =-=[18]-=-. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility for parallel evaluation. It can be made automatic on subclasses of problems [5] and to work on more... |

34 |
Automatic Methods for Program Transformation
- Chin
- 1990
(Show Context)
Citation Context ...already computed sub-problems, an improvement is to compute each sub-problem only once, remembering a specific number of previous values. Traditional techniques for program transformation are tupling =-=[4, 21]-=-, memoization [1, 6, 7, 14, 19, 24], tabulation [2, 3, 13, 23] and static incrementalization [18]. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility fo... |

33 | Tupling calculation eliminates multiple data traversals
- Hu, Iwasaki, et al.
- 1997
(Show Context)
Citation Context ...pute each sub-problem only once, remembering a specific number of previous values. Traditional techniques for program transformation are tupling [4, 21], memoization [1, 6, 7, 14, 19, 24], tabulation =-=[2, 3, 13, 23]-=- and static incrementalization [18]. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility for parallel evaluation. It can be made automatic on subclasses ... |

24 | From recursion to iteration: what are the optimizations
- Liu, Stoller
- 1999
(Show Context)
Citation Context ... where the recursive program takes 200 times longer, whereas the closed-form version shows only a marginal increase in time. We also compare (in Table 3) our implementation �������� with that done in =-=[17]-=-, an iterative Fibonacci function obtained by the incrementalization method. Our (near) constant time implementation increases more slowly as n increases. The function ����� is: fib�s( n ) � 1 1 10 (−... |

16 |
Tupling functions with multiple recursion parameters
- Chin, Khoo
- 1993
(Show Context)
Citation Context ...to compute multiple values together in an efficient way, leaving open the possibility for parallel evaluation. It can be made automatic on subclasses of problems [5] and to work on more general forms =-=[8]-=-. It is also extended to store lists of values [23], but such lists are generated in a fixed way, which is not the most appropriate way for many programs. A special form of tupling can eliminate multi... |

12 |
Transformation of Programs and Use of Tupling Strategy
- Pettorossi
- 1977
(Show Context)
Citation Context ...already computed sub-problems, an improvement is to compute each sub-problem only once, remembering a specific number of previous values. Traditional techniques for program transformation are tupling =-=[4, 21]-=-, memoization [1, 6, 7, 14, 19, 24], tabulation [2, 3, 13, 23] and static incrementalization [18]. Tupling aims to compute multiple values together in an efficient way, leaving open the possibility fo... |

11 |
Program derivation via list introduction
- Pettorossi, Proietti
- 1997
(Show Context)
Citation Context |

10 |
M.: A Bounds Inference Method for Vector-Based Memoisation
- Chin, Hagiya
- 1997
(Show Context)
Citation Context |

9 | A transformational method for dynamic-sized tabulation
- Chin, Hagiya
- 1995
(Show Context)
Citation Context |

5 |
Chebyshev Polynomials for Boxing and
- Fournier, Buchanan
- 1994
(Show Context)
Citation Context ...ntaining one symbolic parameter, a = cos(t). These polynomials find practical application in the field of computer graphics when calculating boxing and intersections of parametric curves and surfaces =-=[11]-=-. A sample is: cheb( n, a ) � �� (n = 0) ���� 1 ���� �� (n = 1) ���� a ���� 2 ∗ a ∗ cheb(n − 1, a) − cheb(n − 2, a)� The transformed function is much faster to compute: cheb�s( n, a ) � 1 2 ((a − √ −1... |

4 | Synchronisation analysis to stop tupling
- Chin, Khoo, et al.
- 1998
(Show Context)
Citation Context ...ns with multiple recursion arguments such as these has always been difficult. Some existing methods are available to transform such a program into one with linear complexity. Synchronisation analysis =-=[9]-=-, in particular, classifies multiple recursion arguments as level-3 synchronisations, and guarantees that a linear-complexity program can be obtained via the multiplerecursion tupling technique. The n... |

3 | Adaptive access control in coordination-based mobile agent systems
- Julien, Payton, et al.
- 2005
(Show Context)
Citation Context ... to compactly express complexity measures. The solution of the recurrences provides a closed form expression which can be evaluated to decide if mobile agents can be allowed to run in a given context =-=[16]-=-, assist programmers to reason about the behaviour of the programs, optimize their programs [22], and even discover bugs that reduce the efficiency of a program, that may be otherwise difficult to det... |

3 | Future directions in program transformation
- Pettorossi, Proietti
- 1997
(Show Context)
Citation Context ...m expression which can be evaluated to decide if mobile agents can be allowed to run in a given context [16], assist programmers to reason about the behaviour of the programs, optimize their programs =-=[22]-=-, and even discover bugs that reduce the efficiency of a program, that may be otherwise difficult to detect. In addition, many algorithms are naturally expressed in a recursive form, although there ma... |

1 |
N.Jones. Redundant Call Elimination via Tupling. Fundamenta Infomaticae
- Chin, Khoo
- 2006
(Show Context)
Citation Context ... An ad-hoc method can be found in a footnote of the first-year undergraduate textbook Structure and Interpretation of Computer Programs. Only a few existing program transformation strategies, such as =-=[9, 10, 18]-=- can handle recursive programs with multiple recursion parameters. In this paper, we presented a novel technique for converting a class of such programs into linear recurrences, and recovering the des... |

1 |
Recursion Removal from Recursive Programs with Only One Descent Function
- Ichikawa, Konishi, et al.
- 2005
(Show Context)
Citation Context ...2, 3, 4, 6, 7, 13, 14, 18, 19, 21, 24]. Futamura’s method for removing recursion from linear recursive programs was recently further extended to deal with recursive programs with one descent function =-=[15]-=-. Our framework differs from these strategies in that we discover the closed forms of these recursive programs. Our technique exploits symbolic computation during transformation. More notably, the tra... |