skip to main content
10.1145/1069774.1069793acmconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
Article

A gentle introduction to semantic subtyping

Published: 11 July 2005 Publication History

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.

References

[1]
M. Abadi, L. Cardelli, B. Pierce, and G. Plotkin. Dynamic typing in a statically typed language. Transactions on Programming Languages and Systems, 13(2):237--268, April 1991.
[2]
Alexander Aiken and Edward L. Wimmers. Type inclusion constraints and type inference. In Proceedings of the Seventh ACM Conference on Functional Programming and Computer Architecture, pages 31--41, Copenhagen, Denmark, June 93.
[3]
Roberto M. Amadio and Luca Cardelli. Subtyping recursive types. ACM Transactions on Programming Languages and Systems, 15(4), September 1993.
[4]
A. Asperti and G. Longo. Categories, Types and Structures: An Introduction to Category Theory for the Working Computer Scientist. MIT-Press, 1991.
[5]
H. Barendregt, M. Coppo, and M. Dezani-Ciancaglini. A filter lambda model and the completeness of type assignment. Journal of Symbolic Logic, 48(4):931--940, 1983.
[6]
V. Benzaken, G. Castagna, and A. Frisch. CDuce: an XML-friendly general purpose language. In ICFP '03, 8th ACM International Conference on Functional Programming, pages 51--63, Uppsala, Sweden, 2003. ACM Press.
[7]
G. Castagna, G. Ghelli, and G. Longo. A calculus for overloaded functions with subtyping. Information and Computation, 117(1):115--135, 1995.
[8]
G. Castagna, R. De Nicola, and D. Varacca. Semantic subtyping for the π-calculus. In LICS '05, 20th Annual IEEE Symposium on Logic in Computer Science. IEEE Computer Society Press, 2005.
[9]
M. Coppo and M. Dezani-Ciancaglini. An extension of the basic functionality theory for the λ-calculus. Notre-Dame Journal of Formal Logic, 21(4):685--693, October 1980.
[10]
F. Damm. Subtyping with union types, intersection types and recursive types II. Research Report 816, IRISA, 1994.
[11]
Alain Frisch. Théorie, conception et réalisation d'un langage de programmation fonctionnel adapté à XML. PhD thesis, Université Paris 7, December 2004.
[12]
Alain Frisch, Giuseppe Castagna, and Véronique Benzaken. Semantic Subtyping. In Proceedings, Seventeenth Annual IEEE Symposium on Logic in Computer Science, pages 137--146. IEEE Computer Society Press, 2002.
[13]
Alain Frisch, Giuseppe Castagna, and Véronique Benzaken. Semantic Subtyping. Extended version of {12}, in preparation., 2005.
[14]
R. Hindley and G. Longo. Lambda-calculus models and extensionality. Zeit. Math. Logik Grund. Math., 26(2):289--319, 1980.
[15]
H. Hosoya, A. Frisch, and G. Castagna. Parametric polymorphism for XML. In POPL'05, 32nd ACM Symposium on Principles of Programming Languages. ACM Press, 2005.
[16]
H. Hosoya and B. Pierce. XDuce: A typed XML processing language. ACM Transactions on Internet Technology, 3(2):117--148, 2003.
[17]
Haruo Hosoya. Regular Expression Types for XML. PhD thesis, The University of Tokyo, 2001.
[18]
Haruo Hosoya and Benjamin C. Pierce. Regular expression pattern matching for XML. In The 25th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2001.
[19]
John C. Reynolds. The coherence of languages with intersection types. In Takayasu Ito and Albert R. Meyer, editors, Theoretical Aspects of Computer Software, volume 526 of Lecture Notes in Computer Science, pages 675--700, Berlin, 1991. Springer-Verlag.
[20]
John C. Reynolds. Design of the programming language Forsythe. Technical Report CMU-CS96-146, Carnegie Mellon University, Pittsburgh, Pennsylvania, June 1996.

Cited By

View all
  • (2024)The Ultimate Conditional SyntaxProceedings of the ACM on Programming Languages10.1145/36897468:OOPSLA2(988-1017)Online publication date: 8-Oct-2024
  • (2024)Decidable Subtyping of Existential Types for JuliaProceedings of the ACM on Programming Languages10.1145/36564218:PLDI(1091-1114)Online publication date: 20-Jun-2024
  • (2024)Parametric Subtyping for Structural Parametric PolymorphismProceedings of the ACM on Programming Languages10.1145/36329328:POPL(2700-2730)Online publication date: 5-Jan-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PPDP '05: Proceedings of the 7th ACM SIGPLAN international conference on Principles and practice of declarative programming
July 2005
260 pages
ISBN:1595930906
DOI:10.1145/1069774
  • General Chair:
  • Pedro Barahona,
  • Program Chair:
  • Amy Felty
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 July 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. intersection
  2. negation types
  3. subtyping
  4. typing
  5. union

Qualifiers

  • Article

Conference

PPDP05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 230 of 486 submissions, 47%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)9
  • Downloads (Last 6 weeks)2
Reflects downloads up to 15 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)The Ultimate Conditional SyntaxProceedings of the ACM on Programming Languages10.1145/36897468:OOPSLA2(988-1017)Online publication date: 8-Oct-2024
  • (2024)Decidable Subtyping of Existential Types for JuliaProceedings of the ACM on Programming Languages10.1145/36564218:PLDI(1091-1114)Online publication date: 20-Jun-2024
  • (2024)Parametric Subtyping for Structural Parametric PolymorphismProceedings of the ACM on Programming Languages10.1145/36329328:POPL(2700-2730)Online publication date: 5-Jan-2024
  • (2024)Mechanizing Refinement TypesProceedings of the ACM on Programming Languages10.1145/36329128:POPL(2099-2128)Online publication date: 5-Jan-2024
  • (2023)Typing Records, Maps, and StructsProceedings of the ACM on Programming Languages10.1145/36078387:ICFP(215-258)Online publication date: 31-Aug-2023
  • (2023)Making a Type Difference: Subtraction on Intersection Types as Generalized Record OperationsProceedings of the ACM on Programming Languages10.1145/35712247:POPL(893-920)Online publication date: 11-Jan-2023
  • (2023)Programming with Union, Intersection, and Negation TypesThe French School of Programming10.1007/978-3-031-34518-0_12(309-378)Online publication date: 11-Oct-2023
  • (2022)Set-theoretic Types for ErlangProceedings of the 34th Symposium on Implementation and Application of Functional Languages10.1145/3587216.3587220(1-14)Online publication date: 31-Aug-2022
  • (2022)Revisiting Iso-Recursive SubtypingACM Transactions on Programming Languages and Systems10.1145/354953744:4(1-54)Online publication date: 21-Sep-2022
  • (2022)A Hoare logic style refinement types formalisationProceedings of the 7th ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3546196.3550162(1-14)Online publication date: 6-Sep-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media