Abstract

We present a program transformation methodology which is based on the invention of the so-called eureka definitions necessary for improving program efficiency. We propose a strategy, called loop absorption, for the automatic generation of those definitions in the case of definite logic programs, and we show its use for partial deduction. The problem of finding the eureka definitions is formalized as the search for suitable trees of clauses, called foldable U-trees, which are derived by unfolding the initial programs. It is possible, in general, to construct foldable U-trees if one uses the generalization rule. This rule should be applied with parsimony because it may reduce the efficiency of the derived programs. For overcoming this inconvenience, we propose a generalization strategy. We also study the properties of that strategy, together with the loop absorption, and we show that some techniques for partial deduction correspond to particular ways of applying our program derivation methodology.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call