A technique for transformation of definite logic programs is presented. A first phase performs an analysis of the extended call/exit patterns of the source program. It is shown that a particular form of abstract call/exit patterns can be used as a guide to control the transformation itself and can help to generate the target program having desired properties. The technique provides a framework which, combined with problem specific information concerning the source program, can lead to nontrivial transformations.