Functional Logic Program Transformations
Michael Hanus, Steven Libby

TL;DR
This paper demonstrates how functional logic programming features facilitate implementing program transformations more compactly and understandably, especially for tools like compilers and analyzers, by using non-deterministic operations.
Contribution
It introduces a novel approach to program transformations using partially defined, non-deterministic operations in functional logic programming, and compares it with deterministic methods.
Findings
Non-deterministic transformations are more concise and comprehensible.
Deterministic methods have less overhead but are less flexible.
Approach evaluated on Curry and FlatCurry representations.
Abstract
Many tools used to process programs, like compilers, analyzers, or verifiers, perform transformations on their intermediate program representation, like abstract syntax trees. Implementing such program transformations is a non-trivial task, since it is necessary to iterate over the complete syntax tree and apply various transformations at nodes in a tree. In this paper we show how the features of functional logic programming are useful to implement program transformations in a compact and comprehensible manner. For this purpose, we propose to write program transformations as partially defined and non-deterministic operations. Since the implementation of non-determinism usually causes some overhead compared to deterministically defined operations, we compare our approach to a deterministic transformation method. We evaluate these alternatives for the functional logic language Curry and…
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.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Model-Driven Software Engineering Techniques
