Inheritance and Selective Methods Dispatching in Concurrent Haskell

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.

[1]  Mark P. Jones,et al.  A system of constructor classes: overloading and implicit higher-order polymorphism , 1993, FPCA '93.

[2]  Giuseppe Castagna A Meta-Language for Typed Object-Oriented Languages , 1995, Theor. Comput. Sci..

[3]  Konstantin Läufer Type Classes with Existential Types , 1996, J. Funct. Program..

[4]  Satoshi Matsuoka,et al.  Analysis of inheritance anomaly in object-oriented concurrent programming languages , 1993 .

[5]  Andy J. Wellings,et al.  Synchronisation, Concurrent Object-Oriented Programming and the Inheritance Anomaly , 1996, Comput. Lang..

[6]  Svend Frølund,et al.  Inheritance of Synchronization Constraints in Concurrent Object-Oriented Programming Languages , 1992, ECOOP.

[7]  Simon L. Peyton Jones,et al.  Report on the programming language Haskell: a non-strict, purely functional language version 1.2 , 1992, SIGP.

[8]  Simon L. Peyton Jones,et al.  Concurrent Haskell , 1996, POPL '96.

[9]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[10]  Kim B. Bruce A paradigmatic object-oriented programming language: Design, static typing and semantics , 1994, Journal of Functional Programming.

[11]  Etsuya Shibayama,et al.  Reuse of Concurrent Object Descriptions , 1991, Concurrency: Theory, Language, And Architecture.

[12]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[13]  Simon L. Peyton Jones,et al.  State in Haskell , 1995, LISP Symb. Comput..

[14]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[15]  Malcolm Wallace,et al.  Functional programming and embedded systems , 1995 .

[16]  Benjamin C. Pierce,et al.  Simple type-theoretic foundations for object-oriented programming , 1994, Journal of Functional Programming.

[17]  Francisco Gutiérrez,et al.  Clasificacion de Objetos Funcionales en Entornos Concurrentes , 1996, APPIA-GULP-PRODE.