A gentle introduction to semantic subtyping

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.

[1]  Mariangiola Dezani-Ciancaglini,et al.  A filter lambda model and the completeness of type assignment , 1983, Journal of Symbolic Logic.

[2]  R. Nicola,et al.  Semantic subtyping for the π-calculus , 2004 .

[3]  Giuseppe Castagna,et al.  Semantic subtyping , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[4]  Martín Abadi,et al.  Dynamic typing in a statically-typed language , 1989, POPL '89.

[5]  Benjamin C. Pierce,et al.  Regular expression pattern matching for XML , 2003, POPL '01.

[6]  Luca Cardelli,et al.  Subtyping recursive types , 1991, POPL '91.

[7]  Mariangiola Dezani-Ciancaglini,et al.  An extension of the basic functionality theory for the λ-calculus , 1980, Notre Dame J. Formal Log..

[8]  Giuseppe Longo,et al.  Categories, types and structures - an introduction to category theory for the working computer scientist , 1991, Foundations of computing.

[9]  Benjamin C. Pierce,et al.  Regular expression types for XML , 2005, ACM Trans. Program. Lang. Syst..

[10]  Alexander Aiken,et al.  Type inclusion constraints and type inference , 1993, FPCA '93.

[11]  Flemming M. Damm,et al.  Subtyping with Union Types, Intersection Types and Recursive Types , 1994, TACS.

[12]  Daniele Varacca,et al.  Semantic subtyping for the /spl pi/-calculus , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).

[13]  John C. Reynolds,et al.  The Coherence of Languages with Intersection Types , 1991, TACS.

[14]  G. Longo,et al.  Lambda-Calculus Models and Extensionality , 1980, Math. Log. Q..

[15]  Giuseppe Castagna,et al.  A calculus for overloaded functions with subtyping , 1992, LFP '92.

[16]  Benjamin C. Pierce,et al.  Xduce: a typed xml processing language , 1997 .

[17]  Giuseppe Castagna,et al.  Parametric polymorphism for XML , 2005, POPL '05.

[18]  Giuseppe Castagna,et al.  CDuce: an XML-centric general-purpose language , 2003, ICFP '03.

[19]  Alain Frisch,et al.  Théorie, conception et réalisation d'un langage de programmation adapté à XML , 2004 .

[20]  John C. Reynolds,et al.  Design of the programming language FORSYTHE , 1997 .

[21]  Benjamin C. Pierce,et al.  XDuce: A statically typed XML processing language , 2003, TOIT.