We describe a deductive technique for the automatic construction of recursive programs to meet given input-output specifications. These specifications express what conditions the output of the desired program is expected to satisfy. The deductive technique involves transforming the specifications by a collection of rules, summoned by pattern-directed function invocation. Some of these transformation rules express the semantics of the subject domain; others represent more general programming techniques. The rules that introduce conditional expressions and recursive calls into the program are discussed in some detail. The deductive techniques described are embedded in a running system called SYNSYS. This system accepts specifications expressed in high-level descriptive language and attempts to transform them into a corresponding LISP program. The transformation rules are expressed in the QLISP programming language. The synthesis of two programs performed by the system are presented. This research was supported in part by the Advanced Research Projects Agency of the Department of Defense under Contract MDA903-76-C-0206, by the National Science Foundation under Grant DCR72-03737 A01, by the Office of Naval Research under Contracts N00014-76-C-0687 and N00014-75-C-0816; and by a grant from the United States-Israel Binational Science Foundation (BSF), Jerusalem, Israel. The views and conclusions contained in this document are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of Stanford University, Stanford Research Institute, or the U.S. Government.
[1]
Edsger W. Dijkstra,et al.
A Discipline of Programming
,
1976
.
[2]
John Darlington,et al.
Some transformations for developing recursive programs
,
1975
.
[3]
Zohar Manna,et al.
Knowledge and Reasoning in Program Synthesis
,
1974,
IJCAI.
[4]
Niklaus Wirth,et al.
Algorithms + Data Structures = Programs
,
1976
.
[5]
David R. Barstow,et al.
Observations on the interaction between coding and efficiency knowledge in the PSI Program Synthesis System
,
1976,
ICSE '76.
[6]
Ben Wegbreit.
Goal-Directed Program Transformation
,
1976,
IEEE Trans. Software Eng..
[7]
Robert S. Boyer,et al.
Proving Theorems about LISP Functions
,
1973,
JACM.
[8]
H. Saunders,et al.
Book Reviews : THIN SHELL STRUCTURES - THEORY, EXPERIMENT & DESIGN Edited by: Y. C. Fung & E. E. Sechler Prentice-Hall Inc., Englewood Cliffs, New Jersey (1974)
,
1976
.