Skip to main content
    • Aa
    • Aa

A paradigmatic object-oriented programming language: Design, static typing and semantics

  • Kim B. Bruce (a1)

To illuminate the fundamental concepts involved in object-oriented programming languages, we describe the design of TOOPL, a paradigmatic, statically-typed, functional, object-oriented programming language which supports classes, objects, methods, hidden instance variables, subtypes and inheritance.

It has proven to be quite difficult to design such a language which has a secure type system. A particular problem with statically type checking object-oriented languages is designing typechecking rules which ensure that methods provided in a superclass will continue to be type correct when inherited in a subclass. The type-checking rules for TOOPL have this feature, enabling library suppliers to provide only the interfaces of classes with actual executable code, while still allowing users to safely create subclasses. To achieve greater expressibility while retaining type-safety, we choose to separate the inheritance and subtyping hierarchy in the language.

The design of TOOPL has been guided by an analysis of the semantics of the language, which is given in terms of a model of the F-bounded second-order lambda calculus with fixed points at both the element and type level. This semantics supports the language design by providing a means to prove that the type-checking rules are sound, thus guaranteeing that the language is type-safe.

While the semantics of our language is rather complex, involving fixed points at both the element and type level, we believe that this reflects the inherent complexity of the basic features of object-oriented programming languages. Particularly complex features include the implicit recursion inherent in the use of the keyword, self, to refer to the current object, and its corresponding type, MyType. The notions of subclass and inheritance introduce the greatest semantic complexities, whereas the notion of subtype is more straightforward to deal with. Our semantic investigations lead us to recommend caution in the use of inheritance, since small changes to method definitions in subclasses can result in major changes to the meanings of the other methods of the class.

Linked references
Hide All

This list contains references from the content that can be linked to their source. For a full set of references and notes please see the PDF or HTML where available.

M. Abadi (1994) Baby modula-3 and a theory of objects. J. Functional Program. to appear.

R.M. Amadio (1991) Recursion over realizability structures. Infor. and Computation 91(1): 5586.

R. Amadio and L. Cardelli (1993) Subtyping recursive types. ACM TOPLAS 15(4): 575631.

P. America (1987) Inheritance and subtyping in a parallel object-oriented language. In: J. Bezivin , Eds., Proc. ECOOP '87 – Lecture Notes in Computer Science 276, pp. 234242, Springer.

P. America , J. de Bakker , J. Kok and J. Rutten (1989) Denotational semantics of a parallel object-oriented language. Infor. and Computation 83(2): 152205.

P. America and F. van der Linden (1990) A parallel object-oriented language with inheritance and subtyping. In: OOPSLA-ECOOP '90 Proceedings, pp. 161168, October. (ACM SIGPLAN Not.25(10).)

U. Breazu-Tannen , T. Coquand , C.A. Gunter and A. Scedrov (1991) Inheritance and implicit coercion. Infor. and Computation 93(1): 172221.

K. Bruce (1992) The equivalence of two semantic definitions of inheritance in object-oriented languages. In: S. Brookes M. Main , A. Melton , M. Mislove and D. Schmidt , Eds., Proc. 7th Int. Conf. on Mathematical Foundations of Program. Semantics – Lecture Notes in Computer Science 598, pp. 102124, Springer.

K. Bruce and G. Longo (1990) A modest model of records, inheritance and bounded quantification. Infor. and Computation 87(1/2): 196240.

K.B. Bruce , A.R. Meyer and J.C. Mitchell (1990) The semantics of second-order lambda calculus. Infor. and Computation 85(1): 76134. (Reprinted in G. Huet, Ed., Logical Foundations of Functional Programming, Addison-Wesley, Reading, MA, 1990, pp. 213–273.)

L. Cardelli (1988a) A semantics of multiple inheritance. Infor. and Computation 76: 138164. (Special issue devoted to Symp. on Semantics of Data Types, Sophia-Antipolis (France), 1984.)

L. Cardelli and J. C. Mitchell (1990) Operations on records. In: Math. Foundations of Prog. Lang. Semantics – Lecture Notes in Computer Science 442, pp. 2252. Springer.

L. Cardelli and P. Wegner (1985) On understanding types, data abstraction, and polymorphism. Comput. Surv. 17(4): 471522.

F. Cardone (1989) Relational semantics for recursive types and bounded quantification. In: ICALP – Lecture Notes in Computer Science 372, pp. 164178, Springer.

S. Danforth and C. Tomlinson (1988) Type theories and object-oriented programming. ACM Comput. Surv. 20(1): 2972.

O. Madsen , B. Magnusson and B. Moller-Pedersen (1990) Strong typing of object-oriented languages revisited. In: OOPSLA-ECOOP Proc., pp. 140150. (ACM SIGPLAN Not.25(10), October.

B. Meyer (1992) Eiffel: The language. Prentice-Hall, Englewood Cliffs, NJ.

J.C. Mitchell (1984) Type inference and type containment. In: Proc. Int. Symp. on Semantics of Data Types – Lecture Notes in Computer Science 173, Sophia-Antipolis, France, pp. 257278, June, Springer.

J.C. Mitchell (1988) Polymorphic type inference and containment. Infor. and Computation 76(2/3): 211249. (Reprinted in G. Huet, Ed., Logical Foundations of Functional Programming, Addison-Wesley, Reading, MA, 1990, pp. 153–194.)

J.C. Mitchell and G.D. Plotkin (1988) Abstract types have existential types. ACM Trans. Program. Lang. and Syst. 10(3): 470502. (Preliminary version appeared in Proc. 12th ACM Symp. on Principles of Program. Lang.)

J. Palsberg and M. Schwartzback (1990) Type substitution for object-oriented programming. In: OOPSLA-ECOOP Proc., pp. 151160. (ACM SIGPLAN Not.25(10), October.)

J.C. Reynolds (1980) Using category theory to design implicit conversions and generic operators. In N.D. Jones , Ed., Semantics-Directed Compiler Generation – Lecture Notes in Computer Science 94, pp. 2112580, Springer.

P. Wegner (1990) Concepts and paradigms of object-oriented programming. OOPS Messenger 1(1): 787, August.

N. Wirth (1988) The programming language Oberon. Software - Practice and Experience 18: 671690.

Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Full text views

Total number of HTML views: 0
Total number of PDF views: 12 *
Loading metrics...

Abstract views

Total abstract views: 108 *
Loading metrics...

* Views captured on Cambridge Core between September 2016 - 29th May 2017. This data will be updated every 24 hours.