• DocumentCode
    970559
  • Title

    Program Reusability through Program Transformation

  • Author

    Boyle, James M. ; Muralidharan, Monagur N.

  • Author_Institution
    Mathematics and Computer Science Division, Argonne National Laboratory, Argonne, IL 60439.
  • Issue
    5
  • fYear
    1984
  • Firstpage
    574
  • Lastpage
    588
  • 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
    Computer science; Contracts; Debugging; Equations; Laboratories; Linear programming; Mathematics; Packaging; Writing;
  • fLanguage
    English
  • Journal_Title
    Software Engineering, IEEE Transactions on
  • Publisher
    ieee
  • ISSN
    0098-5589
  • Type

    jour

  • DOI
    10.1109/TSE.1984.5010281
  • Filename
    5010281