Abstract
Monads are a technique widely used in functional programming languages to address many different problems. This paper presents extensions, a functional-logic programming technique that constitutes an alternative to monads in several situations. Extensions permit the definition of easily reusable functions in the same way as monads, but are based on simpler concepts taken from logic programming, and hence they lead to more appealing and natural definitions of types and functions. Moreover, extensions are compatible with interesting features typical of logic programming, like multiple modes of use, while monads are not.
Work was partially supported by the Spanish CICYT (project TIC98-0445-C03-02/97 “TREND”) and the ESPRIT Working Group 22457 (CCL-II).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
S. Antoy, R. Echahed, M. Hanus. A Needed Narrowing Strategy. 21st ACM Symp. on Principles of Programming Languages, 268–279, Portland 1994.
S. Antoy. Definitional Trees, In Proc. ALP’92, Springer LNCS 632, 1992, 143–157.
R. Caballero-Roldán, F.J. López-Fraguas and J. Sánchez-Hernández. User’s Manual For \( \mathcal{T}\mathcal{O}\mathcal{Y} \) . Technical Report D.I.A. 57/97, Univ. Complutense de Madrid 1997. The system is available at http://mozart.sip.ucm.es/incoming/toy.html
J.C. González-Moreno, T. Hortalá-González, F.J. López-Fraguas, M. Rodríguez-Artalejo. An Approach to Declarative Programming Based on a Rewriting Logic. Journal of Logic Programming, Vol 40(1), July 1999, pp 47–87.
M. Hanus. The Integration of Functions into Logic Programming: A Survey. J. of Logic Programming 19–20. Special issue “Ten Years of Logic Programming”, 583–628, 1994.
M. Hanus (ed.). Curry, an Integrated Functional Logic Language, Draft, February 1998. Available at http://www-ir.informatik.rwth-aachen.de/hanus/curry/report.htlm
Report on the Programming Language Haskell: a Non-strict, Purely Functional Language. Version 1.4, Peterson J. and Hammond K. (eds.), January 1997.
R. Loogen, F.J. López-Fraguas, M. Rodríguez-Artalejo. A Demand Driven Computation Strategy for Lazy Narrowing. Procs. of PLILP’93, Springer LNCS 714, 184–200, 1993.
Lloyd, J.W. Declarative Programming in Escher. Technical Report CSTR-95-013, Departament of Computer Science, University of Bristol, June 1995.
S.L. Peyton-Jones. The implementation of functional languages, Prentice Hall, 1987.
S.L. Peyton-Jones, P. Wadler. Imperative functional programming, 20 Annual Symposium on Principles of Programming Languages, Charleston, South Carolina, 1993.
F.J. López-Fraguas, J. Sánchez-Hérnandez. \( \mathcal{T}\mathcal{O}\mathcal{Y} \) : A Multiparadigm Declarative System. Proc. RTA’99, Springer LNCS 1631, 244–247, 1999.
P. Wadler. Comprehending Monads, Proc. ACM Conf. on Lisp and Functional Programming, 1990.
P. Wadler. The essence of functional programming, Proc. ACM conference on the Principles of Programming Languages, pages 1–14, 1992.
P. Wadler. Monads for functional programming. In J. Jeuring and E. Meijer editors, Lecture Notes on Advanced Functional Programming Techniques, Springer LNCS 925. 1995
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Caballero, R., López-Fraguas, F.J. (2000). Extensions: A Technique for Structuring Functional-Logic Programs. In: Bjøner, D., Broy, M., Zamulin, A.V. (eds) Perspectives of System Informatics. PSI 1999. Lecture Notes in Computer Science, vol 1755. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46562-6_26
Download citation
DOI: https://doi.org/10.1007/3-540-46562-6_26
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67102-2
Online ISBN: 978-3-540-46562-1
eBook Packages: Springer Book Archive