Core Concepts
This work defines and studies a first-order polymorphic type system with row polymorphism and set-theoretic types, including union, intersection, and negation types. It provides a semantic interpretation of types, a decidable subtyping relation, and algorithms for typing and subtyping.
Abstract
The content presents the following key points:
Motivation: There is a growing effort to develop type systems for dynamic languages, which often include union and intersection types. Some dynamic languages, such as Luau and Elixir, have adopted set-theoretic types as defined in the semantic subtyping framework. The authors aim to study adding row polymorphism to such type systems.
Need for row polymorphism: The authors argue that the current approaches to row polymorphism cannot be directly reused in the presence of set-theoretic types, and an original theory must be developed. They provide examples to illustrate the limitations of using only intersection types and type variables to capture the behavior of record operations.
Type system definition: The authors define the syntax of types, including record types that can be closed, open, or specify a row variable. They provide a set-theoretic interpretation of types and define the subtyping relation as containment of interpretations.
Subtyping algorithm: The authors define an algorithm to decide the subtyping relation, extending the subtyping algorithm of the CDuce language to handle polymorphic record types.
Language with record operations: The authors define a language with record extension, selection, and deletion operations, provide an operational semantics and a declarative type system, and prove the type system to be sound.
Tallying problem: The authors tackle the tallying problem, which is the problem of deciding whether there exists a type substitution that makes one type a subtype of another. They define a tallying algorithm for row polymorphic types and prove its soundness, but not its completeness.
The authors conclude by discussing related work and future research directions.