• Cite Icon9
  • https://doi.org/10.1145/3310339Copy DOI Icon

Consistent Subtyping for All

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Consistent subtyping is employed in some gradual type systems to validate type conversions. The original definition by Siek and Taha serves as a guideline for designing gradual type systems with subtyping. Polymorphic types à la System F also induce a subtyping relation that relates polymorphic types to their instantiations. However, Siek and Taha’s definition is not adequate for polymorphic subtyping. The first goal of this article is to propose a generalization of consistent subtyping that is adequate for polymorphic subtyping and subsumes the original definition by Siek and Taha. The new definition of consistent subtyping provides novel insights with respect to previous polymorphic gradual type systems, which did not employ consistent subtyping. The second goal of this article is to present a gradually typed calculus for implicit (higher-rank) polymorphism that uses our new notion of consistent subtyping. We develop both declarative and (bidirectional) algorithmic versions for the type system. The algorithmic version employs techniques developed by Dunfield and Krishnaswami for higher-rank polymorphism to deal with instantiation. We prove that the new calculus satisfies all static aspects of the refined criteria for gradual typing. We also study an extension of the type system with static and gradual type parameters, in an attempt to support a variant of the dynamic criterion for gradual typing. Assuming a coherence conjecture for the extended calculus, we show that the dynamic gradual guarantee of our source language can be reduced to that of λ B, which, at the time of writing, is still an open question. Most of the metatheory of this article, except some manual proofs for the algorithmic type system and extensions, has been mechanically formalized using the Coq proof assistant.

Similar Papers
  • PDF
  • Book Chapter
  • Citations19

Consistent Subtyping for All

  • Jan 01, 2018
  • Ningning Xie +2
  • Research Article
  • Citations49

The ins and outs of gradual type inference

  • Jan 18, 2012
  • ACM SIGPLAN Notices
  • Aseem Rastogi +2
  • Research Article
  • Citations83

Space-efficient gradual typing

  • Jun 01, 2010
  • Higher-Order and Symbolic Computation
  • David Herman +2
  • Research Article
  • Citations106

Design and evaluation of gradual typing for python

  • Oct 14, 2014
  • ACM SIGPLAN Notices
  • Michael M Vitousek +3
  • Conference Article
  • Citations5

Extending Dylan's type system for better type inference and error detection

  • Oct 19, 2010
  • Hannes Mehnert
  • PDF
  • Research Article
  • Citations5

Migrating gradual types

  • Jan 01, 2022
  • Journal of Functional Programming
  • John Peter Campora +3
  • Conference Article
  • Citations66

Gradual typing for first-class classes

  • Oct 19, 2012
  • Asumu Takikawa +4
  • Conference Article
  • Citations8

Structural semantics for polymorphic data types (preliminary report)

  • Jan 01, 1983
  • Daniel Leivant
  • Conference Article
  • Citations4

Application optimization when using gradual typing

  • Jul 26, 2011
  • Esteban Allende +1
  • Conference Article
  • Citations28

Interpretations of the gradually-typed lambda calculus

  • Sep 09, 2012
  • Jeremy G Siek +1
  • PDF
  • Research Article
  • Citations44

Gradual typing: a new perspective

  • Jan 02, 2019
  • Proceedings of the ACM on Programming Languages
  • Giuseppe Castagna +3
  • Research Article
  • Citations5

A polymorphic modal type system for lisp-like multi-staged languages

  • Jan 11, 2006
  • ACM SIGPLAN Notices
  • Ik-Soon Kim +2
  • Conference Article
  • Citations63

A polymorphic modal type system for lisp-like multi-staged languages

  • Jan 11, 2006
  • Ik-Soon Kim +2
  • PDF
  • Research Article
  • Citations23

Collapsible contracts: fixing a pathology of gradual typing

  • Oct 24, 2018
  • Proceedings of the ACM on Programming Languages
  • Daniel Feltey +4
  • PDF
  • Research Article
  • Citations2

Space-Efficient Polymorphic Gradual Typing, Mostly Parametric

  • Jun 20, 2024
  • Proceedings of the ACM on Programming Languages
  • Atsushi Igarashi +3
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.