paper available: "Polymorphic Methods with Self Types for ML-like

Readers of this mailing list may be interested in the following paper,
which has been submitted for publication.

	Polymorphic Methods with Self Types for ML-like Languages

				Dominic Duggan


Traditionally ``objects'' in high-level languages such as ML and Haskell have
been viewed as closures (records of functions). A new model of objects for
these languages is presented, and it is shown how its addition significantly
increases the expressiveness of these languages.  In particular the new model
provides first-class objects with polymorphic methods, previously considered
impossible in ML-like languages.  The type system thus admits first-class
polymorphism while retaining the simple stratified polymorphism of ML-like
languages.  Rather than reducing objects to records of functions, records are
reduced to simple objects; the traditional view of objects-as-closures is thus
a special (and limited) case in this object model.  A type inference algorithm
is provided for the resulting calculus; correctness of the algorithm is
formulated modulo some global restrictions which obviate the need for
constrained type variables.  An efficient algorithm for solving subtyping 
constraints is developed in a separate paper.  An operational
semantics is provided, and a subject reduction property verified for the
semantics.  The operational semantics is the basis for a partial equivalence
relation model of types.  The calculus is shown to be an extension of Harper
and Mitchell's XML, the former retaining the stratified polymorphism of the
latter.  Connections are made with related work on dynamic typing mechanisms
for polymorphic languages.


The paper is available on the Web at these URLs:


contains links to these ftp URLs:



The latter is a UK ftp site.  The paper should be uncompressed with gunzip.


As mentioned in the abstract, the paper has some relationship to another
paper announced on this mailing list in January, "Dynamic Types Have
Existential Type."  This paper has recently been revised.  It is available 
from the same ftp sites listed above, as dynamic-types.ps.gz.

Comments on either paper are welcome,
--Dominic Duggan

Spoken: Dominic Duggan        Internet: dduggan@uwaterloo.ca
Canada: Dept of Computer Science, University of Waterloo, 
        Waterloo, Ontario, Canada N2L 3G1
WWW:    http://nuada.uwaterloo.ca/~dduggan