Skip to main content

Typed object-oriented functional programming with late binding

  • Conference paper
  • First Online:
ECOOP ’96 — Object-Oriented Programming (ECOOP 1996)

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

Included in the following conference series:

Abstract

Object-oriented programming languages are suitable for describing real-world objects, functional programming languages for algebraic values. In this paper we propose an object-oriented functional programming language, called TOFL, which combines many desired properties of the two paradigms. In particular, TOFL unifies object classes, inheritance, (method) redefinitions and late binding as in object-oriented languages, algebraic data types, higher-order functions, type classes and type inference (without type reconstruction in this paper) as in functional languages. We translate TOFL into a stratified and explicitly typed λ-calculus T with overloaded functions, where redefinitions and late binding become late binding of overloaded functions. The operational semantics of T gives a semantics and a simple prototyping implementation of TOFL.

Research partially supported by ESPRIT Basic Research WG COMPASS 6112.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Special issue on type systems for object-oriented programming. J. Functional Programming, 4(2), 1994.

    Google Scholar 

  2. M. Abadi and L. Cardelli. A theory of primitive objects: second-order systems. In Proc. European Symp./ on Programming. Springer LNCS, 1994.

    Google Scholar 

  3. M. Abadi and L. Cardelli. A theory of primitive objects: untyped and first-order systems. In Proc. Theoretical Aspects of Computer Software. Springer LNCS, 1994.

    Google Scholar 

  4. Apple Computer Inc., Eastern Research and Technology. Dylan: an object-oriented dynamic language. Technical report, 1992.

    Google Scholar 

  5. D. Bobrow, L. DeMichiel, R. Gabriel, S. Keene, G. Kiczales, and D. Moon. Common List Object System Specification. SIGPLAN Notice, 23, 1988.

    Google Scholar 

  6. K. Bruce. Typing in object-oriented languages: Achieving expressibility and safety. Technical report, Williams College, 1995. http://www.cs.williams.edu/~kim/.

    Google Scholar 

  7. K. Bruce, A. Schuett, and R. van Gent. PolyTOIL: A type-safe polymorphic object-oriented language (extended abstract). In Proc. 9th ECOOP. Springer LNCS, 1995.

    Google Scholar 

  8. P. Canning, W. Cook, W. Hill, and W. Olthoff. Interfaces for strongly-typed object-oriented programming. In Proc. OOPSLA'89, pages 457–467. 1989.

    Google Scholar 

  9. L. Cardelli. A semantics of multiple inheritance. Information and Computation, 76:130–164, 1988.

    Article  MathSciNet  Google Scholar 

  10. L. Cardelli. Extensible records in a pure calculus of subtyping. In C. Gunter and J. Mitchell, editors, Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design. The MIT Press, 1994.

    Google Scholar 

  11. L. Cardelli and G. Longo. A semantics for Quest. J. of Functional programming, 1(4):417–458, 1991.

    MathSciNet  MATH  Google Scholar 

  12. L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. Computing Surveys, 17(4):471–522, 1985.

    Article  Google Scholar 

  13. G. Castagna. Covariance and contravariance: Conflict without a cause. Trans. on Prog. Lang. and Sys., 17(3), 1995.

    Google Scholar 

  14. G. Castagna. Integration of parametric and ad hoc second order polymorphism in a calculus with subtyping. Formal Aspects of Computing, 1995. To appear.

    Google Scholar 

  15. G. Castagna, G. Ghelli, and G. Longo. A calculus for overloaded functions with subtyping. Information and Computation, 1995. To appear.

    Google Scholar 

  16. W. Cook. A proposal for making eiffel type-safe. In Proc. European Conf. on Object-oriented Programming, 1989.

    Google Scholar 

  17. W. Cook, W. Hill, and P. Canning. Inheritance is not subtyping. In Proc. 17th ACM Symp. Principles of Programming Languages. 1990.

    Google Scholar 

  18. P.-L. Curien and G. Ghelli. Coherence of subsumption, minimum typing and the type checking in F . Mathematical Structiures in Computer Science, 2(1), 1992.

    Google Scholar 

  19. L. Damas and R. Milner. Principal type schemes for functional programs. In Proc. 9th ACM Symp. Principles of Programming Languages, pages 207–212, 1982.

    Google Scholar 

  20. Y.-C. Fuh and P. Mishra. Type inference with subtypes. Theoretical Computer Science, 73:155–175, 1990.

    Article  MathSciNet  MATH  Google Scholar 

  21. K. Futatsugi, J. Goguen, J.-P. Jouannaud, and J. Meseguer. Principles of OBJ2. In Proc. 12th ACM Symp. Principles of Programming Languages, pages 52–66, 1985.

    Google Scholar 

  22. G. Ghelli. A static type system for message passing. In Proc. of OOPSLA'91. 1991.

    Google Scholar 

  23. G. Ghelli. Divergence of F type checking. Tech. Rep. 5/93, University of Pisa, 1993.

    Google Scholar 

  24. J. Goguen and J. Meseguer. Order-sorted algebra I: Equational deduction for multiple inheritance, polymorphism, and partial operations. Technical report, SRI, 1989.

    Google Scholar 

  25. C. Gunter and J. Mitchell (Eds.). Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design. The MIT Press, 1994.

    Google Scholar 

  26. R. Harper and J. Mitchell. The essence of ML. In Proc. 15th ACM Symp. Principles of Programming Languages, pages 28–46, 1988.

    Google Scholar 

  27. F. Henglein. Type inference with polymrophic recursion. ACM Trans. on Prog. Lang. and Sys., 15(2):253–289, 1993.

    Article  Google Scholar 

  28. M. Hoang and J. Mitchell. Lower bounds on type inference with subtypes. In Proc. 22nd ACM Symp. Principles of Programming Languages, pages 176–185, 1995.

    Google Scholar 

  29. P. Hudak, S. Peyton Jones, and P. Wadler (Editors). Report on the programming language Haskell: A non-strict, purely functional language (version 1.2). ACM SIGPLAN Notices, 27(5), 1992.

    Google Scholar 

  30. J. Hughes and J. Sparud. Haskell++: An object-oriented extension of haskell. In Proc. 1995 Workshop on Haskell, 1995.

    Google Scholar 

  31. A. Kfoury, J. Tiuryn, and P. Urzyczyn. Type reconstruction in the presence of polymrophic recursion. ACM Trans. on Prog. Lang. and Sys., 15(2):290–311, 1993.

    Article  Google Scholar 

  32. K. Läufer. Combining type classes and existential types. In Proc. Latin American Informatics Conference (PANEL). ITESM-CEM, Mexico, Sept. 1994.

    Google Scholar 

  33. K. Läufer and M. Odersky. Polymorphic type inference and abstract data types. ACM Transactions on Programming Languages and Systems, 1994.

    Google Scholar 

  34. B. Meyer. Object-Oriented Software Construction. Prentice Hall, 1988.

    Google Scholar 

  35. R. Milner, M. Tofte, and R. Harper. The Definition of Standard ML. MIT Press, 1990.

    Google Scholar 

  36. J. Mitchell and G. Plotkin. Abstract types have existential type. ACM Trans. on Prog. Lang. and Sys, 10(3):475–502, 1988.

    Google Scholar 

  37. A. Mycroft. Polymorphic type schemes and recursive definitions. In Proc. Int. Symposium on Programming, pages 217–228. Springer LNCS 167, 1984.

    MATH  MathSciNet  Google Scholar 

  38. T. Nipkow and C. Prehofer. Type reconstruction for type classes. Journal of Functional Programming, 5(2):201–224, 1995.

    MathSciNet  MATH  Google Scholar 

  39. A. Ohori. A compilation method for ML-style polymorphic record calculi. In Proc. 19th ACM Symp. Principles of Programming Languages, pages 154–165, 1992.

    Google Scholar 

  40. J. Palsberg. Efficient type inference of object types. In Proc. IEEE Symposium on Logic in Computer Science, pages 186–195, 1994.

    Google Scholar 

  41. B. Pierce and D. Turner. Simple type-theoretical foundations for object-oriented programming. J. of Functional Programming, 4(2):207–247, 1994.

    Article  MATH  Google Scholar 

  42. B. C. Pierce. Bounded quantification is undecidable. Information and Computation, 112(1):131–165, 1994.

    Article  MATH  MathSciNet  Google Scholar 

  43. Z. Qian and B. Krieg-Brückner. TOFL: a typed object-oriented functional programming language with late binding. Technical report, FB Informatik, Universität Bremen, March 1996.

    Google Scholar 

  44. Z. Qian and B. Krieg-Brückner. Object-oriented functional programming and type reconstruction. Nov. 1995. Submitted for publication.

    Google Scholar 

  45. D. Rémy. Typechecking records and variants in a natural extension of ml. In Proc. 16th ACM Symp. Principles of Programming Languages, pages 77–87, 1989.

    Google Scholar 

  46. G. S. Smith. Polymorphic type inference with overloading and subtyping. In J.-P. J. M.-C. Gaudel, editor, Proc. TAPSOFT'93, pages 670–685. Springer LNCS 668, 1993.

    Google Scholar 

  47. C. Strachey. Fundamental concepts in programming languages. In Lecture Notes for the Int. Summer School in Computer Programming, Copenhagen, August 1967.

    Google Scholar 

  48. C. Szyperski, S. Omohundro, and S. Murer. Engineering a programming language: The type and class system for Sather. In Programming Languages and System Architectures, pages 208–227. Springer LNCS 782, 1993.

    Google Scholar 

  49. P. Wadler and S. Blott. How to make ad-hoc polymorphism less ad hoc. In Proc. 16th ACM Symp. Principles of Programming Languages, pages 60–76, 1989.

    Google Scholar 

  50. M. Wand. Complete type inference for simple objects. In Proc. 2nd IEEE Symp. Logic in Cornp. Sci., 1987. Corrigendum in Proc. 3rd IEEE Symp. Logic in Comp. Sci., 1988.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pierre Cointe

Rights and permissions

Reprints and permissions

Copyright information

© 1996 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Qian, Z., Krieg-Brückner, B. (1996). Typed object-oriented functional programming with late binding. In: Cointe, P. (eds) ECOOP ’96 — Object-Oriented Programming. ECOOP 1996. Lecture Notes in Computer Science, vol 1098. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0053056

Download citation

  • DOI: https://doi.org/10.1007/BFb0053056

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-61439-5

  • Online ISBN: 978-3-540-68570-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics