Lecture Notes in Computer Science, 2001, Volume 2011/2001, 89-106, DOI: 10.1007/3-540-45361-X_6

ObjectCurry:An Object-Oriented Extension of the Declarative Multi-Paradigm Language Curry

Michael Hanus, Frank Huch and Philipp Niederau

View Related Documents

Abstract

Curry combines the concepts of functional, logic and concurrent programming languages. Concurrent programming with ports allows the modeling of objects in Curry similar to object-oriented programming languages. In this paper, we present ObjectCurry, a conservative extension of Curry. ObjectCurry allows the direct definition of templates which play the role of classes in conventional object-oriented languages. Objects are instances of a template. An object owns a state and reacts when it receives a message--usually by sending messages to other objects or a transformation of its state. ObjectCurry also provides inheritance between templates. Furthermore, we show how programs can be translated from ObjectCurry into Curry by exploiting the concurrency and distribution features of Curry. To implement inheritance, we extend the type system of Curry, which is based on parametric polymorphism, to include subtyping for objects and messages.
This research has been partially supported by the German Research Council (DFG) under grant Ha 2457/1-2 and by the DAAD under the PROCOPE programme.

Fulltext Preview

Image of the first page of the fulltext document