Correctness of binding-time analysis

A binding-time analysis is correct if it always produces consistent binding-time information. Consistency prevents partial evaluators from \going wrong". A sucien t and decidable condition for consistency, called well-annotatedness, was rst 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 rst 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 satises our condition. This generalizes a result of Gomard. Our development is for the pure -calculus with explicit binding-time annotations.

[1]  Peter Sestoft,et al.  Replacing function parameters by global variables , 1989, FPCA.

[2]  Neil D. Jones,et al.  Flow Analysis of Lambda Expressions (Preliminary Version) , 1981, ICALP.

[3]  Jens Palsberg,et al.  Binding Time Analysis: Abstract Interpretation vs. Type Inference , 1992 .

[4]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[5]  Joyce L. Vedral,et al.  Functional Programming Languages and Computer Architecture , 1989, Lecture Notes in Computer Science.

[6]  Carsten K. Gomard,et al.  A Partial Evaluator for the Untyped LambdaCal ulus 1 , 1991 .

[7]  Flemming Nielson,et al.  Automatic binding time analysis for a typed λ-calculus , 1988, POPL '88.

[8]  Neil D. Jones,et al.  A partial evaluator for the untyped lambda-calculus , 1991, Journal of Functional Programming.

[9]  Jens Palsberg,et al.  Binding-time analysis: abstract interpretation versus type inference , 1994, Proceedings of 1994 IEEE International Conference on Computer Languages (ICCL'94).

[10]  Anders Bondorf,et al.  Efficient Analysis for Realistic Off-Line Partial Evaluation , 1993, J. Funct. Program..

[11]  Flemming Nielson,et al.  Automatic Binding Time Analysis for a Typed lambda-Calculus , 1988, Sci. Comput. Program..

[12]  J. Jørgensen,et al.  Efficient Analyses for Realistic Off-Line Partial Evaluation : Extended Version , 1993 .

[13]  Mitchell Wand,et al.  Specifying the correctness of binding-time analysis , 1993, POPL '93.

[14]  Carsten K. Gomard Partial type inference for untyped functional programs , 1990, LISP and Functional Programming.

[15]  Charles Consel,et al.  Binding time analysis for high order untyped functional languages , 1990, LISP and Functional Programming.

[16]  Torben Æ. Mogensen Self-applicable Partial Evaluation for Pure Lambda Calculus , 1992, PEPM.

[17]  N. Jones Flow Analysis of Lambda Expressions , 1981 .

[18]  Olin Shivers,et al.  Control-flow analysis of higher-order languages of taming lambda , 1991 .

[19]  Anders Bondorf,et al.  Automatic Autoprojection of Higher Order Recursive Equations , 1990, Sci. Comput. Program..