Skip to main content


eCommons@Cornell >
College of Engineering >
Computer Science >
Computer Science Technical Reports >

Please use this identifier to cite or link to this item:
Title: Type Dispatch for Named Hierarhical Types
Authors: Glew, Neal
Keywords: computer science
technical report
Issue Date: Apr-1999
Publisher: Cornell University
Abstract: Type dispatch constructs are an important feature of many programming languages. Scheme has predicates for testing the runtime type of a value. Java has a class cast expression and a try statement for switching on an exception's class. Crucial to these mechanisms, in typed languages, is type refinement: The static type system will use type dispatch to refine types in successful dispatch branches. Existing work in functional languages has addressed certain kinds of type dispatch, namely, intensional type analysis. However, this work does not extend to languages with subtyping nor to named types. This paper describes a number of type dispatch constructs that share a common theme: class cast and class case constructs in object oriented languages, ML style exceptions, hierarchical extensible sums, and multimethods. I describe a unifying mechanism, {\em tagging}, that abstracts the operation of these constructs, and formalise a small tagging language. After discussing how to implement the tagging language, I present a more primitive language and give a formal translation from the tagging language.
Appears in Collections:Computer Science Technical Reports

Files in This Item:

File Description SizeFormat
99-1738.pdf259.45 kBAdobe PDFView/Open
99-1738.ps591.07 kBPostscriptView/Open

Refworks Export

Items in eCommons are protected by copyright, with all rights reserved, unless otherwise indicated.


© 2014 Cornell University Library Contact Us