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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
S. Antoy, R. Echahed, and M. Hanus. A Needed Narrowing Strategy. Journal of the ACM,Vol. 47, No. 4, pp.776–822, 2000.
L. Damas and R. Milner. Principal type-schemes for functional programs. In Proc. 9th nnual Symposium on Principles of Programming Languages, pages 207–212, 1982.
M. Hanus. The integration of functions into logic programming:From theory to practice. Journal of Logic Programming,19& 20:583–628,1994.
M. Hanus. A unified computation model for functional and logic programming. In Proc.24th CM Symp. Principles of Programming Languages, pages 80–93, 1997.
M. Hanus. Distributed programming in a multi-paradigm declarative language. In Proc.of the International Conference on Principles and Practice of Declarative Programming (PPDP’ 99), pages 376–395. Springer LNCS 1702, 1999.
M. Hanus. Curry:An Integrated Functional Logic Language, 2000. http://www.informatik.uni-kiel.de/~curry/
J. Hughes and J. Sparud. Haskell++:An object-oriented extension of Haskell. In Proceedings of the Workshop on Haskell, La Jolla,California,YALE Research Report DCS/RR-1075, 1995.
S. Janson, J. Montelius, and S. Haridi. Ports for objects in concurrent logic programs.In G. Agha, P. Wegner, and A. Yonezawa, editors, Research Directions in Concurrent Object-Oriented Programming, pages 211–231. MITPress, London, 1993.
M.P. Jones. Typing Haskell in Haskell, 1999. In Proceedings of the Workshop on Haskell, Paris, France, Technical Report UU–CS–1999–28, University of Utrecht, 1999.
S. Kaes. Type inference in the presence of overloading, subtyping and recursive types. In 1992 CM Conference on Lisp and Functional Programming,pages 193–204. ACM, ACM, August 1992.
X. Leroy. The Objective Caml system. Technical report, 1996. http://pauillac.inria.fr/ocaml/.
P. Niederau. Object-oriented extension of a declarative language (in german). Master’ s thesis, RWTH Aachen, 2000.
J. Nordlander. Rationale for O 'Haskell, August 1999. http://www.cs.chalmers.se/~nordland/ohaskell/rationale.html
J. Nordlander. Reactive Objects and Functional Programming. PhD thesis, Chalmers Göteborg University, May 1999.
J. Peterson et al. Haskell:A non-strict, purely functional language (version 1.4). Technical report, Yale University, Yale, 1997.
E. Shapiro and A. Takeuchi. Object oriented programming in Concurent Prolog. New Generation Computing,1:25–48, 1983.
G. Smolka.The Oz programming model. In J. van Leeuwen, editor, Computer Science Today:Recent Trends and Developments, pages 324–343. Springer LNCS 1000, 1995.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hanus, M., Huch, F., Niederau, P. (2001). ObjectCurry:An Object-Oriented Extension of the Declarative Multi-Paradigm Language Curry. In: Mohnen, M., Koopman, P. (eds) Implementation of Functional Languages. IFL 2000. Lecture Notes in Computer Science, vol 2011. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45361-X_6
Download citation
DOI: https://doi.org/10.1007/3-540-45361-X_6
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41919-8
Online ISBN: 978-3-540-45361-1
eBook Packages: Springer Book Archive