Improving Efficiency of Prolog Programs by Fully Automated Unfold/Fold Transformation

This paper is a contribution to improving computational efficiency of definite Prolog programs using Unfold/Fold (U/F) strategy with homeomorphic embedding as a control heuristic. Unfold/Fold strategy is an alternative to so called conjunctive partial deduction (CPD). The ECCE system is one of the best system for program transformations based on CPD. In this paper is presented a new fully automated system of program transformations based on U/F strategy. The experimental results, namely CPU times, the number of inferences, and the size of the transformed programs are included. These results are compared to the ECCE system and indicate that in many cases both systems have produced programs with similar or complementary efficiency. Moreover, a new method based on a simple combination of both systems is presented. This combination represents, to our best knowledge, the most effective transformation program for definite logic programs. In most cases, the combination significantly exceeds both the Unfold/Fold algorithm presented here and the results of the ECCE system. The experimental results with a complete comparison among these algorithms are included.