A Computational Formalization for Partial Evaluation (Extended Version)

We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluation-order independent view of binding-time analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "control-based binding-time improvements" for let expressions. Specifically, we prove that the binding-time improvements given by "continuation-based specialization" can be expressed in the metalanguage via monadic laws.

[1]  Frank Pfenning,et al.  A modal analysis of staged computation , 1996, POPL '96.

[2]  John Hatcliff,et al.  The structure of continuation-passing styles , 1995 .

[3]  Jens Palsberg,et al.  The essence of eta-expansion in partial evaluation , 1994, LISP Symb. Comput..

[4]  Guy L. Steele,et al.  Building interpreters by composing monads , 1994, POPL '94.

[5]  Dale Miller,et al.  Deriving Mixed Evaluation from Standard Evaluation for a Simple Functional Language , 1989, MPC.

[6]  Carl A. Gunter Semantics of programming languages: structures and techniques , 1993, Choice Reviews Online.

[7]  Carolyn L. Talcott A Theory for Program and Data Type Specification , 1992, Theor. Comput. Sci..

[8]  Olivier Danvy,et al.  Tutorial notes on partial evaluation , 1993, POPL '93.

[9]  Charles Consel,et al.  A tour of Schism: a partial evaluation system for higher-order applicative languages , 1993, PEPM '93.

[10]  Amr Sabry,et al.  Is continuation-passing useful for data flow analysis? , 1994, PLDI '94.

[11]  Morten Heine Sørensen,et al.  Call-By-Name CPS-Translation as a Binding-Time Improvement , 1995, SAS.

[12]  Flemming Nielson,et al.  Semantics with applications - a formal introduction , 1992, Wiley professional computing.

[13]  W. V. Quine,et al.  Natural deduction , 2021, An Introduction to Proof Theory.

[14]  David Sands,et al.  Proving the Correctness of Recursion-Based Automatic Program Transformations , 1995, Theor. Comput. Sci..

[15]  Olivier Danvy,et al.  CPS-transformation after strictness analysis , 1992, LOPL.

[16]  Carsten K. Gomard A self-applicable partial evaluator for the lambda calculus: correctness and pragmatics , 1992, TOPL.

[17]  Olivier Danvy,et al.  Representing Control: a Study of the CPS Transformation , 1992, Mathematical Structures in Computer Science.

[18]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[19]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

[20]  Anders Bondorf,et al.  Improving binding times without explicit CPS-conversion , 1992, LFP '92.

[21]  Olivier Danvy,et al.  A generic account of continuation-passing styles , 1994, POPL '94.

[22]  Jens Palsberg,et al.  Eta-expansion does The Trick , 1995, TOPL.

[23]  M. Felleisen,et al.  Reasoning about programs in continuation-passing style , 1993 .

[24]  Neil D. Jones,et al.  Mix: A self-applicable partial evaluator for experiments in compiler generation , 1989, LISP Symb. Comput..

[25]  Roy L. Crole,et al.  Factoring an Adequacy Proof (Preliminary Report) , 1993, Functional Programming.

[26]  Nick Benton,et al.  Computational types from a logical perspective , 1998, Journal of Functional Programming.

[27]  Olivier Danvy,et al.  Continuation-based partial evaluation , 1994, LFP '94.

[28]  Robert Glück,et al.  Towards Unifying Partial Evaluation, Deforestation, Supercompilation, and GPC , 1994, ESOP.

[29]  Olivier Danvy,et al.  Type-directed partial evaluation , 1995, POPL '96.

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

[31]  John Launchbury,et al.  A Strongly-Typed Self-Applicable Partial Evaluator , 1991, FPCA.

[32]  Roy L. Crole,et al.  New Foundations for Fixpoint Computations: FIX-Hyperdoctrines and the FIX-Logic , 1992, Inf. Comput..

[33]  Robert Glück,et al.  Efficient Multi-level Generating Extensions for Program Specialization , 1995, PLILP.

[34]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[35]  Peter Nicholas Benton,et al.  Strictness analysis of lazy functional programs , 1992 .

[36]  Olivier Danvy,et al.  For a Better Support of Static Data Flow , 1991, FPCA.

[37]  Philip Wadler,et al.  Comprehending monads , 1990, LISP and Functional Programming.

[38]  John Hatcliff,et al.  Mechanically Verifying the Correctness of an Offline Partial Evaluator , 1995, PLILP.

[39]  Amr Sabry,et al.  The essence of compiling with continuations , 1993, PLDI '93.

[40]  Rowan Davies,et al.  A temporal-logic approach to binding-time analysis , 1995, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[41]  Peter Thiemann Cogen in six lines , 1996, ICFP '96.

[42]  Robert Glück,et al.  Occam's Razor in Metacompuation: the Notion of a Perfect Process Tree , 1993, WSA.

[43]  Andrew Donald Gordon,et al.  Functional programming and input/output , 1995 .

[44]  Andrzej Filinski,et al.  Representing monads , 1994, POPL '94.

[45]  Christine Paulin-Mohring,et al.  Synthesis of ML Programs in the System Coq , 1993, J. Symb. Comput..

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

[47]  Anders Bondorf,et al.  Automatic Autoprojection of Recursive Equations with Global Variables and Abstract Data Types , 1991, Sci. Comput. Program..

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

[49]  Anders Bondorf,et al.  Improving CPS-Based Partial Evaluation: Writing Cogen by Hand , 1994, PEPM.

[50]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[51]  Jens Palsberg,et al.  Correctness of binding-time analysis , 1993, Journal of Functional Programming.

[52]  Carsten Kehler Holst,et al.  Partial evaluation is fuller laziness , 1991, PEPM '91.