Skip to main content

Attaching Second-Order Types to Methods in an Object-Oriented Language

  • Conference paper
  • First Online:
ECOOP’ 93 — Object-Oriented Programming (ECOOP 1993)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 707))

Included in the following conference series:

Abstract

This paper proposes an extension of the notion of method as it is currently used in most object-oriented languages. We define polymethods as methods that we can attach directly to types, as opposed to classes and that we can describe with a second-order type. Two benefits result from this extension; first, the expressive power of the language is improved with better modeling abilities. Next, second-order types yield a more powerful (precise) type inference, which extends the range of static type checking in a truly extensible object-oriented language. We first show that extensible object-oriented languages present many difficulties for static type-checking and that second-order types are necessary to get stronger type-checking. We illustrate how to combine polymethods through type inheritance and propose a technique based on abstract interpretation to derive a second-order type for new polymethods.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Aiken, B. R. Murphy: Static Type Inference in a Dynamically Typed Language. Proc. of the 18th Symposium on Principles of Programming Languages, 1991.

    Google Scholar 

  2. H. Ait-Kaci, A. Podelski. The Meaning of Life. PRL Research Report, DEC, 1990.

    Google Scholar 

  3. L. Cardelli: Typeful Programming. DEC SRC report #5, 1989.

    Google Scholar 

  4. Y. Caseau: “A Model For a Reflective Object-Oriented Language,” Sigplan Notices, Special Issue on Concurent Object-Oriented Programming, 1989.

    Google Scholar 

  5. Y. Caseau: An Object-Oriented Language for Advanced Applications. Proc. of TOOLS USA 91, 1991.

    Google Scholar 

  6. P. Cousot, R. Cousot: Abstract Interpretation: A Unified Model for Static Analysis of Programs by Constructions or Approximation of Fixpoints. Proc. Fourth ACM symposium of Principles of Programming Languages, 1977.

    Google Scholar 

  7. W. Cook, W. Hill, P. Canning: Inheritance is not Subtyping. Proc. of the 17th ACM Symposium on Principles of Programming Languages, San Francisco, 1990.

    Google Scholar 

  8. W. Cook, J. Palsberg: A Denotational Semantics of Inheritance and its Correctness. Proc. of OOPSLA-89, New Orleans, 1989.

    Google Scholar 

  9. Y. Caseau, L. Perron: A type System for Object-Oriented Database Programming and Querying Languages. Proc. of International Workshop on DataBase Programming Languages, 1991.

    Google Scholar 

  10. L. Cardelli, P. Wegner: On understanding types, data abstraction, and polymorphism. ACM Computing Surveys, vol 17 n. 4, 1985.

    Google Scholar 

  11. C. Dony: Exception Handling and Object-Oriented Programming: Towards a Synthesis. Proc. of OOPSLA’90, Ottawa, 1990.

    Google Scholar 

  12. D.P. Friedman, M. Wand: Reification: Reflection without Metaphysics. ACM Symposium on LISP and Functional Programming, Austin, August 1984.

    Google Scholar 

  13. J. Graver, R. Johnson: A Type System for Smalltalk. Proc. of the 17th ACM Symposium on Principles of Programming Languages, San Francisco, 1990.

    Google Scholar 

  14. J. Goguen, J. Meseguer: Eqlog: Equality, Types and Generic Modules for Logic Programming. In Logic Programming, Functions, Relations and Equations, Eds. D. DeGroot, G. Lindstrom, Prentice Hall, 1986.

    Google Scholar 

  15. L. Geurts, L. Meertens, S. Pemberton: ABC Programmer’s Handbook. Prentice-Hall, 1990.

    Google Scholar 

  16. A. Goldberg, D. Robson: Smalltalk-80: The language and its implementation. Addison-Wesley, 1983.

    Google Scholar 

  17. F. Henglein, H. G. Mairson: The Complexity of Type Inference for Higher-Order Typed Lambda Calculi. Proc. of the 18th Symposium on Principles of Programming Languages, 1991.

    Google Scholar 

  18. R. Harper, D.B. MacQueen, R. Milner: Standard ML. Report ECS-LFCS-86-2, Dept. of Computer Science, University of Edimburgh, 1986.

    Google Scholar 

  19. R. Johnson, J, Grauer, L. Zurawski: TS: An Optimizing Compiler for Smalltalk. OOPSLA-89, New Orleans, 1989.

    Google Scholar 

  20. C. Lecluse, P. Richard: Modelling Complex Structures in Object-Oriented Databases. Proc. of ACM PODS, 1989.

    Google Scholar 

  21. B. Meyer: Static Typing for Eiffel. Interactive Software Engineering, July, 1989.

    Google Scholar 

  22. R. Milner: A theory of type polymorphism in programming. In j. Computer and System Sciences vol 17 n. 3, 1978.

    Google Scholar 

  23. J. Mitchell: Towards a Typed Foundation for Method Specialization and Inheritance. Proc. of the 17th ACM Symposium on Principles of Programming Languages, San Francisco, 1990.

    Google Scholar 

  24. J. Mitchell, S. Meldal, N. Madhav: An Extension of Standard ML modules with subtyping and inheritance. Proc. of the 18th Symposium on Principles of Programming Languages, 1991.

    Google Scholar 

  25. P. Maes, D. Nardi: Meta-level Architecture and Reflection. Elsevier Science Publication (North Holland), 1988.

    Google Scholar 

  26. A. Ohori, P. Buneman: Static Type Inference for Parametric Classes. OOPSLA-89, New Orleans, 1989.

    Google Scholar 

  27. A. Ohori, P. Buneman, V. Breazu-Tannen: Database Programming in Machiavelli-a Polymorphic Language with Static Type Inference. ACM SIGMOD Conf. on Management of Data, May 1989.

    Google Scholar 

  28. J. Palsberg, M. I. Schwartzbach: Static Typing for Object-Oriented Programming. DAIMI PB-355, June 1991.

    Google Scholar 

  29. J. Palsberg, M. I. Schwartzbach: Safety Analysis versus Type Inference for Partial Types. DAIMI PB-404, July 1992.

    Google Scholar 

  30. U. Reddy: Objects as Closures: Abstract Semantics of Object-Oriented Languages. Proc. ACM Conference on LISP and Functional Programming, 1988.

    Google Scholar 

  31. A. Scedrov: A Guide to Polymorphic Types. Logic and Computer Science, Academic Press, 1990.

    Google Scholar 

  32. G. Smolka: Logic Programming over Polymorphically Order-Sorted Types. PhD Thesis, Universität Kaiserslautern, May 1989.

    Google Scholar 

  33. B. Stroustrup: The C++ Programming Language. Addison-Wesley, 1986.

    Google Scholar 

  34. A. Skarra, S. Zdonik: Type Evolution in an Object-Oriented Database. In Research Directions in Object Oriented Programming, ed. B. Schriver and P. Wegner, MIT press, 1987.

    Google Scholar 

  35. M. Wand: Complete Type Inference for Simple Objects. Proc. IEEE Symposium on Logic in Computer Science.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1993 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Caseau, Y., Perron, L. (1993). Attaching Second-Order Types to Methods in an Object-Oriented Language. In: Nierstrasz, O.M. (eds) ECOOP’ 93 — Object-Oriented Programming. ECOOP 1993. Lecture Notes in Computer Science, vol 707. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47910-4_9

Download citation

  • DOI: https://doi.org/10.1007/3-540-47910-4_9

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-57120-9

  • Online ISBN: 978-3-540-47910-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics