Integer Constraints to Stop Deforestation

Deforestation is a transformation of functional programs to remove intermediate data structures. It is based on outermost unfolding of function calls where folding is introduced to avoid repeated unfolding of the same expression. Since unrestricted unfolding may encounter arbitrarily many terms, a termination analysis has to determine those subterms where unfolding is possibly dangerous. We show that such an analysis can be obtained from a control flow analysis by an extension with integer constraints — essentially at no loss in efficiency.

[1]  Morten Heine Sørensen,et al.  Grammar-Based Data-Flow Analysis to Stop Deforestation , 1994, CAAP.

[2]  Jens Palsberg,et al.  Closure analysis in constraint form , 1995, TOPL.

[3]  Olin Shivers,et al.  Data-flow analysis and type recovery in Scheme , 1990 .

[4]  Philip Wadler,et al.  When Will Deforestation Stop , 1988 .

[5]  Charles Consel,et al.  A tour of Schism: a partial evaluation system for higher-order applicative languages , 1993, PEPM '93.

[6]  David Sands Proving the Correctness of Recursion-Based Automatic Program Transformations , 1995, TAPSOFT.

[7]  Peter Lee,et al.  Topics in advanced language implementation , 1991 .

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

[9]  Alain Deutsch,et al.  On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications , 1989, POPL '90.

[10]  John C. Reynolds,et al.  Automatic computation of data set definitions , 1968, IFIP Congress.

[11]  Jens Palsberg,et al.  A type system equivalent to flow analysis , 1995, TOPL.

[12]  Philip Wadler,et al.  Deforestation: Transforming Programs to Eliminate Trees , 1988, Theoretical Computer Science.

[13]  Neil D. Jones,et al.  Flow analysis and optimization of LISP-like structures , 1979, POPL.

[14]  Wei-Ngan Chin,et al.  Safe fusion of functional expressions II: Further improvements , 1994, Journal of Functional Programming.

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

[16]  Nevin Heintze,et al.  Set-based analysis of ML programs , 1994, LFP '94.

[17]  Flemming Nielson,et al.  Static and Dynamic Processor Allocation for Higher-Order Concurrent Languages , 1994 .

[18]  Jens Palsberg,et al.  Safety Analysis versus Type Inference , 1992, Inf. Comput..

[19]  Helmut Seidl Least Solutions of Equations over N , 1994, ICALP.

[20]  David Sands,et al.  Proving the Correctness of Recursion-Based Automatic Program Transformations , 1995, Theor. Comput. Sci..

[21]  Patrick Cousot,et al.  Compositional and Inductive Semantic Definitions in Fixpoint, Equational, Constraint, Closure-condition, Rule-based and Game-Theoretic Form , 1995, CAV.