Skip to main content
Log in

Termination preserving problem in the transformation of applicative programs

  • Published:
Journal of Computer Science and Technology Aims and scope Submit manuscript

Abstract

Program transformation is a promising area of software methodology. The Folding/Unfolding method proposed by Burstall/Darlington is a simple and powerful transformation method for applicative programs. The only operations used are folding and unfolding of function definitions and substitution using laws. The major drawback of this method is that only partial correctness of functions is preserved and termination may be lost. That is if functionf 1 is transformed tof n , the computation off n on an objectx will reach the same result of the computation off 1 onx, provided the computation terminates. But there may be objectsx, on which the computation off 1 terminates, butf n does not. This problem has not been solved with satisfaction. The idea of “reductive measure” of functions and “reductive” transformation is put forward here to solve the problem. It has been proved that if functions “complexity” is not increased under some reductive measure in the transformation process, termination will be preserved. The termination problem is thus solved to some extent. The most important thing is that the simplicity of the original method is fully preserved. Because with the help of FP algebraic laws, the new restriction is expressed completely syntatically. Namely, only the direction of using laws (algebraic equations) for substitution is restricted.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. J. Backus, Can programming be liberated from the Von Neumann style? a functional style and its algebra of programs.CACM,21:8 (1978).

    Google Scholar 

  2. J. Backus, The Algebra of Functional Programs; Function Level Reasoning, Linear Equations and Extended Definitions, Tech. Rept. IBM Research Lab., San Jose, California, Feb., 1981.

    Google Scholar 

  3. J. H. Williams, On the Development of the Algebra of Functional Programs. Tech. Rept., Rj2983, IBM Research Lab., San Jose, California, Oct., 1980.

    Google Scholar 

  4. R. M. Burstall and J. Darlington, A transformation system for developing recursive programs,JACM,23 1 (1977).

    Google Scholar 

  5. Huang Xuorong, Termination Preserving Problem in Program Transformation, Master's Thesis. Shanghai Jiaotong Univ., Jan., 1985.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Sun, Y., Lu, R. & Huang, X. Termination preserving problem in the transformation of applicative programs. J. of Comput. Sci. & Technol. 2, 191–201 (1987). https://doi.org/10.1007/BF02973504

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02973504

Keywords

Navigation