Program transformation: Theoretical foundations and basic techniques. Part 1