Logic Program Synthesis and Transformation