Thu 20 Jul 2023 11:15 - 11:30 at Habib Classroom (Gates G01) - ECOOP 4: Types Chair(s): Giorgio Audrito

We present purity reflection, a programming language feature that enables higher-order functions to inspect the purity of their function arguments and to vary their behavior based on this information. The upshot is that operations on data structures can selectively use lazy and/or parallel evaluation while ensuring that side effects are never lost or re-ordered. The technique builds on a recent Hindley-Milner style type and effect system based on Boolean unification which supports both effect polymorphism and complete type inference. We illustrate that avoiding the so-called ‘poisoning problem’ is crucial to support purity reflection.

We propose several new data structures that use purity reflection to switch between eager and lazy, sequential and parallel evaluation. We propose a DelayList which is maximally lazy but switches to eager evaluation for impure operations. We also propose a DelayMap which is maximally lazy in its keys, but also exploits eager and parallel evaluation.

We implement purity reflection as an extension of the Flix programming language. We present a new effect-aware form of monomorphization that eliminates purity reflection at compile-time. We evaluate the cost of this new monomorphization on compilation time and on code size, and determine that it is minimal.

Thu 20 Jul

Displayed time zone: Pacific Time (US & Canada) change

10:30 - 12:00
ECOOP 4: TypesResearch Papers at Habib Classroom (Gates G01)
Chair(s): Giorgio Audrito Università di Torino
10:30
15m
Talk
Python Type Hints are Turing Complete
Research Papers
Ori Roth Technion
DOI
10:45
15m
Talk
Restrictable Variants: A Simple and Practical Alternative to Extensible Variants
Research Papers
Magnus Madsen Aarhus University, Jonathan Lindegaard Starup Aarhus University, Matthew Lutze Aarhus University
DOI
11:00
15m
Talk
Modular Compilation for Higher-order Functional Choreographies
Research Papers
Luís Cruz-Filipe University of Southern Denmark, Eva Graversen University of Southern Denmark, Lovro Lugović University of Southern Denmark, Fabrizio Montesi University of Southern Denmark, Marco Peressotti University of Southern Denmark
DOI
11:15
15m
Talk
Programming with Purity Reflection: Peaceful Coexistence of Effects, Laziness, and Parallelism
Research Papers
Magnus Madsen Aarhus University, Jaco van de Pol Aarhus University
DOI
11:30
15m
Talk
Dependent Merges and First-Class Environments
Research Papers
Jinhao Tan University of Hong Kong, Bruno C. d. S. Oliveira University of Hong Kong
DOI
11:45
15m
Talk
super-Charging Object-Oriented Programming Through Precise Typing of Open Recursion
Research Papers
Andong Fan The Hong Kong University of Science and Technology, Lionel Parreaux HKUST (The Hong Kong University of Science and Technology)
DOI