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

We propose restrictable variants as a simple and practical alternative to extensible variants. Restrictable variants combine nominal and structural typing: a restrictable variant is an algebraic data type indexed by a type-level set formula that captures its set of active labels. We introduce a new pattern-matching construct that allows programmers to write functions that only match on a subset of variants, i.e., pattern matches may be non-exhaustive. We then present a type system for restrictable variants which ensures that such non-exhaustive matches cannot get stuck at runtime.

An essential feature of restrictable variants is that the type system can capture structure-preserving transformations: specifically the introduction and elimination of variants. This property is important for writing reusable functions, yet many row-based extensible variant systems lack it.

In this paper, we present a calculus with restrictable variants, two partial pattern-matching constructs, and a type system that ensures progress and preservation. The type system extends Hindley-Milner with restrictable variants and supports type inference with an extension of Algorithm W with Boolean unification. We implement restrictable variants as an extension of the Flix programming language and conduct a few case studies to illustrate their practical usefulness.

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