Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/800178.810159acmconferencesArticle/Chapter ViewAbstractPublication Pagesacm-national-conferenceConference Proceedingsconference-collections
Article
Free access

Heuristics for program synthesis using loop invariants

Published: 01 January 1978 Publication History

Abstract

The problem of automatically synthesizing programs from formal specifications can be stated as, “constructively prove that there exists a program P which transforms valid input into output satisfying the required output assertion.” If Prequires a loop, the proof will contain an induction. This is beyond the ability of current theorem provers and synthesis systems. In this paper, the loop invariant is used to reduce the problem of synthesizing loops to that of synthesizing three loop free sections — initialization, assignment to loop control variables, and assignment to all other program variables. The three sections are then assembled into a standard loop form, namely “(initialization) WHILE B DO (loop body) OD”. Second order theorem provers adequate for these subproblems have not yet been developed. Therefore, heuristics are presented for synthesizing the three sections. Several examples are presented.

References

[1]
Buchanan, J. R. and Luckham, D. C., On Automating the Construction of Programs, Memo AIM - 236, Stanford A. I. Lab. (1974).
[2]
Darlington, J. L., Automatic Program Synthesis in Second Order Logic, Proc. Third International Joint Conf. On Artificial Intelligence, Stanford (1973)
[3]
Dijkstra, E. W., Lectures delivered at NSF Conference on Programming Methodology, University of New Mexico (January, 1974).
[4]
Dijkstra, E. W., A Discipline of programming (Prentice-Hall, Inc., Englewood Cliffs, 1976).
[5]
Elspas, B., Levitt, K. N., Waldinger, R. J., and Waksman, A., An Assessment of Techniques for Proving Program Correctness, Computing Surveys, 4 (June 1972), 97-147.
[6]
Green, C., Application of Theorem Proving to Problem Solving, Proc. International Joint Conf. on Artificial Intelligence, Washington, D.C. (1969).
[7]
Lee, R. C. T., Chang, C. L., and Waldinger, R. J., An Improved Program-Synthesizing Algorithm and Its Correctness, Comm. ACM, 17 (April 1974), 211-217.
[8]
Manna, Z. and Waldinger, R., The Logic of Computer Programming, IEEE Trans. on Software Engineering, SE-4 (May-1978),199-229.
[9]
Wegbreit, B., The Synthesis of cates, Comm. ACM, 17 (February 1974),102-112.
[10]
Wirth, N. Systematic Programming: An Introduction. (Prentice-Hall, Inc., Englewood Cliffs, 1973).

Cited By

View all
  • (2013)Template-based program verification and program synthesisInternational Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-012-0223-415:5-6(497-518)Online publication date: 1-Oct-2013
  • (2010)From program verification to program synthesisACM SIGPLAN Notices10.1145/1707801.170633745:1(313-326)Online publication date: 17-Jan-2010
  • (2010)From program verification to program synthesisProceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages10.1145/1706299.1706337(313-326)Online publication date: 17-Jan-2010

Index Terms

  1. Heuristics for program synthesis using loop invariants

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ACM '78: Proceedings of the 1978 annual conference - Volume 2
    January 1978
    990 pages
    ISBN:0897910001
    DOI:10.1145/800178
    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: 01 January 1978

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Automatic programming
    2. Loop invariants
    3. Program correctness
    4. Program synthesis

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)21
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 18 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2013)Template-based program verification and program synthesisInternational Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-012-0223-415:5-6(497-518)Online publication date: 1-Oct-2013
    • (2010)From program verification to program synthesisACM SIGPLAN Notices10.1145/1707801.170633745:1(313-326)Online publication date: 17-Jan-2010
    • (2010)From program verification to program synthesisProceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages10.1145/1706299.1706337(313-326)Online publication date: 17-Jan-2010

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media