Hostname: page-component-848d4c4894-r5zm4 Total loading time: 0 Render date: 2024-07-05T08:37:26.555Z Has data issue: false hasContentIssue false

Correctness of binding-time analysis

Published online by Cambridge University Press:  07 November 2008

Jens Palsberg
Affiliation:
Computer Science Department, Aarhus UniversityNy Munkegade, DK-8000 Aarhus C, Denmark (e-mail: palsberg@daimi.aau.dk)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

A binding-time analysis is correct if it always produces consistent binding-time information. Consistency prevents partial evaluators from ‘going wrong’. A sufficient and decidable condition for consistency, called well-annotatedness, was first presented by Gomard and Jones. In this paper we prove that a weaker condition implies consistency. Our condition is decidable, subsumes the one of Gomard and Jones, and was first studied by Schwartzbach and the present author. Our result implies the correctness of the binding-time analysis of Mogensen, and it indicates the correctness of the core of the binding-time analyses of Bondorf and Consel. We also prove that all partial evaluators will on termination have eliminated all ‘eliminable’-marked parts of an input which satisfies our condition. This generalizes a result of Gomard. Our development is for the pure λ-calculus with explicit binding-time annotations.

Type
Articles
Copyright
Copyright © Cambridge University Press 1993

References

Barendregt, Henk P. (1981) The lambda calculus: Its syntax and semantics. North-Holland.Google Scholar
Bondorf, Anders. (1991) Automatic autoprojection of higher order recursive equations. Science of computer programming, 17(1–3), 334.CrossRefGoogle Scholar
Bondorf, Anders, & Jørgensen, Jesper. (1993) Efficient analyses for realistic off-line partial evaluation. Journal of functional programming, special issue on partial evaluation.CrossRefGoogle Scholar
Consel, Charles. (1990) Binding-time analysis for higher order untyped functional languages. Pages 264272of: Proc. ACM conference on lisp and functional programming.CrossRefGoogle Scholar
Gomard, Carsten K. (1990) Partial type inference for untyped functional programs. Pages 282287of: Proc. ACM conference on lisp and functional programming.CrossRefGoogle Scholar
Gomard, Carsten K. (1991) (November). Program analysis matters. Ph.D. thesis, DIKU, University of Copenhagen. DIKU Report 91–17.Google Scholar
Gomard, Carsten K., & Jones, Neil D. (1991) A partial evaluator for the untyped lambda-calculus. Journal of functional programming, 1(1), 2169.CrossRefGoogle Scholar
Jones, Neil D. (1981) Flow analysis of lambda expressions. Pages 114128of: Proc. eighth colloquium on automata, languages, and programming. Springer-Verlag (LNCS 115).CrossRefGoogle Scholar
Mogensen, Torben Æ. (1992) Self-applicable partial evaluation for pure lambda calculus. Pages 116–121 of: Proc. ACM SIGPLAN workshop on partial evaluation and semantics-based program manipulation.Google Scholar
Nielson, Hanne R., & Nielson, Flemming. (1988) Automatic binding-time analysis for a typed λ-calculus. Science of computer programming, 10, 139176.CrossRefGoogle Scholar
Palsberg, Jens, & Schwartzbach, Michael I. (1992) Binding-time analysis: Abstract interpretation versus type inference. Submitted for publication.CrossRefGoogle Scholar
Schmidt, David A. (1987) Static properties of partial reduction. Pages 295305of: Proc. partial evaluation and mixed computation, Gl. Avernas, Denmark.Google Scholar
Sestoft, Peter. (1989) Replacing function parameters by global variables. Pages 3953of: Proc. conference on functional programming languages and computer architecture.CrossRefGoogle Scholar
Shivers, Olin. (1991) (May). Control-flow analysis of higher-order languages. Ph.D. thesis, CMU. CMU-CS-91-145.Google Scholar
Wand, Mitchell. (1993) Specifying the correctness of binding-time analysis. Journal of functional programming, special issue on partial evaluation.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.