A Monadic Implementation of Functional Logic Programs
Michael Hanus, Kai-Oliver Prott, Finn Teegen

TL;DR
This paper introduces a monadic approach to implementing functional logic programs in Haskell, supporting memoization and advanced features, leading to improved performance over existing Curry compilers.
Contribution
It presents a novel monadic transformation supporting memoization and advanced features in functional logic programming within a purely functional environment.
Findings
Supports memoization of non-deterministic choices in Haskell
Includes functional patterns and encapsulated search features
Achieves performance surpassing current Curry compilers
Abstract
Functional logic languages are a high-level approach to programming by combining the most important declarative features. They abstract from small-step operational details so that programmers can concentrate on the logical aspects of an application. This is supported by appropriate evaluation strategies. Demand-driven evaluation from functional programming is amalgamated with non-determinism from logic programming so that solutions or values are computed whenever they exist. This frees the programmer from considering the influence of an operational strategy on the success of a computation, but it is a challenge to the language implementer. A non-deterministic demand-driven strategy might duplicate unevaluated choices of an expression, which could duplicate the computational effort. In recent implementations, this problem has been tackled by adding a kind of memoization of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
