Foundations of logic programming
Foundations of logic programming
Optimizing almost-tail-recursive PROLOG programs
Proc. of a conference on Functional programming languages and computer architecture
Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
Detection and optimization of functional computations in Prolog
Proceedings on Third international conference on logic programming
A Transformation System for Developing Recursive Programs
Journal of the ACM (JACM)
A System for Assisting Program Transformation
ACM Transactions on Programming Languages and Systems (TOPLAS)
Some Techniques for Recursion Removal from Recursive Functions
ACM Transactions on Programming Languages and Systems (TOPLAS)
Recursion is more efficient than iteration
LFP '84 Proceedings of the 1984 ACM Symposium on LISP and functional programming
Transformations of FP program schemes
FPCA '81 Proceedings of the 1981 conference on Functional programming languages and computer architecture
Static inference of modes and data dependencies in logic programs
ACM Transactions on Programming Languages and Systems (TOPLAS)
Efficient dataflow analysis of logic programs
Journal of the ACM (JACM)
Journal of Symbolic Computation - Special issue on automatic programming
Higher-order expression procedures
PEPM '95 Proceedings of the 1995 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Rules and strategies for transforming functional and logic programs
ACM Computing Surveys (CSUR)
Parameter passing and control stack management in Prolog implementation revisited
ACM Transactions on Programming Languages and Systems (TOPLAS)
Calpa: a tool for automating selective dynamic compilation
Proceedings of the 33rd annual ACM/IEEE international symposium on Microarchitecture
Strictly declarative specification of sophisticated points-to analyses
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
Hi-index | 0.00 |
Programs typically spend much of their execution time in loops. This makes the generation of efficient code for loops essential for good performance. Loop optimization of logic programming languages is complicated by the fact that such languages lack the iterative constructs of traditional languages, and instead use recursion to express loops. In this paper, we examine the application of unfold/fold transformations to three kinds of loop optimization for logic programming languages: recursion removal, loop fusion and code motion out of loops. We describe simple unfold/fold transformation sequences for these optimizations that can be automated relatively easily. In the process, we show that the properties of unification and logical variables can sometimes be used to generalize, from traditional languages, the conditions under which these optimizations may be carried out. Our experience suggests that such source-level transformations may be used as an effective tool for the optimization of logic programs.