Functional Logic Program Transformations

📅 2026-01-19
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work proposes a novel approach to program transformation—such as compiler optimizations—by systematically integrating non-determinism and partially defined operations from functional logic programming. Leveraging the Curry language and its FlatCurry intermediate representation, the method expresses transformation rules in a concise, declarative style through pattern matching and non-deterministic computation. Traditional approaches often involve intricate manipulations of intermediate representations like abstract syntax trees, leading to implementations that are both cumbersome and error-prone. In contrast, the proposed technique enhances expressiveness and readability while maintaining practical feasibility. Experimental evaluation demonstrates that this approach not only preserves code clarity but also achieves competitive performance in real-world transformation tools, offering a compelling alternative for implementing reliable and maintainable program transformations.

Technology Category

Application Category

📝 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 its intermediate representation FlatCurry which is used in various analysis and verification tools and compilers.
Problem

Research questions and friction points this paper is trying to address.

program transformation
functional logic programming
abstract syntax tree
intermediate representation
non-determinism
Innovation

Methods, ideas, or system contributions that make the work stand out.

functional logic programming
program transformation
non-determinism
Curry
FlatCurry
🔎 Similar Papers
No similar papers found.