Functional Logic Design Patterns

We introduce a handful of software design patterns for functional logic languages. Following usual approaches, for each pattern we propose a name and we describe its intent, applicability, structure, consequences, etc. Our patterns deal with data type construction, identifier declarations, mappings, search, non-determinism and other fundamental aspects of the design and implementation of programs. We present some problems and we show fragments of programs that solve these problems using our patterns. The programming language of our examples is Curry. The complete programs are available on-line.

[1]  M. Hanus,et al.  Curry: An Integrated Functional Logic Language , 2003 .

[2]  Francisco Javier López-Fraguas,et al.  TOY: A Multiparadigm Declarative System , 1999, RTA.

[3]  Michael Hanus,et al.  Curry: an integrated functional logic language (version 0 , 2003 .

[4]  Michael Hanus,et al.  The integration of functions into logic programming: a survey , 1994 .

[5]  Francisco Javier López-Fraguas,et al.  An Approach to Declarative Programming Based on a Rewriting Logic , 1999, J. Log. Program..

[6]  Java design patterns: a tutorial , 2000 .

[7]  Michael Hanus,et al.  Improving Control of Logic Programs by Using Functional Logic Languages , 1992, PLILP.

[8]  Michael Hanus,et al.  A Functional Logic Programming Approach to Graphical User Interfaces , 2000, PADL.

[9]  Michael Hanus,et al.  Efficient Translation of Lazy Functional Logic Programs into Prolog , 1995, LOPSTR.

[10]  Johan Boye,et al.  S-SLD-resolution - An Operational Semantics for Logic Programs with External Procedures , 1991, PLILP.

[11]  David Scott Warren,et al.  Efficient Top-Down Computation of Queries under the Well-Founded Semantics , 1995, J. Log. Program..

[12]  Ellis Horowitz,et al.  Fundamentals of Computer Algorithms , 1978 .

[13]  Michael Hanus,et al.  High-Level Server Side Web Scripting in Curry , 2001, PADL.

[14]  Erik Meijer Server side web scripting in Haskell , 2000, J. Funct. Program..

[15]  Zoltan Somogyi,et al.  The Execution Algorithm of Mercury, an Efficient Purely Declarative Logic Programming Language , 1996, J. Log. Program..

[16]  J. C. Gonz Alez-Moreno,et al.  An Approach to Declarative Programming Based on a Rewriting Logic , 2022 .

[17]  Manuel V. Hermenegildo,et al.  The ciao prolog system , 2002 .

[18]  Michael Hanus,et al.  An implementation of narrowing strategies , 2001, PPDP '01.

[19]  John W. Lloyd,et al.  Programming in an Integrated Functional and Logic Language , 1999, J. Funct. Log. Program..

[20]  Sergio Antoy Optimal Non-deterministic Functional Logic Computations , 1997, ALP/HOA.

[21]  Gert Smolka,et al.  Encapsulated Search for Higher-order Concurrent Constraint Programming , 1994, ILPS.

[22]  Patrick Lincoln,et al.  Le Fun: Logic, Equations and Functions , 1987, SLP.

[23]  Ramin Sadre,et al.  Pakcs: The portland aachen kiel curry system , 2000 .

[24]  Michael Hanus,et al.  Controlling Search in Declarative Programs , 1998, PLILP/ALP.

[25]  Michael Hanus,et al.  A unified computation model for functional and logic programming , 1997, POPL '97.

[26]  Michael Hanus,et al.  Analysis of Residuating Logic Programs , 1995, J. Log. Program..

[27]  Gerhard Goos,et al.  Computer Science Today: Recent Trends and Developments , 1995 .

[28]  Vijay A. Saraswat,et al.  Concurrent constraint programming , 1989, POPL '90.

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

[30]  Gert Smolka The Oz Programming Model , 1996 .

[31]  Martin Erwig,et al.  Functional programming with graphs , 1997, ICFP '97.

[32]  Rafael Caballero,et al.  A Functional-Logic Perspective on Parsing , 1999, Fuji International Symposium on Functional and Logic Programming.

[33]  Ramin Sadre,et al.  An Abstract Machine for Curry and Its Concurrent Implementation in Java , 1999, J. Funct. Log. Program..

[34]  Lee Naish,et al.  Adding equations to NU-Prolog , 1991, PLILP.

[35]  Ralf Hinze,et al.  Haskell 98 — A Non−strict‚ Purely Functional Language , 1999 .

[36]  Jeff Langr Essential Java Style: Patterns for Implementation , 1999 .

[37]  Koen Claessen,et al.  Structuring graphical paradigms in TkGofer , 1997, ICFP '97.

[38]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[39]  Michael Hanus,et al.  Compiling Multi-Paradigm Declarative Programs into Prolog , 2000, FroCoS.

[40]  Michael Hanus,et al.  Distributed Programming in a Multi-Paradigm Declarative Language , 1999, PPDP.

[41]  Hassan Aït-Kaci,et al.  An Overview of LIFE , 1990, East/West Database Workshop.

[42]  James W. Cooper,et al.  Java design patterns , 2000 .