Derived Preconditions and Their Use in Program Synthesis

In this paper we pose and begin to explore a deductive problem more general than that of finding a proof that a given goal formula logically follows from a given set of hypotheses. The problem is most simply stated in the propositional calculus: given a goal A and hypothesis H we wish to find a formula P, called a precondition, such that A logically follows from P ∧ H. A precondition provides any additional conditions under which A can be shown to follow from H. A slightly more complex definition of preconditions in a first-order theory is given and used throughout the paper. A formal system based on natural deduction is presented in which preconditions can be derived. A number of examples are then given which show how derived preconditions are used in a program synthesis method we are developing. These uses include theorem proving, formula simplification, simple code generation, the completion of partial specifications for a subalgorithm, and other tasks of a deductive nature.

[1]  Gérard D. Guiho,et al.  Program Synthesis from Incomplete Specifiactions , 1980, CADE.

[2]  Nils J. Nilsson,et al.  Principles of Artificial Intelligence , 1980, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[3]  Donald W. Loveland,et al.  Automated theorem proving: a logical basis , 1978, Fundamental studies in computer science.

[4]  W. W. Bledsoe,et al.  Non-Resolution Theorem Proving , 1977, Artif. Intell..

[5]  Raymond Reiter,et al.  A Semantically Guided Deductive System for Automatic Theorem Proving , 1973, IEEE Transactions on Computers.

[6]  Zohar Manna,et al.  A Deductive Approach to Program Synthesis , 1979, TOPL.

[7]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[8]  Wolfgang Bibel,et al.  Syntax-Directed, Semantics-Supported Program Synthesis , 1979, Artif. Intell..

[9]  Douglas R. Smith A Design for an Automatic Programming System , 1981, IJCAI.