Compiling with continuations
No assembly required: compiling standard ML to C
ACM Letters on Programming Languages and Systems (LOPLAS)
Space-efficient closure representations
LFP '94 Proceedings of the 1994 ACM conference on LISP and functional programming
On the type structure of standard ML
ACM Transactions on Programming Languages and Systems (TOPLAS)
Set-based analysis of ML programs
LFP '94 Proceedings of the 1994 ACM conference on LISP and functional programming
A type system equivalent to flow analysis
POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Closure analysis in constraint form
ACM Transactions on Programming Languages and Systems (TOPLAS)
TIL: a type-directed optimizing compiler for ML
PLDI '96 Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation
A practical and flexible flow analysis for higher-order languages
POPL '96 Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
POPL '96 Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Linear-time subtransitive control flow analysis
Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation
Strongly typed flow-directed representation transformations (extended abstract)
ICFP '97 Proceedings of the second ACM SIGPLAN international conference on Functional programming
Type-driven defunctionalization
ICFP '97 Proceedings of the second ACM SIGPLAN international conference on Functional programming
Bridging the gulf: a common intermediate language for ML and Haskell
POPL '98 Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Fast interprocedural class analysis
POPL '98 Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
ACM Transactions on Programming Languages and Systems (TOPLAS)
Static interpretation of modules
Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
The Definition of Standard ML
Type-Directed Flow Analysis for Typed Intermediate Languages
SAS '97 Proceedings of the 4th International Symposium on Static Analysis
Definitional interpreters for higher-order programming languages
ACM '72 Proceedings of the ACM annual conference - Volume 2
From ML to Ada: Strongly-typed language interoperability via source translation
Journal of Functional Programming
Design and Correctness of Program Transformations Based on Control-Flow Analysis
TACS '01 Proceedings of the 4th International Symposium on Theoretical Aspects of Computer Software
Program Representation Size in an Intermediate Language with Intersection and Union Types
TIC '00 Selected papers from the Third International Workshop on Types in Compilation
Control-flow analysis of functional programs
ACM Computing Surveys (CSUR)
Hi-index | 0.00 |
This paper presents a new closure conversion algorithm for simply-typed languages. We have have implemented the algorithm as part of MLton, a whole-program compiler for Standard ML (SML). MLton first applies all functors and eliminates polymorphism by code duplication to produce a simply-typed program. MLton then performs closure conversion to produce a first-order, simply-typed program. In contrast to typical functional language implementations, MLton performs most optimizations on the first-order language, after closure conversion. There are two notable contributions of our work: 1. The translation uses a general flow-analysis framework which includes OCFA. The types in the target language fully capture the results of the analysis. MLton uses the analysis to insert coercions to translate between different representations of a closure to preserve type correctness of the target language program. 2. The translation is practical. Experimental results over a range of benchmarks including large real-world programs such as the compiler itself and the ML-Kit [25] indicate that the compile-time cost of flow analysis and closure conversion is extremely small, and that the dispatches and coercions inserted by the algorithm are dynamically infrequent.