Abstract
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.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Armando, A., Smaill, A., and Green, I. 1997. Automatic synthesis of recursive programs: The proof-planning paradigm. In M. Lowry and Y. Ledru, editors, Proceedings of ASE-97: The 12th IEEE Conference on Automated Software Engineering, IEEE Computer Society Press, pp. 2–9.
Backhouse, R.C. 1986. Program Construction and Verification. Prentice Hall.
Barnes, J. 2003. High Integrity Software: The SPARK Approach to Safety and Security. Addison-Wesley.
Boyer, R.S. and Moore, J.S. 1979. A Computational Logic. Academic Press, ACM monograph series.
Boulton, R., Slind, K., Bundy, A., and Gordon, M. 1998. An interface between CLAM and HOL. In J. Grundy and M. Newey, editors, Proceedings of the 11th International Conference on Theorem Proving in Higher Order Logics (TPHOLs'98), volume 1479 of Lecture Notes in Computer Science, Canberra, Australia, September/October Springer, pp. 87–104.
Bundy, A., Smaill, A., and Hesketh, J. 1990. Turning eureka steps into calculations in automatic program synthesis. In S.L.H. Clarke, editor, Proceedings of UK IT 90, IEE, pp. 221–226.
Bundy, A., Stevens, A., van Harmelen, F., Ireland, A., and Smaill, A. 1993. Rippling: A heuristic for guiding inductive proofs. Artificial Intelligence, 62:185–253.
Bundy, A. 1988. The use of explicit plans to guide inductive proofs. In R. Lusk and R. Overbeek, editors, 9th International Conference on Automated Deduction, Springer-Verlag, pp. 111–120.
Bundy, A., van Harmelen, F., Horn, C., and Smaill, A. 1990. The Oyster-Clam system. In M.E. Stickel, editor, 10th International Conference on Automated Deduction, Springer-Verlag, Lecture Notes in Artificial Intelligence No. 449. pp. 647–648.
Basin, D. and Walsh, T. 1996. A calculus for and termination of rippling. Journal of Automated Reasoning, 16(1/2):147–180.
Cheng, B. 1994. Applying formal methods in automated software development. Journal of Computer and Software Engineering, 2(2):137–164.
Christensen, H. 1993. Synthesis of programs from logic specifications using programming methodology. Structured Programming, 14:173–186.
Dershowitz, N. 1985. Synthetic programming. Artificial Intelligence, 25:323–373.
Dijkstra, E. 1972. The Humble Programmer. CACM, 15(10):859–866.
Dijkstra, E. 1976. A Discipline of Programming. Prentice-Hall.
Dromey, G. 1989. The Development of Programs From Specifications. Addison-Wesley.
Ellis, B.J. and Ireland, A. 2003. Automation for exception freedom proofs. In: Proceedings of the 18th IEEE International Conference on Automated Software Engineering, IEEE Computer Society, pp. 343–346.
Ellis, B.J. and Ireland, A. 2004. An integration of program analysis and automated theorem proving. In E.A. Boiten, J. Derrick, and G. Smith, editors, Proceedings of 4th International Conference on Integrated Formal Methods (IFM-04), volume 2999 of Lecture Notes in Computer Science, Springer Verlag, pp. 67–86.
Ernst, G. and Newell, A. 1969. GPS: A Case Study in Generality and Problem Solving. Academic Press.
Floyd, R.W. 1967. Assigning meanings to programs. In J.T. Schwartz, editor, Mathematical Aspects of Computer Science, Proceedings of Symposia in Applied Mathematics 19, American Mathematical Society, pp. 19–32.
Flener, P. Zidoum, H., and Hnich, B. 1998. Schema-guided synthesis of constraint logic programs. In D.F. Redmiles and B. Nuseibeh, editors, Proceedings of ASE'98, IEEE Computer Society Press, pp. 168–176.
Gordon, M.J., Milner, A.J., and Wadsworth, C.P. 1979. Edinburgh LCF—A Mechanised Logic of Computation, Vol. 78 of Lecture Notes in Computer Science. Springer-Verlag.
Gordon, M.J. 1988a. HOL: A proof generating system for higher-order logic. In G. Birtwistle and P.A. Subrahmanyam, editors, VLSI Specification, Verification and Synthesis. Kluwer.
Gordonm M.J. 1988b. Programming Language Theory and its Implementation. International Series in Computer Science. Prentice-Hall.
Gordon, M.J. 1989. Mechanizing programming logics in higher order logic. In G. Birtwistle and P.A. Subrahmanyam, editors, Current Trends in Hardware Verification and Automated Theorem Proving. Springer-Verlag.
Gries, D. 1976. An illustration of current ideas on the derivation of correctness proofs and correct programs. IEEE Transactions on Software Engineering, 2:238–244.
Gries, D. 1981. The Science of Programming. New York: Springer-Verlag.
Hoare, C.A.R. 1969. An axiomatic basis for computer programming. Communications of the ACM, 12:576–583.
Ireland, A. and Bundy, A. 1996a. Extensions to a Generalization critic for inductive proof. In M.A. McRobbie and J.K. Slaney, editors, 13th International Conference on Automated Deduction, Springer-Verlag, Springer Lecture Notes in Artificial Intelligence No. 1104, pp. 47–61.
Ireland, A. and Bundy, A. 1996b. Productive use of failure in inductive proof. Journal of Automated Reasoning, 16(1/2):79–111, Also available as DAI Research Paper No 716, Dept. of Artificial Intelligence, Edinburgh.
Ireland, A. and Bundy, A. 1999. Automatic verification of functions with accumulating parameters. Journal of Functional Programming: Special Issue on Theorem Proving & Functional Programming, 9(2):225–245
Ireland, A. Ellis, B.J., and Ingulfsen, T. 2004. Invariant patterns for program reasoning. In R. Monroy, G. Arroyo-Figueroa, L.E. Sucar, and H. Sossa, editors, Proceedings of 3rd Mexican International Conference on Artificial Intelligence (MICAI-04), volume 2972 of Lecture Notes in Artificial Intelligence, Springer Verlag, pp. 190–201.
Ireland, A. 1992. The use of planning critics in mechanizing inductive proofs. In A. Voronkov, editor, International Conference on Logic Programming and Automated Reasoning—LPAR 92, St. Petersburg, Lecture Notes in Artificial Intelligence No. 624, Springer-Verlag, pp. 178–189.
Ireland, A. and Stark, J. 1997. On the automatic discovery of loop invariants. In Proceedings of the Fourth NASA Langley Formal Methods Workshop—NASA Conference Publication 3356.
Ireland, A. and Stark, J. 2001. Proof planning for strategy development. Annals of Mathematics and Artificial Intelligence, 29(1–4):65–97.
Kaldewaij, A. 1990. Programming: The Derivation of Algorithms. Prentice Hall.
Kraan, I., Basin, D., and Bundy, A. 1993. Logic program synthesis via proof planning. In K.K. Lau and T. Clement, editors, Logic Program Synthesis and Transformation, Springer-Verlag, pp. 1–14.
Kambhampati, S., Knoblock, C., and Yang, Q. 1995. Planning as refinement search: A unified framework for evaluating design tradeoffs in partial-order planning. Artificial Intelligence, 76:167–238.
Krzysztof, R.A. 1981. Ten years of hoare's logic: A survey—part i. ACM Transactions on Programming Languages and Systems, 3(4):431–483.
Lowry, M., Philpot, A., Pressburger, T., and Underwood, I. 1994. Amphion: Automatic programming for scientific subroutine libraries. In Proceeding 8th Intl. Symp. on Methodologies for Intelligent Systems, Charlotte, North Carolina.
Lee, J. and Wilkins, D.E. 1996. Using sipe-2 to integrate planning for military air campaigns. IEEE Expert, 11(6):11–12.
Morgan, C. 1994. Programming from Specifications. Prentice Hall, 2nd edition.
Manna, Z. and Waldinger, R. 1977. Studies in Automatic Programming Logic. Elsevier.
Manna, Z. and Waldinger, R.J. 1980. A deductive approach to program synthesis. Journal of Transactions on Programming Languages and Systems, 2(1):90–121.
Polya, G. 1945. How to Solve It. Princeton University Press.
Pavlovic, D. and Smith, D.R. 2001. Composition and refinement of behavioral specifications. In Proceedings of the 16th IEEE International Conference on Automated Software Engineering, IEEE Computer Society, pp. 157–165.
Richardson, J. and Flener, P. 2003. Program schemas as proof methods. Uppsala University Department of Information Technology Technical Report 2003–2008.
Smaill, A. and Green, I. 1995. Automating the synthesis of functional programs. Research paper 777, Dept. of Artificial Intelligence, University of Edinburgh.
Stark, J. and Ireland, A. 1998. Invariant discovery via failed proof attempts. In P. Flener, editor, Logic-Based Program Synthesis and Transformation, LNCS 1559, Springer-Verlag, pp. 271–288.
Stark, J. and Ireland, A. 1999. Towards automatic imperative program synthesis through proof planning. In The 14th IEEE International Conference on Automated Software Engineering, IEEE Computer Society, pp. 44–51.
Smith, D.R. 1990. KIDS: A semi-automatic program development system. Transactions on Software Engineering—Special Issue on Formal Methods, 16(9):1024–1043.
Smith, D.R. 1996. Toward a classification approach to design. In Proceedings of the Fifth International Conference on Algebraic Methodology and Software Technology, AMAST'96, LNCS 1101. Springer Verlag.
Sussman, G.J. 1975. A Computer Model of Skill Acquisition. Artificial Intelligence Series. North Holland.
Tate, A. 1977. Generating project networks. In R. Reddy, editor, Proceedings of IJCAI-77, Boston, Ma, International Joint Conference on Artificial Intelligence, pp. 888–893.
Tate, A., Dalton, J., and Levine, J. 2000. O-plan: A web-based AI planning agent. In AAAI/IAAI, pp. 1131–1132.
Waldinger, R. 1977. Achieving Several Goals Simultaneously, volume 8 of Machine Intelligence, chapter 6, pp. 94–138. New York: Halstead and Wiley.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Ireland, A., Stark, J. Combining Proof Plans with Partial Order Planning for Imperative Program Synthesis. Autom Software Eng 13, 65–105 (2006). https://doi.org/10.1007/s10515-006-5467-3
Issue Date:
DOI: https://doi.org/10.1007/s10515-006-5467-3