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.
The Loop Absorption and the Generalization Strategies for the Development of Logic Programs and Partial Deduction
Proietti M;
1993
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.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.