ICFP 2022
Sun 11 - Fri 16 September 2022 Ljubljana, Slovenia
Wed 14 Sep 2022 11:10 - 11:30 at Linhart - Compilation Chair(s): Matija Pretnar

To date, the most effective approach to compiling strict, higher-order functional languages (such as OCaml, Scheme, and SML) has been to use whole-program techniques to convert the program to a first-order monomorphic representation that can be optimized using traditional compilation techniques. This approach, popularized by MLton, has limitations, however. We are interested in exploring a different approach to compiling such languages, one that preserves the higher-order and polymorphic character of the program throughout optimization. To enable such an approach, we must have effective analyses that both provide precise information about higher-order programs and that scale to larger units of compilation. This paper describes one such analysis for determining the extent of variable bindings. We classify the extent of variables as either register (only one binding instance can be live at any time), stack (the lifetimes of binding instances obey a LIFO order), or heap (binding lifetimes are arbitrary). These extents naturally connect variables to the machine resources required to represent them. We believe that precise information about binding extents will enable efficient management of environments, which is a key problem in the efficient compilation of higher-order programs.

At the core of the paper is the 3CPS intermediate representation, which is a factored CPS-based intermediate representation (IR) that statically marks variables to indicate their binding extent. We formally specify the management of this binding structure by means of a small-step operational semantics and define a static analysis that determines the extents of the variables in a program. We evaluate our analysis using a standard suite of SML benchmark programs. Our implementation gets surprisingly high yield and exhibits scalable performance. While this paper uses a CPS-based IR, the algorithm and results are easily transferable to other $\lambda$-calculus IRs, such as ANF.

Wed 14 Sep

Displayed time zone: Belgrade, Bratislava, Budapest, Ljubljana, Prague change

10:30 - 12:10
CompilationICFP Papers and Events at Linhart
Chair(s): Matija Pretnar University of Ljubljana, Slovenia
10:30
20m
Talk
Beyond Relooper: Recursive Translation of Unstructured Control Flow to Structured Control FlowFunctional Pearl
ICFP Papers and Events
Norman Ramsey Tufts University
DOI
10:50
20m
Talk
Automatically Deriving Control-Flow Graph Generators From Operational Semantics
ICFP Papers and Events
James Koppel Massachusetts Institute of Technology, USA, Jackson Kearl MIT, Armando Solar-Lezama Massachusetts Institute of Technology
DOI
11:10
20m
Talk
Analyzing Binding Extent in 3CPS
ICFP Papers and Events
Benjamin Quiring University of Maryland, Olin Shivers Northeastern University, USA, John Reppy University of Chicago, USA
DOI
11:30
20m
Talk
'do' Unchained: Embracing Local Imperativity in a Purely Functional LanguageFunctional Pearl
ICFP Papers and Events
Sebastian Ullrich Karlsruhe Institute of Technology, Leonardo de Moura Microsoft Research, n.n.
DOI
11:50
20m
Talk
ANF Preserves Dependent Types up to Extensional EqualityJFP Presentation
ICFP Papers and Events
Paulette Koronkevich University of British Columbia, Ramon Rakow University of British Columbia, Amal Ahmed Northeastern University, USA, William J. Bowman University of British Columbia