Abstract
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.
Preview
Unable to display preview. Download preview PDF.
References
Ken Arnold and James Gosling. The Java Programming Language. Addison Wesley Longman, 1996.
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.
Gilles Barthe. Inheritance in type theory. Research Report, Nijmegen University, September'1995.
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.
Giuseppe Castagna. A meta-language for typed object-oriented languages. Theoretical Computer Science, 151(2), p. 297–352, November' 1995.
Svend Frølund. Inheritance of synchronization constraints in concurrent object-oriented programming languages. In Proceedings of ECOOP'92, LNCS 615, Springer Verlag 1992.
J. Hughes and J. Sparud. Haskell ++: An Object-Oriented Extension of Haskell. Dep. of Comp. Science, Chalmers University, April'1995.
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.
K. Laufer. Type Classes with Existential Types. Journal of Functional Programming, 6(3), p. 485–517, May'1996.
J. Launchbury and S.L. Peyton Jones. State in Haskell. Lisp and Symbolic Computation, 8(4), p. 293–341, 1996.
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.
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.
Eugenio Moggi. Computational lambda-calculus and monads. In Proceedings of IEEE Symposium on Logic in Computer Science, California, June' 1989.
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.
Martin Odersky. Objects and Subtyping in a Functional Perspective. IBM Research Report RC 16423, January'1991
B. Pierce and D. Turner. Simple type-theoretic foundations for objectoriented programming. Journal of Functional Programming, 4(2), p. 207–247, April' 1994.
S.P. Jones, A. Gordon and S. Finne. Concurrent Haskell. Proceedings of the 23rd ACM Symposium on POPL, Florida, January'1996.
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.
Etsuya Shibayama. Reuse of concurrent, object, descriptions. In Proceeding of TOOLS 3 (Meyer et al., eds), p. 254–266, 1990.
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.
Lars Thorup and Mads Tofte. Object-Oriented Programming and Standard ML. ACM Workshop on ML and its Applications, Orlando, June' 1994.
Philip Wadler. The essence of functional programming. In Proceeding of 19'th ACM Symposium on Principles of Programming Languages, Santa Fe, January'1992.
Malcolm Wallace. Functional Programming and Embedded Systems. PhD Thesis; York University, Dp. of Computer Science, January'1995.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1997 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Gallardo, J.E., Gutiérrez, F., Ruiz, B.C. (1997). Inheritance and selective method dispatching in concurrent Haskell. In: Glaser, H., Hartel, P., Kuchen, H. (eds) Programming Languages: Implementations, Logics, and Programs. PLILP 1997. Lecture Notes in Computer Science, vol 1292. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0033835
Download citation
DOI: https://doi.org/10.1007/BFb0033835
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-63398-3
Online ISBN: 978-3-540-69537-0
eBook Packages: Springer Book Archive