skip to main content
article
Free Access

Toward automatic program synthesis

Published:01 March 1971Publication History
Skip Abstract Section

Abstract

An elementary outline of the theorem-proving approach to automatic program synthesis is given, without dwelling on technical details. The method is illustrated by the automatic construction of both recursive and iterative programs operating on natural numbers, lists, and trees.

In order to construct a program satisfying certain specifications, a theorem induced by those specifications is proved, and the desired program is extracted from the proof. The same technique is applied to transform recursively defined functions into iterative programs, frequently with a major gain in efficiency.

It is emphasized that in order to construct a program with loops or with recursion, the principle of mathematical induction must be applied. The relation between the version of the induction rule used and the form of the program constructed is explored in some detail.

References

  1. 1 Ashcroft, E. A. Mathematical logic applied to the semantics of computer programs. Ph.D. Thesis, 1970, Imperial College, London.Google ScholarGoogle Scholar
  2. 2 Brice, C., and Derksen, J. A heuristically guided equality rule in a resolution theorem prover. Tech. Note 45, Stanford Res. Inst., Artificial Intelligence Group, Menlo Park, Calif.Google ScholarGoogle Scholar
  3. 3 Burstall, R. M. Proving properties of programs by structural induction. Comp. J. 12, 1 (1969), 41---48.Google ScholarGoogle ScholarCross RefCross Ref
  4. 4 ----. Formal description of program structure and semantics in first-order logic. In Machine Intelligence 5, Meltzer and Michie, Eds., Edinburgh U. Press, Edinburgh, 1970, pp. 79-98.Google ScholarGoogle Scholar
  5. 5 Floyd, R. W. Assigning meaning to programs. In Proc. Symposia in Applied Mathematics, Vol. 19, American Mathematical Society, 1967, pp. 19-32.Google ScholarGoogle ScholarCross RefCross Ref
  6. 6 Green, C. Application of theorem proving to problem solving. Proc. International Joint Conf. on Artificial Intelligence, Washington, D.C., 1969.Google ScholarGoogle ScholarCross RefCross Ref
  7. 7 ----. The application of theorem proving to question-answering systems. Ph.D. Thesis, 1969, Stanford U., Standford, Calif. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8 ----, and Raphael, B. The use of theorem-proving techniques in question-anwering systems. Proc. 23rd Nat. Conf. ACM. Brandon/Systems Press, Princeton, N. J., 1968. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9 Hayes, P. J. A machine-oriented formulation of the extended functional calculus. Memo 62, Stanford Artificial Intelligence Proj., Stanford U., Stanford, Calif., 1969. Also appeared as Metamathematics Unit Report, U. of Edinburgh, Scotland.Google ScholarGoogle Scholar
  10. 10 King, J. A program verifier. Ph.D. Thesis, 1969, Carnegie-Mellon U., Pittsburgh, Pa. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11 ----, and Floyd, R. W. Interpretation Oriented Theorem Prover Over Integers. Second Ann. ACM Symp. on Theory of Computing, Northampton, Mass., 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12 Luckham, D., and Nilsson, N. J. Extracting information from resolution proof trees. Tech. Note 32, Stanford Res. Inst., Artificial Intelligence Group, Menlo Park, Calif., 1970.Google ScholarGoogle Scholar
  13. 13 Manna, Z. The correctness of programs. J. Computer and System Sciences 3, 2, (1969), 119-127.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14 ----, and McCarthy, J. Properties of programs and partial function logic. In Machine Intelligence 5, Meltzer and Michie, Eds., Edinburgh U. Press, Edinburgh, 1970, pp. 79-98.Google ScholarGoogle Scholar
  15. 15 ----, and Pnueli, A. Formalization of Properties of Functional Programs. J. ACM 17, 3 (1970), 555-569. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16 McCarthy, J. Towards a mathematical science of computation. Proc. iviP Cong. 1962, North-Holland Pub. Co., Amsterdam.Google ScholarGoogle Scholar
  17. 17 ----. A Basis for a Mathematical Theory of Computation. In Computer Programming and Formal Systems, Braffort and Hirshberg, Eds., North Holland Pub. Co., Amsterdam, 1963.Google ScholarGoogle Scholar
  18. 18 ----. Predicate calculus with "undefined" as a truth-value. Memo 1, Stanford Artificial Intelligence Proj. Stanford U., 1963.Google ScholarGoogle Scholar
  19. 19 Mendelson, E. Introduction to Mathematical Logic. Van Nostrand, Princeton, N. J., 1964. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20 Morris, J. B. E-resolution: extension of resolution to include the equality relation. Proc. International Joint Conf. on Artificial Intelligence, Washington, D. C., 1969.Google ScholarGoogle Scholar
  21. 21 Park, D. Fixpoint induction and proofs of program properties. In Machine Intelligence 5. Meltzer and Michie, Eds., Edinburgh U. Press, Edinburgh, pp. 59-78.Google ScholarGoogle Scholar
  22. 22 Patterson, M. S. and Hewitt, C. E. Comparative Schematology, Part 1. Artificial Intel. Memo No. 201, Mrr, 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23 Robinson, I. A machine-oriented logic based on the resolution principle. J. ACM 12, 1 (Jan. 1965), 23--41. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24 Scott, D. A type-theoretical alternative to CUCH, ISWlM, OWHY. Unpublished memo, 1969.Google ScholarGoogle Scholar
  25. 25 Simon, H. Experiments with a heuristic compiler. J. ACM, 10, 4 (Oct. 1963), 493-506. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26 Slagle, J. Experiments with a deductive question-answering program. Comm. ACM 8, 12 (Dec. 1965), 792-798. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27 Strong, H. R. Translating recursion equations into flow charts. Second Ann. ACM Symp. on Theory of Computing, Northampton, Mass., 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28 Waldinger, R. J. Constructing programs automatically using theorem proving. Ph.D. Thesis, 1969, Carnegie-Mellon U., Pittsburgh, Pa.Google ScholarGoogle Scholar
  29. 29 ----, and Lee, R. C. T. PROW: a step toward automatic program writing. Proc. International Joint Conf. on Artificial Intelligence, Washington, D.C., 1969.Google ScholarGoogle Scholar

Index Terms

  1. Toward automatic program synthesis
      Index terms have been assigned to the content through auto-classification.

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image Communications of the ACM
        Communications of the ACM  Volume 14, Issue 3
        March 1971
        51 pages
        ISSN:0001-0782
        EISSN:1557-7317
        DOI:10.1145/362566
        Issue’s Table of Contents

        Copyright © 1971 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 1 March 1971

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader