Abstract
Collapsed jungle evaluation is an evaluation strategy for functional programs that can give super-linear speedups compared to conventional evaluation strategies such as call-by-need. However, the former strategy may incur administrative evaluation overhead. We demonstrate how this overhead can be eliminated by transforming the program using a variation of positive supercompilation in which the transformation strategy is based on collapsed jungle evaluation. In penetrating the constantfactor barrier, we seem to be close to establishing a transformation technique that guarantees the efficiency of the transformed program. As a spin-off, we clarify the relationship between call-by-name, call-by-need and collapsed-jungle evaluation, showing that all three can be expressed as instances of a common semantics in which the variations — differing only in efficiency — are obtained by varying the degree of sharing in a dag representation.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
R.M. Burstall and J. Darlington. A transformation system for developing recursive programs. Journal of the Association for Computing Machines, 24(1):44–67, 1977.
Wei-Ngan Chin. Towards an automated tupling strategy. In Proceeding of the ACM SIGPLAN Syposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 119–132, Copenhagen, Denmark, 14–16 June 1993. ACM Press.
D. De Schreye, R. Glück, J. Jørgensen, M. Leuschel, B. Martens, and M. H. Sørensen. Conjunctive partial deduction: Foundations, control, algorithms, and experiments. Journal of Logic Programming, 41(2-3):231–277, 1999.
J. Gallagher. Tutorial in specialisation of logic programs. In Proceeding of the ACM SIGPLAN Syposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 88–98. ACM Press, 1993.
R. Glück and A.V. Klimov. Occam’s razor in metacomputation: the notion of a perfect process tree. In P. Cousot, M. Falaschi, G. Filè, and G. Rauzy, editors, Workshop on Static Analysis, volume 724 of Lecture Notes in Computer Science, pages 112–123. Springer-Verlag, 1993.
Annegret Habel, Hans-Jörg Kreowski, and Detlef Plump. Jungle evaluation. Fundamenta Informaticae, XV:37–60, 1991.
Berthold Hoffmann and Detlef Plump. Implementing term rewriting by jungle evaluation. RAIRO Theoretical Informatics and Applications, 25(5):445–472, 1991.
N.D. Jones, P. Sestoft, and H. Søndergaard. Mix: a self-applicable partial evaluator for experiments in compiler generation. Lisp and Symbolic Computation, 2(1):9–50, 1989.
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.
[10] Michael Leuschel. On the power of homeomorphic embedding for online termination. In Georgio Levi, editor, Static Analysis. Proceedings, volume 1503 of Lecture Notes in Computer Science, pages 230–245, Pisa, Italy, September 1998. Springer-Verlag.
A. Pettorossi, E. Pietropoli, and M. Proietti. The use of the tupling strategy in the development of parallel programs. In R. Paige, J. Reif, and R. Wachter, editors, Parallel Algorithm Derivation and Program Transformation, pages 111–151. Kluwer Academic Publishers, 1993.
Alberto Pettorossi. A powerful strategy for deriving efficient programs by transformation. In Conference Record of the 1984 ACM Symposium on Lisp and Functional Programming, pages 273–281. ACM, ACM, August 1984.
Gordon D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN-19, Computer Science Department, Aarhus University, Aarhus, Denmark, September 1981.
M.H. Sørensen and R. Glück. An algorithm of generalization in positive supercompilation. In J.W. Lloyd, editor, Logic Programming: Proceedings of the 1995 International Symposium, pages 465–479. MIT Press, 1995.
M.H. Sørensen, R. Glück, and N.D. Jones. A positive supercompiler. Journal of Functional Programming, 6(6):811–838, 1996.
Morten Heine Sørensen and Robert Glück. Introduction to supercompilation. In John Hatcliff, Torben Mogensen, and Peter Thiemann, editors, Partial Evaluation: Practice and Theory, volume 1706 of Lecture Notes in Computer Science, pages 246–270. Springer-Verlag, 1999.
Morten Heine B. Sørensen. Convergence of program transformers in the metric space of trees. Science of Computer Programming, 37(1-3):163–205, May 2000.
V. F. Turchin. The algorithm of generalization in the supercompiler. In D. Bjørner, A. P. Ershov, and N. D. Jones, editors, Partial Evaluation and Mixed Computation, pages 531–549, Amsterdam: North-Holland, 1988. Elsevier Science Publishers B.V.
V.F. Turchin. The concept of a supercompiler. ACM Transactions on Programming Languages and Systems, 8(3):292–325, 1986.
V.F. Turchin and A.P. Nemytykh. A self-applicable supercompiler. Technical Report CSc. TR 95-010, City College of the City University of New York, 1995.
P.L. Wadler. Deforestation: Transforming programs to eliminate intermediate trees. Theoretical Computer Science, 73:231–248, 1990.
Christopher Peter Wadsworth. Semantics and pragmatics of the lambda calculus. Ph.D. thesis, Programming Research Group, Oxford University, September 1971.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Secher, J.P. (2001). Driving in the Jungle. In: Danvy, O., Filinski, A. (eds) Programs as Data Objects. PADO 2001. Lecture Notes in Computer Science, vol 2053. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44978-7_12
Download citation
DOI: https://doi.org/10.1007/3-540-44978-7_12
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42068-2
Online ISBN: 978-3-540-44978-2
eBook Packages: Springer Book Archive