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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.