Program Reusability through Program Transformation
- 1 September 1984
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. SE-10 (5), 574-588
- https://doi.org/10.1109/tse.1984.5010281
Abstract
How can a program written in pure applicative LISP be reused in a Fortran environment? One answer is by automatically transforming it from LISP into Fortran. In this paper we discuss a practical application of this technique-one that yields an efficient Fortran program. We view this process as an example of abstract programming, in which the LISP program constitutes an abstract specification for the Fortran version. The idea of strategy-a strategy for getting from LISP to Fortran-is basic to designing and applying the transformations. One strategic insight is that the task is easier if the LISP program is converted to ``recursive'' Fortran, and then the recursive Fortran program is converted to nonrecursive standard Fortran. Another strategic insight is that much of the task can be accomplished by converting the program from one canonical form to another. Developing a strategy also involves making various implementation decisions. One advantage of program transformation methodology is that it exposes such decisions for examination and review. Another is that it enables optimizations to be detected and implemented easily. Once a strategy has been discovered, it can be implemented by means of rewrite-rule transformations using the TAMPR program transformation system. The transformational approach to program reuse based on this strategy has a measure of elegance. It is also practical-the resulting Fortran program is 25 percent faster than its compiled LISP counterpart, even without extensive optimization.Keywords
This publication has 24 references indexed in Scilit:
- Software Development and Inferential ProgrammingPublished by Springer Nature ,1984
- Supercompilers - Extended AbstractPublished by Springer Nature ,1984
- Lisp to Fortran—Program Transformation AppliedPublished by Springer Nature ,1984
- Program Transformation SystemsACM Computing Surveys, 1983
- Transformational programmingPublished by Association for Computing Machinery (ACM) ,1983
- Finite Differencing of Computable ExpressionsACM Transactions on Programming Languages and Systems, 1982
- Combining Algebraic and Algorithmic Reasoning: An Approach to the Schorr-Waite AlgorithmACM Transactions on Programming Languages and Systems, 1982
- An optimizing compiler for lexically scoped LISPACM SIGPLAN Notices, 1982
- Program Improvement by Source-to-Source TransformationJournal of the ACM, 1977
- A Transformation System for Developing Recursive ProgramsJournal of the ACM, 1977