A gentle introduction to semantic subtyping

  • Authors:
  • Giuseppe Castagna;Alain Frisch

  • Affiliations:
  • CNRS, École Normale Supérieure, Paris, France;INRIA, Rocquencourt, France

  • Venue:
  • PPDP '05 Proceedings of the 7th ACM SIGPLAN international conference on Principles and practice of declarative programming
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Subtyping relations are usually defined either syntactically by a formal system or semantically by an interpretation of types into an untyped denotational model. In this work we show step by step how to define a subtyping relation semantically in the presence of functional types and dynamic dispatch on types, without the complexity of denotational models, and how to derive a complete subtyping algorithm. It also provides a recipe to add set-theoretic union, intersection, and negation types to your favourite language.The presentation is voluntarily kept informal and discursive and the technical details are reduced to a minimum since we rather insist on the motivations, the intuition, and the guidelines to apply the approach.