Combining Proof Plans with Partial Order Planning for Imperative Program Synthesis

The structured programming literature provides methods and a wealth of heuristic knowledge for guiding the construction of provably correct imperative programs. We investigate these methods and heuristics as a basis for mechanizing program synthesis. Our approach combines proof planning with conventional partial order planning. Proof planning is an automated theorem proving technique which uses high-level proof plans to guide the search for proofs. Proof plans are structured in terms of proof methods, which encapsulate heuristics for guiding proof search. We demonstrate that proof planning provides a local perspective on the synthesis task. In particular, we show that proof methods can be extended to represent heuristics for guiding program construction. Partial order planning complements proof planning by providing a global perspective on the synthesis task. This means that it allows us to reason about the order in which program fragments are composed. Our hybrid approach has been implemented in a semi-automatic system called Bertha. Bertha supports partial correctness and has been tested on a wide range of non-trivial programming examples.

[1]  Richard J. Boulton,et al.  An Interface between Clam and HOL , 1998, TPHOLs.

[2]  Pat Langley Relevance and insight in experimental studies , 1996 .

[3]  Andrew Ireland,et al.  An Integration of Program Analysis and Automated Theorem Proving , 2004, IFM.

[4]  Edsger W. Dijkstra,et al.  The humble programmer , 1972, CACM.

[5]  Andrew Ireland,et al.  Invariant Discovery via Failed Proof Attempts , 1998, LOPSTR.

[6]  Andrew Ireland,et al.  Productive use of failure in inductive proof , 1996, Journal of Automated Reasoning.

[7]  Gerald Jay Sussman,et al.  A Computer Model of Skill Acquisition , 1975 .

[8]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[9]  Rodney J. Douglas KIDS: A Semi-Automatic Program Development System , 1990 .

[10]  Ian Green,et al.  Automatic Synthesis of Recursive Programs: The Proof-Planning Paradigm , 2004, Automated Software Engineering.

[11]  Frank van Harmelen,et al.  Rippling: a heuristic inductive proofs for guiding , 1993 .

[12]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[13]  Nachum Dershowitz,et al.  Synthetic Programming , 1985, Artificial Intelligence.

[14]  David Gries An Illustration of Current Ideas on the Derivation of Correctness Proofs and Correct Programs , 1976, IEEE Transactions on Software Engineering.

[15]  David Gries,et al.  The Science of Programming , 1981, Text and Monographs in Computer Science.

[16]  Michael J. C. Gordon,et al.  Edinburgh LCF: A mechanised logic of computation , 1979 .

[17]  Frank van Harmelen,et al.  Rippling: A Heuristic for Guiding Inductive Proofs , 1993, Artif. Intell..

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

[19]  R AptKrzysztof Ten Years of Hoare's Logic: A SurveyPart I , 1981 .

[20]  R. Geoff Dromey,et al.  Program derivation - the development of programs from specifications , 1990, International computer science series.

[21]  Alan Bundy,et al.  Automatic verification of functions with accumulating parameters , 1999, Journal of Functional Programming.

[22]  A. Bundy,et al.  Turning eureka steps into calculations in automatic program synthesis , 1990 .

[23]  Dusko Pavlovic,et al.  Composition and refinement of behavioral specifications , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[24]  Ian Green,et al.  Automating the synthesis of functional programs , 2007 .

[25]  Michael R. Lowry,et al.  AMPHION: Automatic Programming for Scientific Subroutine Libraries , 1994, ISMIS.

[26]  John Levine,et al.  O-Plan: A Web-Based AI Planning Agent , 2000, AAAI/IAAI.

[27]  Andrew Ireland,et al.  Invariant Patterns for Program Reasoning , 2004, MICAI.

[28]  Andrew Ireland,et al.  The Use of Planning Critics in Mechanizing Inductive Proofs , 1992, LPAR.

[29]  Zohar Manna,et al.  Studies In Automatic Programming Logic , 1977 .

[30]  Krzysztof R. Apt,et al.  Ten Years of Hoare's Logic: A Survey—Part I , 1981, TOPL.

[31]  Pierre Flener,et al.  Schema-guided synthesis of constraint logic programs , 1998, Proceedings 13th IEEE International Conference on Automated Software Engineering (Cat. No.98EX239).

[32]  Betty H. C. Cheng,et al.  Applying Formal Methods in Automated Software Development , 1994 .

[33]  John G. P. Barnes,et al.  High Integrity Software - The SPARK Approach to Safety and Security , 2003 .

[34]  Carroll Morgan,et al.  Programming from specifications , 1990, Prentice Hall International Series in computer science.

[35]  Douglas R. Smith,et al.  Toward a Classification Approach to Design , 1996, AMAST.

[36]  H. Christensen Synthesis of Programs from Logic Specifications Using Programming Methodology , 1993, Struct. Program..

[37]  Carroll Morgan,et al.  Programming from specifications (2nd ed.) , 1994 .

[38]  M. Gordon HOL: A Proof Generating System for Higher-Order Logic , 1988 .

[39]  Roland Carl Backhouse,et al.  Program construction and verification , 1986, PHI Series in computer science.

[40]  Alan Bundy,et al.  Extensions to a Generalization Critic for Inductive Proof , 1996, CADE.

[41]  Andrew Ireland,et al.  Automation for exception freedom proofs , 2003, 18th IEEE International Conference on Automated Software Engineering, 2003. Proceedings..

[42]  Andrew Ireland,et al.  On the Automatic Discovery of Loop Invariants , 1997 .

[43]  Frank van Harmelen,et al.  The Oyster-Clam System , 1990, CADE.

[44]  Robert S. Boyer,et al.  Computational Logic , 1990, ESPRIT Basic Research Series.

[45]  George W. Ernst,et al.  GPS : a case study in generality and problem solving , 1971 .

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

[47]  Andrew Ireland,et al.  Proof planning for strategy development , 2001, Annals of Mathematics and Artificial Intelligence.

[48]  Michael J. C. Gordon,et al.  Mechanizing programming logics in higher order logic , 1989 .

[49]  Richard Waldinger,et al.  Achieving several goals simultaneously , 1977 .

[50]  Anne Kaldewaij,et al.  Programming - the derivation of algorithms , 1990, Prentice Hall international series in computer science.

[51]  Andrew Ireland,et al.  Towards automatic imperative program synthesis through proof planning , 1999, 14th IEEE International Conference on Automated Software Engineering.

[52]  Austin Tate,et al.  Generating Project Networks , 1977, IJCAI.

[53]  Alan Bundy,et al.  The Use of Explicit Plans to Guide Inductive Proofs , 1988, CADE.

[54]  Subbarao Kambhampati,et al.  Planning as Refinement Search: A Unified Framework for Evaluating Design Tradeoffs in Partial-Order Planning , 1995, Artif. Intell..

[55]  Alan Bundy,et al.  Logic Program Synthesis via Proof Planning , 1992, LOPSTR.

[56]  Toby Walsh,et al.  A calculus for and termination of rippling , 1996, Journal of Automated Reasoning.

[57]  Douglas R. Smith,et al.  KIDS: A Semiautomatic Program Development System , 1990, IEEE Trans. Software Eng..

[58]  Michael J. C. Gordon,et al.  Programming language theory and its implementation , 1988 .

[59]  Pierre Flener,et al.  Program schemas as proof methods. , 2003 .

[60]  Annalisa Bossi Logic-Based Program Synthesis and Transformation , 1999, Lecture Notes in Computer Science.