Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Synthesis of loop-free programs

Published: 04 June 2011 Publication History

Abstract

We consider the problem of synthesizing loop-free programs that implement a desired functionality using components from a given library. Specifications of the desired functionality and the library components are provided as logical relations between their respective input and output variables. The library components can be used at most once, and hence the library is required to contain a reasonable overapproximation of the multiset of the components required.
We solve the above component-based synthesis problem using a constraint-based approach that involves first generating a synthesis constraint, and then solving the constraint. The synthesis constraint is a first-order ∃∀ logic formula whose size is quadratic in the number of components. We present a novel algorithm for solving such constraints. Our algorithm is based on counterexample guided iterative synthesis paradigm and uses off-the-shelf SMT solvers.
We present experimental results that show that our tool Brahma can efficiently synthesize highly nontrivial 10-20 line loop-free bitvector programs. These programs represent a state space of approximately 2010 programs, and are beyond the reach of the other tools based on sketching and superoptimization.

References

[1]
Satisfiability modulo theories competition (smt-comp). \URLhttp://www.smtcomp.org/2009/index.shtml.
[2]
SMTLIB: Satisfiability modulo theories lib. URLhttp://smtlib.org.
[3]
Yices: An SMT solver. URLhttp://yices.csl.sri.com.
[4]
The AHA! (A Hacker's Assistant) Superoptimizer, 2008. Download: URLhttp://www.hackersdelight.org/aha.zip, Documentation: URLhttp://www.hackersdelight.org/aha/aha.pdf.
[5]
S. Bansal and A. Aiken. Automatic generation of peephole superoptimizers. In ASPLOS, 2006.
[6]
S. Bansal and A. Aiken. Binary translation using peephole superoptimizers. In OSDI, 2008.
[7]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. An efficient method of computing static single assignment form. In POPL, 1989.
[8]
B. Fischer and J. Schumann. Autobayes: A system for generating data analysis programs from statistical models. J. Funct. Program., 13(3):483--508, 2003.
[9]
P. Flener and L. Popelmnsky. On the use of inductive reasoning in program synthesis: Prejudice and prospects. In LOBSTR. 1994.
[10]
E. M. Gold. Language identification in the limit. Information and Control, 10(5):447--474, 1967.
[11]
T. Granlund and R. Kenner. Eliminating branches using a superoptimizer and %the gnu c compiler. In PLDI, 1992.
[12]
S. Gulwani. Dimensions in program synthesis. In PPDP, pages 13--24. ACM, 2010.
[13]
S. Gulwani. Automating string processing in spreadsheets using input-output examples. In POPL, 2011.
[14]
S. Gulwani, V. Korthikanti, and A. Tiwari. Synthesizing geometry constructions. In PLDI, 2011.
[15]
J. Hamza, B. Jobstmann, and V. Kuncak. Synthesis for regular specifications over unbounded domains. In FMCAD, 2010.
[16]
B. Harris and S. Gulwani. Spreadsheet table transformations from examples. In PLDI, 2011.
[17]
S. Itzhaky, S. Gulwani, N. Immerman, and M. Sagiv. A simple inductive synthesis methodology and its applications. In OOPSLA, pages 36--46, 2010.
[18]
R. N. Jackiw and W. F. Finzer. The geometer's sketchpad: programming by geometry. In Watch what I do: programming by demonstration, pages 293--307. MIT Press, 1993.
[19]
S. Jha, S. Gulwani, S. Seshia, and A. Tiwari. Oracle-guided component-based program synthesis. In ICSE, pages 215--224, 2010.
[20]
S. Jha, S. Gulwani, S. Seshia, and A. Tiwari. Synthesizing switching logic for safety and dwell-time requirements. In Proc. 1st ACM/IEEE Intl. Conf. on Cyber-Physical Systems, ICCPS, pages 22--31, 2010.
[21]
T. A. Johnson and R. Eigenmann. Context-sensitive domain-independent algorithm composition and selection. In PLDI, 2006.
[22]
R. Joshi, G. Nelson, and K. H. Randall. Denali: A goal-directed superoptimizer. In PLDI, 2002.
[23]
D. E. Knuth. The art of computer programming. \URLhttp://www-cs-faculty.stanford.edu/ knuth/taocp.html.
[24]
T. A. Lau, P. Domingos, and D. S. Weld. Version space algebra and its application to programming by demonstration. In ICML, 2000.
[25]
Y. Lustig and M. Vardi. Synthesis from component libraries. In Proc. FoSSaCS, pages 395--409, 2009.
[26]
D. Mandelin, L. Xu, R. Bodík, and D. Kimelman. Jungloid mining: helping to navigate the API jungle. In PLDI, pages 48--61, 2005.
[27]
Z. Manna and R. Waldinger. A deductive approach to program synthesis. ACM TOPLAS, 2(1):90--121, 1980.
[28]
H. Massalin. Superoptimizer - a look at the smallest program. In ASPLOS, pages 122--126, 1987.
[29]
S. Muggleton, editor. Inductive Logic Programming, volume 38 of The APIC Series. Academic Press, 1992.
[30]
E. Y. Shapiro. Algorithmic Program DeBugging. MIT Press, Cambridge, MA, USA, 1983.
[31]
A. Solar-Lezama, G. Arnold, L. Tancau, R. Bodík, V. A. Saraswat, and S. A. Seshia. Sketching stencils. In PLDI, pages 167--178, 2007.
[32]
A. Solar-Lezama, R. Rabbah, R. Bodík, and K. Ebcioglu. Programming by sketching for bit-streaming programs. In PLDI, 2005.
[33]
A. Solar-Lezama, L. Tancau, R. Bodík, S. Seshia, and V. Saraswat. Combinatorial sketching for finite programs. In ASPLOS, 2006.
[34]
S. Srivastava, S. Gulwani, and J. S. Foster. From program verification to program synthesis. In POPL, pages 313--326, 2010.
[35]
M. Stickel, R. Waldinger, M. Lowry, T. Pressburger, and I. Underwood. Deductive composition of astro. software from subroutine libraries. In CADE, '94.
[36]
A. Taly, S. Gulwani, and A. Tiwari. Synthesizing switching logic using constraint solving. In VMCAI, pages 305--319. Springer, 2009.
[37]
H. S. Warren. Hacker's Delight. Addison-Wesley, '02.
[38]
I. H. Witten and D. Mo. TELS: learning text editing tasks from examples. In Watch what I do: programming by demonstration, pages 293--307. MIT Press, Cambridge, MA, USA, 1993.

Cited By

View all
  • (2024)Evolving to Find Optimizations Humans Miss: Using Evolutionary Computation to Improve GPU Code for Bioinformatics ApplicationsACM Transactions on Evolutionary Learning and Optimization10.1145/37039204:4(1-29)Online publication date: 15-Nov-2024
  • (2024)SEPE-SQED: Symbolic Quick Error Detection by Semantically Equivalent Program ExecutionProceedings of the 61st ACM/IEEE Design Automation Conference10.1145/3649329.3655958(1-6)Online publication date: 23-Jun-2024
  • (2024)Probabilistic Loop Synthesis from Sequences of MomentsQuantitative Evaluation of Systems and Formal Modeling and Analysis of Timed Systems10.1007/978-3-031-68416-6_14(233-248)Online publication date: 10-Sep-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 46, Issue 6
PLDI '11
June 2011
652 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/1993316
Issue’s Table of Contents
  • cover image ACM Conferences
    PLDI '11: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation
    June 2011
    668 pages
    ISBN:9781450306638
    DOI:10.1145/1993498
    • General Chair:
    • Mary Hall,
    • Program Chair:
    • David Padua
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: 04 June 2011
Published in SIGPLAN Volume 46, Issue 6

Check for updates

Author Tags

  1. component-based synthesis
  2. program synthesis
  3. smt

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)108
  • Downloads (Last 6 weeks)16
