dcreager.net

Zhou2022

Zhou, Y., Oliveira, B.C.d.S., Fan, A. (2022). A Calculus with Recursive Types, Record Concatenation and Subtyping. In: Sergey, I. (eds) Programming Languages and Systems. APLAS 2022. Lecture Notes in Computer Science, vol 13658. Springer, Cham.

Remarkable PDF

Original PDF

DOI

Abstract

Calculi with subtyping, a form of record concatenation and recursive types are useful to model objects with multiple inheritance. Surprisingly, almost no existing calculi supports the three features together, partly because the combination of subtyping and record concatenation is already known to be troublesome. Recently, a line of work on disjoint intersection types with a merge operator has emerged as a new approach to deal with the interaction between subtyping and record concatenation. However, the addition of recursive types has not been studied.

In this paper we present a calculus that combines iso-recursive types with disjoint intersection types and a merge operator. The merge operator generalizes symmetric record concatenation, and the calculus supports subtyping as well as recursive types. We build on recent developments on the theory of iso-recursive subtyping using the so-called nominal unfolding rules to add iso-recursive types to a calculus with disjoint intersection types and a merge operator. The main challenge lies in the disjointness definition with iso-recursive subtyping. We show the type soundness of the calculus, decidability of subtyping, as well as the soundness and completeness of our disjointness definition. All the proofs are mechanized in the Coq theorem prover.