Inheritance and selective method dispatching in concurrent Haskell

  • José E. Gallardo
  • Francisco Gutiérrez
  • Blas C. Ruiz
Paradigm Integration
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1292)


We incorporate object oriented features into the functional language Haskell: inheritance and methods with super and self references. Parametric polymorphism is retained in object classes. Interfaces are used to describe protocols (as a set of overloaded functional methods) and methods can be defined by default. Object classes implement (or inherit) interface methods. These classes and interfaces are organised in a hierarchical structure. We have integrated our model with Concurrent Haskell. The integrity of object attributes can be guaranteed via a guarded construct, which can also be used to selectively accept messages, depending on the object state and message arguments. The synchronisation mechanism is shown by examples. Our model offers a way out from the inheritance anomaly problem in most cases by incorporating synchronisation constraints into the inheritance hierarchy.


Concurrent objects functional programming guarded methods inheritance anomaly Haskell 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [ArnGos96]
    Ken Arnold and James Gosling. The Java Programming Language. Addison Wesley Longman, 1996.Google Scholar
  2. [Baren92]
    Henk Barendregt. Lambda calculi with types. Handbook of Logic in Computer Science (Abramsky et a. o., Editors.), Vol 2, Oxford Publ., p. 117–309, 1992.Google Scholar
  3. [Barthe95]
    Gilles Barthe. Inheritance in type theory. Research Report, Nijmegen University, September'1995.Google Scholar
  4. [Bruce94]
    Kim B. Bruce. A paradigmatic object-oriented programming language: Design, static typing and semantics. Journal of Functional Programming, 4(2), p. 127–206, April'1994.Google Scholar
  5. [Castag95]
    Giuseppe Castagna. A meta-language for typed object-oriented languages. Theoretical Computer Science, 151(2), p. 297–352, November' 1995.Google Scholar
  6. [Frølun92]
    Svend Frølund. Inheritance of synchronization constraints in concurrent object-oriented programming languages. In Proceedings of ECOOP'92, LNCS 615, Springer Verlag 1992.Google Scholar
  7. [HugSpa95]
    J. Hughes and J. Sparud. Haskell ++: An Object-Oriented Extension of Haskell. Dep. of Comp. Science, Chalmers University, April'1995.Google Scholar
  8. [Jones95]
    Mark P. Jones. A System of Constructor Classes: overloading and implicit higher-order polymorphism. Journal of Functional Programming, 5(1), p.1–35, January'1995.Google Scholar
  9. [Laufer96]
    K. Laufer. Type Classes with Existential Types. Journal of Functional Programming, 6(3), p. 485–517, May'1996.Google Scholar
  10. [LauPey96]
    J. Launchbury and S.L. Peyton Jones. State in Haskell. Lisp and Symbolic Computation, 8(4), p. 293–341, 1996.Google Scholar
  11. [MatYon93]
    S. Matsuoka and A. Yonezawa. Analysis of Inheritance Anomaly in Object-Oriented Concurrent Programming Languages. Research Directions in Concurrent Object-Oriented Programming (Agha and al., editors), MIT-Press, 1993.Google Scholar
  12. [MitWe194]
    S.E. Mitchell and A.J. Wellings. Synchronisation, Concurrent, Object-Oriented Programming and the Inheritance Anomaly. Tech.Rep., Dep. Comp. Sc., York University, June'1994.Google Scholar
  13. [Moggi89]
    Eugenio Moggi. Computational lambda-calculus and monads. In Proceedings of IEEE Symposium on Logic in Computer Science, California, June' 1989.Google Scholar
  14. [MooHam96]
    B.J. Moose and K. Hammond (editors). Report on the Programming Language Haskell, A Non-Strict Purely Functional Language, Version 1.3. Research Report YALE/DCS/RR-1106, Yale University, March'1996.Google Scholar
  15. [Odersk9l]
    Martin Odersky. Objects and Subtyping in a Functional Perspective. IBM Research Report RC 16423, January'1991Google Scholar
  16. [PieTur94]
    B. Pierce and D. Turner. Simple type-theoretic foundations for objectoriented programming. Journal of Functional Programming, 4(2), p. 207–247, April' 1994.Google Scholar
  17. [PGF96]
    S.P. Jones, A. Gordon and S. Finne. Concurrent Haskell. Proceedings of the 23rd ACM Symposium on POPL, Florida, January'1996.Google Scholar
  18. [RGGG96]
    B.C. Ruiz, J.E. Gallardo, P. Guerrero and F. Gutiérrez. Clasificación de objetos funcionales en entornos concurrentes. In Proceeding of APPIA-GULP-PRODE'96 (M. Navarro, editor), p. 581–584, San Sebastián (Spain), 1996.Google Scholar
  19. [Shibay90]
    Etsuya Shibayama. Reuse of concurrent, object, descriptions. In Proceeding of TOOLS 3 (Meyer et al., eds), p. 254–266, 1990.Google Scholar
  20. [SHBM96]
    F. Sánchez, J. Hernández, M. Barrena and J.M. Murillo. Composición de restricciones de Sincronización en Lenguajes Concurrentes Orientados a Objects. In Proceeding of II Jornadas de Informática (B. Clares, editor), Almuñecar (Spain), July'1996.Google Scholar
  21. [ThoTof94]
    Lars Thorup and Mads Tofte. Object-Oriented Programming and Standard ML. ACM Workshop on ML and its Applications, Orlando, June' 1994.Google Scholar
  22. [Wadler92]
    Philip Wadler. The essence of functional programming. In Proceeding of 19'th ACM Symposium on Principles of Programming Languages, Santa Fe, January'1992.Google Scholar
  23. [Wallac95]
    Malcolm Wallace. Functional Programming and Embedded Systems. PhD Thesis; York University, Dp. of Computer Science, January'1995.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • José E. Gallardo
    • 1
  • Francisco Gutiérrez
    • 1
  • Blas C. Ruiz
    • 1
  1. 1.Dpto. de Lenguajes y Ciencias de la Computaciön E.T.S.I. InformáticaMálagaSpain

Personalised recommendations