Polymorphic specialization for ML
Simon Helsen, Peter J. Thiemann · ACM Transactions on Programming Languages and Systems · 2004
We present a framework for offline partial evaluation for call-by-value functional programming languages with an ML-style typing discipline. This includes a binding-time analysis which is (1) polymorphic with respect to binding times; (2) allows the use of polymorphic recursion with respect to binding times; (3) is applicable to a polymorphically typed term; and (4) is proven correct with respect to a novel small-step specialization semantics.The main innovation is to build the analysis on top of the region calculus of Tofte and Talpin [1994], thus leveraging the tools and techniques developed for it. Our approach factorizes the binding-time analysis into region inference and a subsequent constraint analysis. The key insight underlying our framework is to consider binding times as properties of regions.Specialization is specified as a small-step semantics, building on previous work on syntactic-type soundness results for the region calculus. Using similar syntactic proof techniques, we prove soundness of the binding-time analysis with respect to the specializer. In addition, we prove that specialization preserves the call-by-value semantics of the region calculus by showing that the reductions of the specializer are contextual equivalences in the region calculus.
Cited by 9 works. doi:10.1145/1011508.1011510
Authors
References
- Lecture Notes in Computer Science 1205
- A theory of type polymorphism in programming
- The Definition of Standard ML
- Lambda-calculus models of programming languages.
- Call-by-name, call-by-value and the λ-calculus
- Partial evaluation and automatic program generation
- Notions of computation and monads
- A Structural Approach to Operational Semantics
- The Definition of Standard ML (Revised)
- A Syntactic Approach to Type Soundness