This thesis discusses the idea of using domain specific languages for program transformation, and the application, implementation and analysis of one such domain specific\ud language that combines rewrite rules for transformation and uses temporal logic to express its side conditions. We have conducted three investigations.\ud - An efficient implementation is described that is able to generate compiler optimizations from temporal logic specifications. Its description is accompanied by an\ud empirical study of its performance.\ud - We extend the fundamental ideas of this language to source code in order to write\ud bug fixing transformations. Example transformations are given that fix common\ud bugs within Java programs. The adaptations to the transformation language are\ud described and a sample implementation which can apply these transformations is\ud provided.\ud - We describe an approach to the formal analysis of compiler optimizations that\ud proves that the optimizations do not change the semantics of the program that\ud they are optimizing. Some example proofs are included.\ud The result of these combined investigations is greater than the sum of their parts.\ud By demonstrating that a declarative language may be efficiently applied and formally reasoned about satisfies both theoretical and practical concerns, whilst our extension\ud towards bug fixing shows more varied uses are possible
To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.