Reflects downloads up to 25 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Evolving to Find Optimizations Humans Miss: Using Evolutionary Computation to Improve GPU Code for Bioinformatics ApplicationsACM Transactions on Evolutionary Learning and Optimization10.1145/37039204:4(1-29)Online publication date: 15-Nov-2024
  • (2024)SEPE-SQED: Symbolic Quick Error Detection by Semantically Equivalent Program ExecutionProceedings of the 61st ACM/IEEE Design Automation Conference10.1145/3649329.3655958(1-6)Online publication date: 23-Jun-2024
  • (2024)Probabilistic Loop Synthesis from Sequences of MomentsQuantitative Evaluation of Systems and Formal Modeling and Analysis of Timed Systems10.1007/978-3-031-68416-6_14(233-248)Online publication date: 10-Sep-2024
  • (2023)Relational program synthesis with numerical reasoningProceedings of the Thirty-Seventh AAAI Conference on Artificial Intelligence and Thirty-Fifth Conference on Innovative Applications of Artificial Intelligence and Thirteenth Symposium on Educational Advances in Artificial Intelligence10.1609/aaai.v37i5.25790(6425-6433)Online publication date: 7-Feb-2023
  • (2023)iSyn: Semi-automated Smart Contract Synthesis from Legal Financial AgreementsProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3598091(727-739)Online publication date: 12-Jul-2023
  • (2023)Algebro-geometric Algorithms for Template-Based Synthesis of Polynomial ProgramsProceedings of the ACM on Programming Languages10.1145/35860527:OOPSLA1(727-756)Online publication date: 6-Apr-2023
  • (2023)Survey of intelligent program synthesis techniquesInternational Conference on Algorithms, High Performance Computing, and Artificial Intelligence (AHPCAI 2023)10.1117/12.3011627(119)Online publication date: 7-Dec-2023
  • (2023)Faster sorting algorithms discovered using deep reinforcement learningNature10.1038/s41586-023-06004-9618:7964(257-263)Online publication date: 7-Jun-2023
  • (2023)A symbolic algorithm for the case-split rule in solving word constraints with extensionsJournal of Systems and Software10.1016/j.jss.2023.111673201:COnline publication date: 1-Jul-2023
  • (2023)Synthesising Programs with Non-trivial ConstantsJournal of Automated Reasoning10.1007/s10817-023-09664-467:2Online publication date: 13-May-2023
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media