Optimization of prolog programs by fully automated transformation procedure using Unfold/Fold strategy with homeomorhic embedding as a control heuristic.