Redundant Call Elimination via Tupling

Redundant call elimination has been an important program optimisation process as it can produce super-linear speedup in optimised programs. In this paper, we investigate use of the tupling transformation in achieving this optimisation over a first-order functional language. Standard tupling technique, as described in [6], works excellently in a restricted variant of the language; namely, functions with single recursion argument. We provide a semantic understanding of call redundancy, upon which we construct an analysis for handling the tupling of functions with multiple recursion arguments. The analysis provides a means to ensure termination of the tupling transformation. As the analysis is of polynomial complexity, it makes the tupling suitable as a step in compiler optimisation.

[1]  Neil D. Jones,et al.  Mix: A self-applicable partial evaluator for experiments in compiler generation , 1989, LISP Symb. Comput..

[2]  Jan Sparud,et al.  Fixing some space leaks without a garbage collector , 1993, FPCA '93.

[3]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[4]  Norman H. Cohen Eliminating Redundant Recursive Calls. , 1983, TOPL.

[5]  Robert Glück,et al.  An Algorithm of Generalization in Positive Supercompilation , 1995, ILPS.

[6]  Guy E. Blelloch,et al.  Selective memoization , 2003, POPL '03.

[7]  Jens P. Secher Driving in the Jungle , 2001, PADO.

[8]  Wei-Ngan Chin,et al.  A bounds inference method for vector-based memoization , 1997, ICFP '97.

[9]  Jianguo Lu,et al.  Higher Order Generalization , 1998, JELIA.

[10]  Yanhong A. Liu,et al.  Static caching for incremental computation , 1998, TOPL.

[11]  DONALD MICHIE,et al.  “Memo” Functions and Machine Learning , 1968, Nature.

[12]  Alberto Pettorossi,et al.  Program derivation via list introduction , 1997, Algorithmic Languages and Calculi.

[13]  John Darlington,et al.  A Transformation System for Developing Recursive Programs , 1977, J. ACM.

[14]  Alberto Pettorossi,et al.  Unfolding - Definition - Folding, in this Order, for Avaoiding Unnecessary Variables in Logic Programs , 1991, PLILP.

[15]  Olivier Danvy,et al.  Programs as data objects : second symposium, PADO 2001, Aarhus, Denmark, May 21-23, 2001 : proceedings , 2001 .

[16]  Andrzej Skowron,et al.  Higher Order Generalization in Program Derivation , 1987, TAPSOFT, Vol.2.

[17]  Robert Glück,et al.  Towards Unifying Partial Evaluation, Deforestation, Supercompilation, and GPC , 1994, ESOP.

[18]  Wei-Ngan Chin Towards an automated tupling strategy , 1993, PEPM '93.

[19]  Richard S. Bird,et al.  Tabulation Techniques for Recursive Programs , 1980, CSUR.

[20]  Yanhong A. Liu,et al.  Strengthening invariants for efficient computation , 2001, Sci. Comput. Program..

[21]  Wei-Ngan Chin,et al.  Synchronization Analyses for Multiple Recursion Parameters (Extended Abstract) , 1996, Dagstuhl Seminar on Partial Evaluation.

[22]  Alberto Pettorossi,et al.  A powerful strategy for deriving efficient programs by transformation , 1984, LFP '84.

[23]  Valentin F. Turchin,et al.  The concept of a supercompiler , 1986, TOPL.

[24]  Wei-Ngan Chin,et al.  Automatic methods for program transformation , 1990 .

[25]  Yanhong A. Liu,et al.  Dynamic Programming via Static Incrementalization , 1999, High. Order Symb. Comput..

[26]  Lennart Augustsson,et al.  Compiling Pattern Matching , 1985, FPCA.

[27]  Akihiko Takano,et al.  Tupling calculation eliminates multiple data traversals , 1997, ICFP '97.

[28]  Wei-Ngan Chin,et al.  A higher-order removal method , 1996, LISP Symb. Comput..

[29]  Philip Wadler,et al.  Deforestation: Transforming Programs to Eliminate Trees , 1990, Theor. Comput. Sci..

[30]  Chris Okasaki,et al.  Amortization, lazy evaluation, and persistence: lists with catenation via lazy linking , 1995, Proceedings of IEEE 36th Annual Foundations of Computer Science.

[31]  Erik Barendsen,et al.  Conventional and Uniqueness Typing in Graph Rewrite Systems , 1993, FSTTCS.

[32]  Robert Glück,et al.  A positive supercompiler , 1996, Journal of Functional Programming.

[33]  Peter Sestoft,et al.  An experiment in partial evaluation: the generation of a compiler generator , 1985, SIGP.

[34]  Helmut Seidl,et al.  Constraints to stop higher-order deforestation , 1997, POPL '97.