Type Checking Higher-Order Polymorphic Multi-Methods

François Bourdoncle, Stephan Merz
Abstract
We present a new predicative and decidable type system, called ML<, suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML, and class-based object-oriented programming and higher-order multi-methods in the tradition of CLOS. Instead of using extensible records as a foundation for object-oriented extensions of functional languages, we propose to reinterpret ML datatype declarations as abstract and concrete class declarations, and to replace pattern matching on run-time values by dynamic dispatch on run-time types. ML< is based on universally quantified polymorphic constrained types. Constraints are conjunctions of inequalities between monotypes built from type constructors organized into extensible and partially ordered classes. We give type checking rules for a small, explicitly typed functional language à la XML with multi-methods, show that the resulting system has decidable minimal types, and discuss subject reduction. Finally, we propose a new object-oriented programming language based on the ML< type system.
© ACM Press
Available as:  gzip'ed Postscript 
Reference
@InProceedings{bourdoncle:type,
  author =    "Fran{\c{c}}ois Bourdoncle and Stephan Merz",
  title =     "Type Checking Higher-Order Polymorphic Multi-Methods",
  booktitle = "POPL '97: 24th {ACM} Symposium on Principles of Programming Languages",
  year =      1997,
  publisher = {ACM Press},
  address =   "Paris",
  month =     jan,
  pages =     "302--315"
}

Stephan Merz