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

Pre-Proceedings of the 27th International Workshop on Functional and Logic Programming (WFLP 2019), CoRR, 2019

FlatCurry is a well-established intermediate representation of Curry programs used in compilers that translate Curry code into Prolog and Haskell code. Some FlatCurry constructs have no direct translation into imperative code. These constructs must be each handled differently when translating Curry code into C, C++ and 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 of ICurry and the translation from FlatCurry to ICurry. We present a model of functional logic computations as graph rewriting, show how this model can be implemented in a low-level imperative language, and describe the translation from ICurry to this model.

PDF (289 KB) BibTeX-Entry Online