by Sergio Antoy, Michael Hanus, Andy Jost, Steven Libby

Proceedings of the Conference on Declarative Programming (DECLARE 2019), Springer LNCS 12057, pp. 286-307, 2020

FlatCurry is a well-established intermediate representation of Curry programs used in compilers that translate Curry code into Prolog or Haskell code. Some FlatCurry constructs have no direct translation into imperative code. These constructs must be each handled differently when translating Curry code into, e.g., C, C++ or Python code. We introduce a new representation of Curry programs, called ICurry, and derive a translation from all FlatCurry constructs into ICurry. We present the syntax and semantics of ICurry and the translation from FlatCurry to ICurry. We present a model of functional logic computations as graph rewriting and show how this model can be implemented with ICurry in a low-level imperative language.

Preprint (PDF) BibTeX-Entry Online