Hostname: page-component-8448b6f56d-mp689 Total loading time: 0 Render date: 2024-04-23T09:01:41.468Z Has data issue: false hasContentIssue false

A unifying type-theoretic framework for objects

Published online by Cambridge University Press:  07 November 2008

Martin Hofmann
Affiliation:
Department of Computer Science, University of Edinburgh, The King's Buildings, Edinburgh EH9 3JZ, UK
Benjamin Pierce
Affiliation:
Department of Computer Science, University of Edinburgh, The King's Buildings, Edinburgh EH9 3JZ, UK
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

We give a direct type-theoretic characterization of the basic mechanisms of object-oriented programming, including objects, methods, message passing, and subtyping, by introducing an explicit constructor for object types and suitable introduction, elimination, and equality rules. The resulting abstract framework provides a basis for justifying and comparing previous encodings of objects based on recursive record types (Cardelli, 1984; Cardelli, 1992; Bruce, 1994; Cook et al., 1990; Mitchell, 1990a) and encodings based on existential types (Pierce & Turner, 1994).

Type
Articles
Copyright
Copyright © Cambridge University Press 1995

References

Abadi, M. 1992 (Feb.). Doing without F-bounded quantification. Message to Types electronic mail list.Google Scholar
Abadi, M. 1994. Baby Modula-3 and a Theory of Objects. Journal of Functional Programming, 4(2). An earlier version appeared as DEC Systems Research Center Research Report 95, (February, 1993).Google Scholar
Abadi, M., & Cardelli, L. 1994b. A Theory of Primitive Objects: Second-order Systems. In: European Symposium on Programming (ESOP),Edinburgh, Scotland.CrossRefGoogle Scholar
Abadi, M., & Cardelli, L. 1994a. A Theory of Primitive Objects: Untyped and First-order Systems. In: Theoretical Aspects of Computer Software (TACS), Sendai, Japan.Google Scholar
Amadio, R. M., & Cardelli, L. 1993. Subtyping Recursive Types. ACM Transactions on Programming Languages and Systems, 15(4), 575631. A preliminary version appeared in POPL '91 (pp. 104–118), and as DEC Systems Research Center Research Report number 62, August 1990.CrossRefGoogle Scholar
Barendregt, H. 1992. Lambda Calculi with Types. In: Abramsky, G., & Maibaum, (eds), Handbook of Logic in Computer Science, vol. II. Oxford University Press.Google Scholar
Barr, M., & Wells, C. 1990. Category Theory for Computing Science. Prentice Hall.Google Scholar
Bruce, K., & Mitchell, J. 1992 (Jan.). PER models of subtyping, recursive types and higher-order polymorphism. In: Proceedings of the Nineteenth ACM Symposium on Principles of Programming Languages.Google Scholar
Bruce, K. B. 1994. A Paradigmatic Object-Oriented Programming Language: Design, Static Typing and Semantics. Journal of Functional Programming, 4(2). A preliminary version appeared in POPL 1993 under the title “Safe Type Checking in a Statically Typed Object-Oriented Programming Language”.Google Scholar
Canning, P., Cook, W., Hill, W., Olthoff, W., & Mitchell, J. 1989 (Sept.). F-Bounded Quantification for Object-Oriented Programming. Pages 273280of: Fourth International Conference on Functional Programming Languages and Computer Architecture.CrossRefGoogle Scholar
Cardelli, L. 1984. A semantics of multiple inheritance. Pages 5167of: Kahn, G., MacQueen, D., & Plotkin, G. (eds), Semantics of Data Types. Lecture Notes in Computer Science, vol. 173. Springer-Verlag. Full version in Information and Computation 76:138–164, 1988.CrossRefGoogle Scholar
Cardelli, L. 1988 (Jan.). Structural Subtyping and the Notion of Power Type. Pages 7079of: Proceedings of the 15th ACM Symposium on Principles of Programming Languages.CrossRefGoogle Scholar
Cardelli, L. 1990 (Oct.). Notes about Unpublished manuscript.Google Scholar
Cardelli, L. 1992 (Jan.). Extensible Records in a Pure Calculus of Subtyping. Research report 81. DEC Systems Research Center. Also in Gunter, Carl A. and Mitchell, John C., editors, Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design (MIT Press, 1994).Google Scholar
Cardelli, L., & Longo, G. 1991. A semantic basis for Quest. Journal of Functional Programming, 1(4), 417458. Preliminary version in ACM Conference on Lisp and Functional Programming, June 1990. Also available as DEC SRC Research Report 55, Feb. 1990.Google Scholar
Cardelli, L., & Wegner, P. 1985. On Understanding Types, Data Abstraction, and Polymorphism. Computing Surveys, 17(4).Google Scholar
Cardelli, L., Martini, S., Mitchell, J. C., & Scedrov, A. 1994. An Extension of System F with Subtyping. Information and Computation, 109(1–2), 456. A preliminary version appeared in TACS '91 (Sendai, Japan, pp. 750–770).CrossRefGoogle Scholar
Castagna, G., Ghelli, G., & Longo, G. 1994. A calculus for overloaded functions with subtyping. Information and Computation. To appear; a preliminary version appeared in LISP and Functional Programming, July 1992 (pp. 182–192), and as Rapport de Recherche LIENS-92-4, Ecole Normale Supérieure, Paris.Google Scholar
Compagnoni, A. B. 1994 (Jan.). Subtyping in is decidable. Tech. rept. ECS-LFCS-94-281. LFCS, University of Edinburgh. To appear in the proceedings of Computer Science Logic, September 1994, under the title “Decidability of Higher-Order Subtyping with Intersection Types”.Google Scholar
Compagnoni, A. B., & Pierce, B. C. 1993 (Aug.). Multiple Inheritance via Intersection Types. Tech. rept. ECS-LFCS-93-275. LFCS, University of Edinburgh. Also available as Catholic University Nijmegen computer science technical report 93–18.Google Scholar
Cook, W. 1991. Object-oriented programming versus abstract data types. Pages 151178of: de Bakker, J. W., et al. (eds), Foundations of Object-Oriented Languages. Lecture Notes in Computer Science, vol. 489. Springer-Verlag.Google Scholar
Cook, W. 1989. A Denotational Semantics of Inheritance. Ph.D. thesis, Brown University.CrossRefGoogle Scholar
Cook, W. R., Hill, W. L., & Canning, P. S. 1990 (Jan.). Inheritance is not Subtyping. Pages 125135of: Seventeenth Annual ACM Symposium on Principles of Programming Languages. Also in Gunter, Carl A. and Mitchell, John C., editors, Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design (MIT Press, 1994).Google Scholar
Coquand, T., & Paulin-Mohring, C. 1989. Inductively defined types. In: LNCS 389. Springer-Verlag.Google Scholar
Danforth, S., & Tomlinson, C. 1988. Type Theories and Object-Oriented Programming. ACM Computing Surveys, 20(1), 2972.CrossRefGoogle Scholar
Fisher, K., & Mitchell, J. 1994. Notes on Typed Object-Oriented Programming. Pages 844885of: Proceedings of Theoretical Aspects of Computer Software, Sendai, Japan. Springer-Verlag. LNCS 789.Google Scholar
Girard, J.-Y. 1972. Interprétation fonctionelle et élimination des coupures de l'arithmétique d'ordre supérieur. Ph.D. thesis, Université Paris VII.Google Scholar
Goldberg, A., & Robson, D. 1983. Smalltalk-80: The Language and Its Implementation. Reading, MA: Addison-Wesley.Google Scholar
Hofmann, M., & Pierce, B. 1992. An Abstract View of Objects and Subtyping (Preliminary Report). Technical Report ECS-LFCS-92-226. University of Edinburgh, LFCS.Google Scholar
Hofmann, M., & Pierce, B. 1994 (Sept.). Positive Subtyping. Tech. rept. ECS-LFCS-94-303. LFCS, University of Edinburgh.Google Scholar
Kamin, S. N., & Reddy, U. S. 1994. Two Semantic Models of Object-Oriented Languages. Pages 464495of: Gunter, C. A., & Mitchell, J. C. (eds), Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design. The MIT Press.Google Scholar
Kock, A. 1970. Strong Functors and Monoidal Monads. Various Publications Series 11, Aarhus Universitet.Google Scholar
Läufer, K., & Odersky, M. 1994. Polymorphic Type Inference and Abstract Data Types. ACM Transactions on Programming Languages and Systems (TOPLAS). To appear; an earlier version appeared in the Proceedings of the ACM SIGPLAN Workshop on ML and its Applications, 1992, under the title “An Extension of ML with First-Class Abstract Types”.CrossRefGoogle Scholar
Mitchell, J., & Plotkin, G. 1988. Abstract Types Have Existential Type. ACM Transactions on Programming Languages and Systems, 10(3).Google Scholar
Mitchell, J. C. 1990a (Jan.). Toward a Typed Foundation for Method Specialization and Inheritance. Pages 109124of: Proceedings of the 17th ACM Symposium on Principles of Programming Languages. Also in Gunter, Carl A. and Mitchell, John C., editors, Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design (MIT Press, 1994).Google Scholar
Mitchell, J. C. 1990b. A Type-Inference Approach to Reduction Properties and Semantics of Polymorphic Expressions. Pages 195212of: Huet, G. (ed), Logical Foundations of Functional Programming. University of Texas at Austin Year of Programming Series. Addison-Wesley.Google Scholar
Moggi, E. 1989. Computational lambda-calculus and monads. Pages 1423of: Fourth Annual Symposium on Logic in Computer Science (Asilomar, CA).IEEE Computer Society Press.Google Scholar
Pierce, B., Dietzen, S., & Michaylov, S. 1989 (Mar.). Programming in Higher-order Typed Lambda-Calculi. Technical Report CMU-CS-89-111. Carnegie Mellon University.Google Scholar
Pierce, B. C., & Turner, D. N. 1993 (Apr.). Statically Typed Friendly Functions via Partially Abstract Types. Technical Report ECS-LFCS-93-256. University of Edinburgh, LFCS. Also available as INRIA-Rocquencourt Rapport de Recherche No. 1899.Google Scholar
Pierce, B. C., & Turner, D. N. 1994. Simple Type-Theoretic Foundations for Object-Oriented Programming. Journal of Functional Programming, 4(2), 207247. A preliminary version appeared in Principles of Programming Languages, 1993, and as University of Edinburgh technical report ECS-LFCS-92-225, under the title “Object-Oriented Programming Without Recursive Types”.Google Scholar
Reichel, H. 1995. An Approach to Object Semantics based on Terminal Co-algebras. Mathematical Structures in Computer Science. To appear.CrossRefGoogle Scholar
Reynolds, J. 1974. Towards a Theory of Type Structure. Pages 408425of: Proc. Colloque sur la Programmation. New York: Springer-Verlag LNCS 19.Google Scholar
Reynolds, J. C. 1978. User Defined Types and Procedural Data Structures as Complementary Approaches to Data Abstraction. Pages 309317of: Gries, D. (ed), Programming Methodology, A Collection of Articles by IFIP WG2.3. New York: Springer-Verlag. Reprinted from S. A. Schuman (ed.), New Advances in Algorithmic Languages 1975, Inst. de Recherche d'Informatique et d'Automatique, Rocquencourt, 1975, pages 157–168. Also in Carl A. Gunter and John C. Mitchell, editors, Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design (MIT Press, 1994).Google Scholar
Smith, J., Nordström, B., & Petersson, K. 1990. Programming in Martin-Löf's Type Theory. An Introduction. Oxford University Press.Google Scholar
Steffen, M., & Pierce, B. 1994 (June). Higher-Order Subtyping. In: IFIP Working Conference on Programming Concepts, Methods and Calculi (PROCOMET). An earlier version appeared as University of Edinburgh technical report ECS-LFCS-94-280 and Universität Erlangen-Nürnberg Interner Bericht IMMD7-01/94, January 1994.Google Scholar
Stroustrup, B. 1986. The C++ Programming Language. Reading, Mass: Addison-Wesley.Google Scholar
Wand, M. 1987 (June). Complete type inference for simple objects. In: Proceedings of the IEEE Symposium on Logic in Computer Science.Google Scholar
Wraith, G. C. 1989. A note on categorical datatypes. Lecture Notes in Computer Science, no. 389. Springer-Verlag.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.