4 PROGRAM TRANSFORMATIONS
Designing and applying program transformations also fall into the abstraction/instantiation paradigm. The same methodology can be used for this purpose as was used in the previous section for designing and applying program schemata. For example, to design a recursion-elimination transformation (such as in [8, 20, 22, 68]), we could first write, and verify, iterative versions of several recursive programs; then, by abstracting those programs, and their proofs, a general recursion-to-iteration transformation schema may be obtained. As we shall see, very little information is gleaned just by a comparison of output specifications; instead, most of the analogy needs to be derived from the programs themselves.
Consider ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access