Type Checking Modular Multiple Dispatch with Parametric Polymorphism and Multiple Inheritance

Cited 0 time in webofscience Cited 0 time in scopus
  • Hit : 345
  • Download : 0
In previous work, we presented rules for defining overloaded functions that ensure type safety under symmetric multiple dispatch in an object-oriented language with multiple inheritance, and we showed how to check these rules without requiring the entire type hierarchy to be known, thus supporting modularity and extensibility. In this work, we extend these rules to a language that supports parametric polymorphism on both classes and functions. In a multiple-inheritance language in which any type may be extended by types in other modules, some overloaded functions that might seem valid are correctly rejected by our rules. We explain how these functions can be permitted in a language that additionally supports an exclusion relation among types, allowing programmers to declare "nominal exclusions" and also implicitly imposing exclusion among different instances of each polymorphic type. We give rules for computing the exclusion relation, deriving many type exclusions from declared and implicit ones. We also show how to check our rules for ensuring the safety of overloaded functions. In particular, we reduce the problem of handling parametric polymorphism to one of determining subtyping relationships among universal and existential types. Our system has been implemented as part of the open-source Fortress compiler.
Publisher
ASSOC COMPUTING MACHINERY
Issue Date
2011-10
Language
English
Article Type
Article
Citation

ACM SIGPLAN NOTICES, v.46, no.10, pp.973 - 992

ISSN
0362-1340
DOI
10.1145/2076021.2048140
URI
http://hdl.handle.net/10203/101830
Appears in Collection
CS-Journal Papers(저널논문)
Files in This Item
There are no files associated with this item.

qr_code

  • mendeley

    citeulike


rss_1.0 rss_2.0 atom_1.0