Abstract
Global program analyses of untyped higher-order functional programs have in the past decade been presented by Ayers, Bondorf, Consel, Jones, Sestoft, Shivers, and others. The analyses are usually defined as abstract interpretations and are used for rather different tasks such as type recovery, globalization, and binding-time analysis. The analyses all contain a global closure analysis that computes information about higher-order control-flow. Sestoft proved in 1989 and 1991 that closure analysis is correct with respect to call-by-name and call-by-value semantics, but it remained open if correctness holds for arbitrary betareduction.
This paper answers the question; both closure analysis and others are correct with respect to arbitrary beta-reduction. We also prove a subject-reduction result: closure information is still valid after beta-reduction. The core of our proof technique is to define closure analysis using a constraint system. The constraint system is equivalent to the closure analysis of Bondorf, which in turn is based on Sestoft's.
Preview
Unable to display preview. Download preview PDF.
References
Ole Agesen, Jens Palsberg, and Michael I. Schwartzbach. Type inference of Self: Analysis of objects with dynamic and multiple inheritance. In Proc. ECOOP'93, Seventh European Conference on Object-Oriented Programming, pages 247–267, Kaiserslautern, Germany, July 1993.
Andrew Ayers. Efficient closure analysis with reachability. In Proc. WSA'92, Analyse Statique, pages 126–134, 1992.
Henk P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. North-Holland, 1981.
Anders Bondorf. Automatic autoprojection of higher order recursive equations. Science of Computer Programming, 17(1–3):3–34, December 1991.
Anders Bondorf. Similix 5.0 Manual. DIKU, University of Copenhagen, Denmark, April 1993. Included in Similix 5.0 distribution.
Anders Bondorf and Olivier Danvy. Automatic autoprojection of recursive equations with global variables and abstract data types. Science of Computer Programming, 16:151–195, 1991.
Anders Bondorf and Jesper Jørgensen. Efficient analyses for realistic off-line partial evaluation. Journal of Functional Programming, 3(3):315–346, 1993.
Charles Consel. Binding time analysis for higher order untyped functional languages. In Proc. ACM Conference on Lisp and Functional Programming, pages 264–272, 1990.
Paola Giannini and Simona Ronchi Della Rocca. Characterization of typings in polymorphic type discipline. In LICS'88, Third Annual Symposium on Logic in Computer Science, pages 61–70, 1988.
Neil D. Jones. Flow analysis of lambda expressions. In Proc. Eighth Colloquium on Automata, Languages, and Programming, pages 114–128. Springer-Verlag (LNCS 115), 1981.
Jens Palsberg. Correctness of binding-time analysis. Journal of Functional Programming, 3(3):347–363, 1993.
Jens Palsberg and Michael I. Schwartzbach. Safety analysis versus type inference. Information and Computation. To appear.
Jens Palsberg and Michael I. Schwartzbach. Safety analysis versus type inference for partial types. Information Processing Letters, 43:175–180, 1992.
Jens Palsberg and Michael I. Schwartzbach. Binding-time analysis: Abstract interpretation versus type inference. In Proc. ICCL'94, Fifth IEEE International Conference on Computer Languages, Toulouse, France, May 1994. To appear.
Peter Sestoft. Replacing function parameters by global variables. Master's thesis, DIKU, University of Copenhagen, September 1989.
Peter Sestoft. Analysis and Efficient Implementation of Functional Programs. PhD thesis, DIKU, University of Copenhagen, October 1991.
Olin Shivers. Control-Flow Analysis of Higher-Order Languages. PhD thesis, CMU, May 1991. CMU-CS-91-145.
Olin Shivers. Data-flow analysis and type recovery in Scheme. In Peter Lee, editor, Topics in Advanced Language Implementation, pages 47–87. MIT Press, 1991.
David Ungar and Randall B. Smith. SELF: The power of simplicity. In Proc. OOPSLA'87, Object-Oriented Programming Systems, Languages and Applications, pages 227–241, 1987. Also published in Lisp and Symbolic Computation 4(3), Kluwer Acadamic Publishers, June 1991.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Palsberg, J. (1994). Global program analysis in constraint form. In: Tison, S. (eds) Trees in Algebra and Programming — CAAP'94. CAAP 1994. Lecture Notes in Computer Science, vol 787. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0017488
Download citation
DOI: https://doi.org/10.1007/BFb0017488
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57879-6
Online ISBN: 978-3-540-48373-1
eBook Packages: Springer Book Archive