|
ABSTRACT
Polymorphic record calculi have recently attracted much attention as a typed foundation for object-oriented programming. This is based on the fact that a function that selects a field l of a record can be given a polymorphic type that enables it to be applied to various records containing a field l. Recent studies have established techniques to develop an ML-style type inference algorithm for such a polymorphic type system. There seems to be, however, no established method to compile an ML-style polymorphic record calculus into efficient code. The purpose of this paper is to present one such method. We define a polymorphic record calculus as an extension of Damas and Miler's proof system for ML. For this calculus, we define an implementation calculus where records are represented as arrays of (references to) values and field selection is performed by direct indexing. To represent polymorphic field selection, the implementation calculus contains an abstraction mechanism over indexes. We then develop an algorithm to translate the polymorphic record calculus into the implementation calculus by refining a type inference algorithm; it simultaneously computes a principal type scheme in the polymorphic record calculus and a correct implementation term in the implementation calculus. The type inference is shown to be sound and complete in the sense of Damas-Milner's algorithm for ML. Moreover, the polymorphic type system is shown to be sound with respect to an operational semantics of the translated terms in the implementation calculus.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
AB87
|
|
| |
BTBO89
|
Val Breazu-Tannen , Peter Buneman , Atsushi Ohori, Can object-oriented databases be statically typed?, Proceedings of the second international workshop on Database programming languages, p.226-237, December 1989, Salishan Lodge, Gleneden Beach, Oregon, United States
|
| |
Car88
|
|
| |
Car91
|
L. Cardelli. Extensible records in a pure calculus of subtyping. Technical report, DEC Systems Research Center, 1991.
|
 |
CDMB89
|
R. C. H. Conner , A. Dearle , R. Morrison , A. L. Brown, An object addressing mechanism for statically typed languages with multiple inheritance, Conference proceedings on Object-oriented programming systems, languages and applications, p.279-285, October 02-06, 1989, New Orleans, Louisiana, United States
|
| |
CM89
|
|
 |
CW85
|
|
 |
DM82
|
|
| |
Gir71
|
J.-Y. Girard. Une extension de l'interpretation de gSdel ~ l'analyse, et son application l'61imination des coupures dans l'analyse et th6orie des types. In Second Scandinavian Logic Symposium. North-Holland, 1971.
|
| |
GS89
|
|
 |
HP91
|
|
 |
JM88
|
|
 |
MH88
|
|
 |
Mit84
|
|
| |
Mit90
|
|
| |
MTH90
|
|
 |
OB88
|
|
 |
OB89
|
A. Ohori , P. Buneman, Static type inference for parametric classes, Conference proceedings on Object-oriented programming systems, languages and applications, p.445-450, October 02-06, 1989, New Orleans, Louisiana, United States
|
 |
Oho89a
|
|
| |
Oho89b
|
|
 |
Rém89
|
|
| |
Rém90
|
D. R~my. Typechecking records in a natural extension of ML. Technical report, INRIA-Rocquencourt, Le Chesnay Cedex, France, 1990.
|
| |
Rém91
|
D. R~my. Typing record concatenation for free. Technical report, INRIA-Rocquencourt, Le Chesnay Cedex, France., 1991.
|
| |
Rey74
|
|
 |
Sta88
|
|
| |
Tof88
|
M. Wofte. Operational Semantics and Polymorphic Type Inference. PhD thesis, Department of Computer Science, University of Edinburgh, 1988.
|
| |
Wan87
|
M. Wand. Complete type inference for simple objects. In Proc. IEEE Symposium on Logic in Computer Science, pages 37- 44, 1987.
|
| |
Wan88
|
M. Wand. Corrigendum: Complete type inference for simple object. In Proc. IEEE Symposium ou Logic in Computer Science, 1988.
|
| |
Wan89
|
|
CITED BY 18
|
|
|
|
|
Martin Odersky , Philip Wadler , Martin Wehr, A second look at overloading, Proceedings of the seventh international conference on Functional programming languages and computer architecture, p.135-146, June 26-28, 1995, La Jolla, California, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Yasuhiko Minamide , Greg Morrisett , Robert Harper, Typed closure conversion, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.271-283, January 21-24, 1996, St. Petersburg Beach, Florida, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|