Abstract
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.
Chapter PDF
Similar content being viewed by others
References
N. Andersen: Approximating Term Rewrite Systems by Regular Tree Grammars. Report Nr. 86/16, Data Logisk Institut, Københavns Universitet, 1986
Wei-Ngan Chin: Automatic Methods for Program Transformation. Ph.D. Thesis, Imperial College, University of London, July 1990
Wei-Ngan Chin: Safe Fusion of Functional Expressions II: Further Improvements. J. of Functional Programming 4. 515–555, 1994
C. Consel: A Tour of Schism: A Partial Evaluation System for Higher-Order Applicative Languages. Proc. PEPM'93, 2nd ACM SIGPLAN Symp. on Partial Evaluation and Semantics-Based Program Manipulation, 145–154, 1993
P. Cousot, R. Cousot: Compositional and Inductive Semantic Definitions in Fixpoint, Equational, Constraint, Closure-condition, Rule-based and Game-theoretic Form. Proc. CAV'95, LNCS 939, 293–308, 1995
A. Deutsch: On Determining Lifetime and Aliasing of Dynamically Allocated Data in Higher-Order Functional Specifications. Proc. 17th ACM Symp. on Principles of Programming Languages, 157–168,1990
A. Ferguson, P. Wadler: When will deforestation stop. In: 1988 Glasgow Workshop on Functional Programming, Research Rep. 89/R4, 1988
N. Heintze: Set-based Analysis of ML Programs. Proc. of the 1994 ACM Conference on Lisp and Functional Programming, 306–317, Lisp Pointers, Orlando, Florida, June 1994
N.D. Jones, S.S. Muchnick: Flow Analysis of LISP-like Structures. Proc. 6th ACM Symp. on Principles of Programming Languages, 244–256, 1979
N.D. Jones: Flow Analysis of Lazy Higher-Order Functional Programs. In: S. Abramsky, C. Hankin (eds): Abstract Interpretation. Ellis Horwood, 103–122, 1987
H. Riis Nielson, F. Nielson: Static and Dynamic Processor Allocation for Higher Order Concurrent Languages. Tech. Report DAIMI PB483, Dept. of Computer Science, Aarhus, 1994; short version in: Proc. TAPSOFT'95
J. Palsberg: Closure Analysis in Constraint Form. ACM Transactions on Programming Languages 17, 47–82, 1995 (preliminary version in CAAP'94)
J. Palsberg, P. O'Keefe: A Type System Equivalent to Flow Analysis. To appear in: ACM Transactions on Programming Languages and Systems, 1995
J. Palsberg, M.I. Schwarzbach: Safety Analysis versus Type Inference. Inf. and Computation 118, 128–141, 1995
J. C. Reynolds: Automatic Computation of Data Set Definitions. Information Processing, Vol. 68, 456–461, 1969
D. Sands: Proving Correctness of Recursion-Based Automatic Program Transformations. Proc. TAPSOFT'95, LNCS, 681–695, 1995
H. Seidl: Least Solutions of Equations over N. Proc. ICALP'94, LNCS 820, 400–411, 1994
O. Shivers. Data-Flow Analysis and Type Recovery in Scheme. In: Peter Lee (ed.): Topics in Advanced Language Implementation. MIT Press, 47–87, 1991
Turchin's Supercompiler Revisited. Master's Thesis. DIKU, University of Copenhagen, March 1994
M.H. Sørensen: A Grammar-based Data-flow Analysis to Stop Deforestation. Proc. CAAP'94, LNCS 787, 335–351, 1994
M.H. Sørensen, R. Glück, N.D. Jones: Towards Unifying Partial Evaluation, Deforestation, Supercompilation and GPC. Proc. ESOP'94, LNCS 788, 485–500, 1994
P. Wadler: Deforestation: Transforming Programs to Eliminate Trees. TCS 73, 231–248, 1990; (preliminary version in Proc. ESOP'88, LNCS 300)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Seidl, H. (1996). Integer constraints to stop deforestation. In: Nielson, H.R. (eds) Programming Languages and Systems — ESOP '96. ESOP 1996. Lecture Notes in Computer Science, vol 1058. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61055-3_46
Download citation
DOI: https://doi.org/10.1007/3-540-61055-3_46
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61055-7
Online ISBN: 978-3-540-49942-8
eBook Packages: Springer Book Archive