KiCS2: A New Compiler from Curry to Haskell

In this paper we present our first steps towards a new system to compile functional logic programs of the source language Curry into purely functional Haskell programs. Our implementation is based on the idea to represent non-deterministic results as values of the data types corresponding to the results. This enables the application of various search strategies to extract values from the search space. We show by several benchmarks that our implementation can compete with or outperform other existing implementations of Curry.

[1]  Lennart Augustsson,et al.  Functional Pearl: On generating unique names , 1994, Journal of Functional Programming.

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

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

[4]  Sergio Antoy Constructor-based conditional narrowing , 2001, PPDP '01.

[5]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

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

[7]  Wolfgang Lux Implementing Encapsulated Search for a Lazy Functional Logic Language , 1999, Fuji International Symposium on Functional and Logic Programming.

[8]  Sebastian Fischer,et al.  From Functional Logic Programs to Purely Functional Programs Preserving Laziness , 2008, IFL.

[9]  Sebastian Fischer,et al.  Transforming Functional Logic Programs into Monadic Functional Programs , 2010, WFLP.

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

[11]  J. S anchez Hern andez TO Y: A Multiparadigm Declarative System ? , 1999 .

[12]  Michael Hanus,et al.  Overlapping Rules and Logic Variables in Functional Logic Programs , 2006, ICLP.

[13]  Michael Hanus,et al.  Functional logic programming , 2010, CACM.

[14]  Bernd Brassel,et al.  On a Tighter Integration of Functional and Logic Programming , 2007, APLAS.

[15]  Bernd Brassel,et al.  The Kiel Curry System KiCS , 2009, INAP/WLP.

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

[17]  Bernd Brassel,et al.  Implementing Functional Logic Programs by Translation into Purely Functional Programs , 2012 .

[18]  L FranciscoJ.,et al.  A Simple Rewrite Notion for Call-time Choice Semantics , 2010 .

[19]  Sebastian Fischer,et al.  Purely functional lazy non-deterministic programming , 2009, Journal of Functional Programming.

[20]  Rita Loogen,et al.  Lazy Narrowing in a Graph Machine , 1990, ALP.

[21]  Juan Rodríguez-Hortalá,et al.  A simple rewrite notion for call-time choice semantics , 2007, PPDP '07.

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

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

[24]  Michael Hanus,et al.  High-Level Database Programming in Curry , 2008, PADL.

[25]  Sergio Antoy,et al.  The Pull-Tab Transformation , 2010 .

[26]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[27]  Michael Hanus,et al.  Type-oriented construction of web user interfaces , 2006, PPDP '06.

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

[29]  Sergio Antoy,et al.  On the correctness of pull-tabbing , 2011, Theory and Practice of Logic Programming.

[30]  Simon L. Peyton Jones,et al.  The Glasgow Haskell Compiler: A Retrospective , 1992, Functional Programming.

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

[32]  Pierre Lescanne,et al.  Algebraic and Logic Programming , 1988, Lecture Notes in Computer Science.

[33]  Tom Schrijvers,et al.  Functional and Logic Programming , 2012, Lecture Notes in Computer Science.

[34]  Will Partain,et al.  The nofib Benchmark Suite of Haskell Programs , 1992, Functional Programming.

[35]  Michael Hanus,et al.  A Virtual Machine for Functional Logic Computations , 2004, IFL.

[36]  Michael Hanus,et al.  An ER-Based Framework for Declarative Web Programming , 2010, PADL.

[37]  Michael Hanus,et al.  Functional Logic Design Patterns , 2002, FLOPS.

[38]  Philip Wadler,et al.  Packrat parsing:: simple, powerful, lazy, linear time, functional pearl , 2002, ICFP '02.

[39]  Sebastian Fischer A functional logic database library , 2005, WCFLP '05.

[40]  Frank Zartmann Denotational Abstract Interpretation of Functional Logic Programs , 1997, SAS.

[41]  Heinrich Hußmann,et al.  Nondeterministic Algebraic Specifications and Nonconfluent Term Rewriting , 1992, J. Log. Program..

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

[43]  Germán Vidal,et al.  Operational semantics for declarative multi-paradigm languages , 2005, J. Symb. Comput..

[44]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

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

[46]  Michael Hanus,et al.  Multi-paradigm Declarative Languages , 2007, ICLP.