Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/11506676_11guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Schema-guided synthesis of imperative programs by constraint solving

Published: 26 August 2004 Publication History

Abstract

We present a method for schema-guided synthesis of imperative programs computing polynomial functions and their inverses. The schemas of our approach contain parameters representing both fragments of code and fragments of invariants, and they generate programs annotated with loop invariants establishing partial correctness. Schema application entails simultaneously instantiating the code parameters to polynomials and the invariant parameters to systems of polynomial equalities. By bounding the degrees of these polynomials and their number, our method reduces schema instantiation to non-linear constraint solving, based on the theory of polynomial ideals. Although non-linear constraint solving is NP-hard, a solution can be generated automatically when the resulting system contains few constraints. A specialization of our method yields linear constraints by further restricting the form of the invariants. This restriction improves the efficiency of constraint solving, but may fail to synthesize programs derivable by the general method.

References

[1]
P. Anderson and D. Basin. Program development schemata as derived rules. Journal of Symbolic Computation, 30(1):5-36, 2000.
[2]
D. Basin, Y. Deville, P Flener, A. Hamfelt, and J. F. Nilsson. Synthesis of programs in computational logic. In M. Bruynooghe and K.-K. Lau, editors, Program Development in Computational Logic, pages 30-65. Springer-Verlag, 2004.
[3]
T. Becker and V. Weispfenning. Gröbner Bases: A Computational Approach to Commutative Algebra. Springer-Verlag, New York, 1993.
[4]
J. F. Canny, E. Kaltofen, and L. Yagati. Solving systems of non-linear polynomial equations faster. In G. H. Gonnet, editor, International Symposium on Symbolic and Algebraic Computation, pages 121-128. ACM Press, 1989.
[5]
M. Colón, S. Sankaranarayanan, and H. Sipma. Linear invariant generation using non-linear constraint solving. In F. Somenzi and W. Hunt Jr, editors, 15th International Conference on Computer Aided Verification, pages 420-432. Springer-Verlag, 2003.
[6]
M. A. Colón and H. B. Sipma. Synthesis of linear ranking functions. In T. Margaria and W. Yi, editors, 7th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 67-81. Springer-Verlag, 2001.
[7]
E. W. Dijkstra. A Discipline of Programming. Prentice-Hall, Inc., Englewood Cliffs, New Jersey, 1976.
[8]
P. Flener. Achievements and prospects of program synthesis. In A. C. Kakas and F. Sadri, editors, Computational Logic: Logic Programming and Beyond, Essays in Honour of Robert A. Kowalski, pages 310-346. Springer-Verlag, 2002.
[9]
P. Flener and Y. Deville. Towards stepwise, schema-guided synthesis of logic programs. In T. P. Clement and K.-K. Lau, editors, International Workshop on Logic Program Synthesis and Transformation, pages 46-64. Springer-Verlag, 1992.
[10]
P. Flener, K.-K. Lau, M. Ornaghi, and J. Richardson. An abstract formalization of correct schemas for program synthesis. Journal of Symbolic Computation, 30(1):93-127, 2000.
[11]
R. W. Floyd. Assigning meanings to programs. In Proceedings of the Symposium on Applied Mathematics, volume 19 (Mathematical Aspects of Computer Science), pages 19-32. 1967.
[12]
L. Granvilliers. RealPaver User's Manual. Institut de Recherche en Informatique de Nantes, 0.3 edition, July 2003.
[13]
Z. Manna. Mathematical Theory of Computation. McGraw-Hill, New York, 1974.
[14]
Z. Manna and R. J. Waldinger. Fundamentals of deductive program synthesis. IEEE Transactions on Software Engineering, 18(8):674-704, 1992.
[15]
E. Mayr and A. Meyer. The complexity of the word problems for commutative semigroups and polynomial ideals. Advances in Mathematics, 46(3):305-329, 1982.
[16]
G. C. Necula. Proof-carrying code. In 24th ACM Symposium on Principles of Programming Languages, pages 106-119. ACM, 1997.
[17]
A. Neumaier. Interval Methods for Systems of Equations. Cambridge University Press, Cambridge, 1990.
[18]
C. Rich and R. C. Waters. Approaches to automatic programming. Advances in Computers, 37:1-57, 1993.
[19]
S. Sankaranarayanan, H. B. Sipma, and Z. Manna. Non-linear loop invariant generation using Gröbner bases. In N. D. Jones and X. Leroy, editors, 31st ACM Symposium on Principles of Programming Languages, pages 318-329. ACM, 2004.
[20]
A. Schrijver. Theory of Linear and Integer Programming. John Wiley & Sons, Chichester, 1986.
[21]
D. R. Smith. KIDS: A semiautomatic program development system. IEEE Transactions on Software Engineering, 16(9):1024-1043, 1990.
[22]
J. Stark and A. Ireland. Towards automatic imperative program synthesis through proof planning. In 14th IEEE International Conference on Automated Software Engineering, pages 44-51. IEEE Computer Society, 1999.
[23]
M. E. Stickel, R. J. Waldinger, M. R. Lowry, T. Pressburger, and I. Underwood. Deductive composition of astronomical software from subroutine libraries. In A. Bundy, editor, 12th International Conference on Automated Deduction, pages 341-355. Springer-Verlag, 1994.
[24]
A. Tarski. A Decision Method for Elementary Algebra and Geometry. University of California Press, 1951.

Cited By

View all
  • (2023)Challenges Engaging Formal CBSE in Industrial ApplicationsFormal Aspects of Component Software10.1007/978-3-031-52183-6_8(153-167)Online publication date: 26-Oct-2023
  • (2014)Synthesis for Polynomial Lasso ProgramsProceedings of the 15th International Conference on Verification, Model Checking, and Abstract Interpretation - Volume 831810.1007/978-3-642-54013-4_24(434-452)Online publication date: 19-Jan-2014
  • (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
  • Show More Cited By

Index Terms

  1. Schema-guided synthesis of imperative programs by constraint solving
      Index terms have been assigned to the content through auto-classification.

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image Guide Proceedings
      LOPSTR'04: Proceedings of the 14th international conference on Logic Based Program Synthesis and Transformation
      August 2004
      278 pages
      ISBN:3540266550

      Sponsors

      • University of Verona: University of Verona
      • The Association for Logic Programming: The Association for Logic Programming

      Publisher

      Springer-Verlag

      Berlin, Heidelberg

      Publication History

      Published: 26 August 2004

      Qualifiers

      • Article

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

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

      Other Metrics

      Citations

      Cited By

      View all
      • (2023)Challenges Engaging Formal CBSE in Industrial ApplicationsFormal Aspects of Component Software10.1007/978-3-031-52183-6_8(153-167)Online publication date: 26-Oct-2023
      • (2014)Synthesis for Polynomial Lasso ProgramsProceedings of the 15th International Conference on Verification, Model Checking, and Abstract Interpretation - Volume 831810.1007/978-3-642-54013-4_24(434-452)Online publication date: 19-Jan-2014
      • (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)Efficiently solving quantified bit-vector formulasProceedings of the 2010 Conference on Formal Methods in Computer-Aided Design10.5555/1998496.1998539(239-246)Online publication date: 20-Oct-2010
      • (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
      • (2010)Bugs, moles and skeletonsProceedings of the 5th international conference on Automated Reasoning10.1007/978-3-642-14203-1_34(400-411)Online publication date: 16-Jul-2010

      View Options

      View options

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media