Arrow Research search
Back to I&C

I&C 2002

Type Destructors

Journal Article journal-article Computer Science · Theoretical Computer Science

Abstract

We study a variant of System F ≤ that integrates and generalizes several existing proposals for calculi with “structural typing rules. ” To the usual type constructors (→, ×, All, Some, Rec) we add a number of type destructors, each internalizing a useful fact about the subtyping relation. For example, in F ≤ with products every closed subtype of a product S×T must itself be a product S′×T′ with S′<: S and T′<: T. We internalise this observation by introducing type destructors. 1 and. 2 and postulating an equivalence T=ηT. 1×T. 2 whenever T<: U×V (including, for example, when T is a variable). In other words, every subtype of a product type literally is a product type, modulo η-conversion. Adding type destructors provides a clean solution to the problem of polymorphic update without introducing new term formers, new forms of polymorphism, or quantification over type operators. We illustrate this by giving elementary presentations of two well-known encodings of objects, one based on recursive record types and the other based on existential packages. The formulation of type destructors poses some tricky meta-theoretic problems. We discuss two different variants: an “ideal” system where both constructors and destructors appear in general forms, and a more modest system, F ≤ TD, which imposes some restrictions in order to achieve a tractable metatheory. The properties of the latter system are developed in detail.

Authors

Keywords

No keywords are indexed for this paper.

Context

Venue
Information and Computation
Archive span
1987-2026
Indexed papers
3021
Paper id
397680571188459798
v2026.09.13