Summary
Here we give methods of mechanically converting programs that are easy to understand into more efficient ones, converting recursion equations using high level operations into lower level flowchart programs.
The main transformations involved are (i) recursion removal (ii) eliminating common subexpressions and combining loops (iii) replacing procedure calls by their bodies (iv) introducing assignments which overwrite list cells no longer in use (compiletime garbage collection).
Similar content being viewed by others
References
Burstall, R. M., Collins, J. S., Popplestone, R. J.: Programming in POP-2. Edinburgh: Edinburgh University Press 1971
Minsky, M.: Form and content in computer science. 1970 A.C.M. Turing Lecture. J. ACM 17, 197–215 (1970)
Dijkstra, E. W.: Notes on structured programming. Technische Hogeschool, Eindhoven, The Netherlands, TH Report 70-WSK-03, 2nd edition, 1970
Ambler, A. P., Burstall, R. M.: LIB POLYSETS. POP-2 Program Library Specification. Department of Machine Intelligence and Perception, University of Edinburgh, 1971
Strong, H.R., Jr.: Translating recursion equations into flow charts. Proc. 2nd Annual A.C.M. Symposium on Theory of Computing, New York 1970, p. 184–197
Garland, S. J., Luckham, D. C.: Program schemes, recursion schemes and formal languages. School of Engineering and Applied Science, University of California, Los Angeles, UCLA-ENG-7154, 1971
Cooper, D. C.: The equivalence of certain computations. Computer Journal 9, 45–52 (1966)
Darlington, J.: A semantic approach to automatic program improvement. Department of Machine Intelligence, University of Edinburgh, Ph.D. thesis. 1972
Ernst, G. W., Newell, A.: Generality and GPS. Carnegie Institute of Technology, Pittsburgh, Pennsylvania, 1967
Simon, H. A.: The heuristic compiler. In: Simon, H. A., Siklossy, L. (eds.): Representation and Meaning. New Jersey: Prentice Hall 1972
Topor, R. W.: Interactive program verification using virtual programs. Department of Artificial Intelligence, University of Edinburgh, Ph.D. thesis. 1975
Boyer, R. S., Moore, J. S.: Proving theorems about LISP functions. J. ACM 22, 129–144 (1975)
Sheridan, P. B.: The arithmetic translator-compiler of the IBM Fortran automatic coding system. Comm. ACM 2, 9 (1959)
Rohl, J. S., Lin, J. A.: A note on compiling arithmetic expressions. Computer Journal 15, 13–14 (1972)
Hopgood, F. R. A.: Compiling techniques. Computer monographs. London: Macdonald and New York: American Eisevier 1969
Burstall, R. M., Darlington, J.: Some transformations for developing recursive programs. Proc. of 1975 International Conference on Reliable Software, Los Angeles, 1975, p. 465–472 (to appear in Journal ACM)
Darlington, J.: Application of program transformation to program synthesis. Proc. of IRIA Symposium on Proving and Improving Programs, Arc-et-Senans, 1975, p. 133–144
Author information
Authors and Affiliations
Additional information
The operations we use are based on the POP-2 language, Burstall, Collins and Popplestone [1]. The main features to note are that hd is the LISP car, tl the LISP cdr and concat joins two lists (the LISP append).
Rights and permissions
About this article
Cite this article
Darlington, J., Burstall, R.M. A system which automatically improves programs. Acta Informatica 6, 41–60 (1976). https://doi.org/10.1007/BF00263742
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1007/BF00263742