[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/2837614.2837666acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article
Public Access

Optimizing synthesis with metasketches

Published: 11 January 2016 Publication History

Abstract

Many advanced programming tools---for both end-users and expert developers---rely on program synthesis to automatically generate implementations from high-level specifications. These tools often need to employ tricky, custom-built synthesis algorithms because they require synthesized programs to be not only correct, but also optimal with respect to a desired cost metric, such as program size. Finding these optimal solutions efficiently requires domain-specific search strategies, but existing synthesizers hard-code the strategy, making them difficult to reuse. This paper presents metasketches, a general framework for specifying and solving optimal synthesis problems. metasketches make the search strategy a part of the problem definition by specifying a fragmentation of the search space into an ordered set of classic sketches. We provide two cooperating search algorithms to effectively solve metasketches. A global optimizing search coordinates the activities of local searches, informing them of the costs of potentially-optimal solutions as they explore different regions of the candidate space in parallel. The local searches execute an incremental form of counterexample-guided inductive synthesis to incorporate information sent from the global search. We present Synapse, an implementation of these algorithms, and show that it effectively solves optimal synthesis problems with a variety of different cost functions. In addition, metasketches can be used to accelerate classic (non-optimal) synthesis by explicitly controlling the search strategy, and we show that Synapse solves classic synthesis problems that state-of-the-art tools cannot.

References

[1]
R. Alur, L. D’Antoni, S. Gulwani, D. Kini, and M. Viswanathan. Automated grading of DFA constructions. In IJCAI, 2011.
[2]
R. Alur, R. Bodik, G. Juniwal, M. M. K. Martin, M. Raghothaman, S. A. Seshia, R. Singh, A. Solar-Lezama, E. Torlak, and A. Udupa. Syntax-guided synthesis. In FMCAD, 2013.
[3]
R. Alur, R. Bodik, E. Dallal, D. Fisman, P. Garg, G. Juniwal, H. Kress-Gazit, P. Madhusudan, M. M. K. Martin, M. Raghothaman, S. Saha, S. A. Seshia, R. Singh, A. Solar-Lezama, E. Torlak, and A. Udupa. Syntax-guided synthesis. In Dependable Software Systems Engineering, volume 40. 2015.
[4]
R. Alur, D. Fisman, R. Singh, and A. Solar-Lezama. The second competition on syntax-guided synthesis. In SYNT, 2015. URL http: //formal.epfl.ch/synt/2015/slides/fisman-etal.pdf.
[5]
M. Carbin, S. Misailovic, and M. C. Rinard. Verifying quantitative reliability for programs that execute on unreliable hardware. In OOPSLA, 2013.
[6]
S. Chaudhuri, M. Clochard, and A. Solar-Lezama. Bridging boolean and quantitative synthesis using smoothed proof search. In POPL, 2014.
[7]
A. Cimatti, A. Franzén, A. Griggio, R. Sebastiani, and C. Stenico. Satisfiability modulo the theory of costs: Foundations and applications. In TACAS, 2010.
[8]
L. De Moura and N. Bjørner. Z3: An efficient SMT solver. In TACAS, 2008.
[9]
H. Esmaeilzadeh, A. Sampson, L. Ceze, and D. Burger. Neural acceleration for general-purpose approximate programs. In MICRO, 2012.
[10]
J. K. Feser, S. Chaudhuri, and I. Dillig. Synthesizing data structure transformations from input-output examples. In PLDI, 2015.
[11]
S. Gulwani. Automating string processing in spreadsheets using inputoutput examples. In POPL, 2011.
[12]
S. Gulwani, S. Jha, A. Tiwari, and R. Venkatesan. Synthesis of loop-free programs. In PLDI, 2011.
[13]
S. Gulwani, W. R. Harris, and R. Singh. Spreadsheet data manipulation using examples. Commun. ACM, 55(8), Aug. 2012.
[14]
J. Jeon, X. Qiu, A. Solar-Lezama, and J. S. Foster. Adaptive concretization for parallel program synthesis. In CAV, 2015.
[15]
S. Jha, S. Gulwani, S. A. Seshia, and A. Tiwari. Oracle-guided component-based program synthesis. In ICSE, 2010.
[16]
R. Joshi, G. Nelson, and K. Randall. Denali: a goal-directed superoptimizer. In PLDI, 2002.
[17]
A. S. Köksal, Y. Pu, S. Srivastava, R. Bodik, J. Fisher, and N. Piterman. Synthesis of biological models from mutation experiments. In POPL, 2013.
[18]
A. Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
[19]
I. Kuraj, V. Kuncak, and D. Jackson. Programming with enumerable sets of structures. In OOPSLA, 2015.
[20]
Y. Li, A. Albarghouthi, Z. Kincaid, A. Gurfinkel, and M. Chechik. Symbolic optimization with SMT solvers. In POPL, 2014.
[21]
A. Massalin. Superoptimizer: A look at the smallest program. In ASPLOS, 1987.
[22]
A. K. Menon, O. Tamuz, S. Gulwani, and A. T. Kalai. A machine learning framework for programming by example. In ICML, 2013.
[23]
L. A. Meyerovich. Parallel Layout Engines: Synthesis and Optimization of Tree Traversals. PhD thesis, University of California, Berkeley, 2013.
[24]
L. A. Meyerovich, M. E. Torok, E. Atkinson, and R. Bodik. Parallel schedule synthesis for attribute grammars. In PPoPP, 2013.
[25]
T. Moreau, M. Wyse, J. Nelson, A. Sampson, H. Esmaeilzadeh, L. Ceze, and M. Oskin. SNNAP: Approximate computing on programmable SoCs via neural acceleration. In HPCA, 2015.
[26]
V. Nair and G. E. Hinton. Rectified linear units improve restricted Boltzmann machines. In ICML, 2010.
[27]
P. M. Phothilimthana, T. Jelvis, R. Shah, N. Totla, S. Chasins, and R. Bodik. Chlorophyll: Synthesis-aided compiler for low-power spatial architectures. In PLDI, 2014.
[28]
O. Polozov and S. Gulwani. FlashMeta: A framework for inductive program synthesis. In OOPSLA, 2015.
[29]
J. D. Ramsdell. An operational semantics for Scheme. SIGPLAN Lisp Pointers, V(2):6–10, 1992.
[30]
A. Reynolds, M. Deters, V. Kuncak, C. Tinelli, and C. Barrett. Counterexample-guided quantifier instantiation for synthesis in SMT. In CAV, 2015.
[31]
E. Schkufza, R. Sharma, and A. Aiken. Stochastic superoptimization. In ASPLOS, 2013.
[32]
R. Sebastiani and S. Tomasi. Optimization in SMT with LA(Q) cost functions. In IJCAR, 2012.
[33]
J. E. Smith. Characterizing computer performance with a single number. Commun. ACM, 31(10), Oct. 1988.
[34]
A. Solar-Lezama. Program synthesis by sketching. PhD thesis, University of California, Berkeley, 2008.
[35]
A. Solar-Lezama, L. Tancau, R. Bodik, V. Saraswat, and S. Seshia. Combinatorial sketching for finite programs. In ASPLOS, 2006.
[36]
A. Solar-Lezama, G. Arnold, L. Tancau, R. Bodik, V. Saraswat, and S. Seshia. Sketching stencils. In PLDI, 2007.
[37]
V. Srinivasan and T. Reps. Synthesis of machine code from semantics. In PLDI, 2015.
[38]
M. Szudzik. An elegant pairing function. In NKS, 2006.
[39]
E. Torlak and R. Bodik. Growing solver-aided languages with Rosette. In Onward!, 2013.
[40]
E. Torlak and R. Bodik. A lightweight symbolic virtual machine for solver-aided host languages. In PLDI, 2014.
[41]
E. Torlak and D. Jackson. Kodkod: A relational model finder. In TACAS, 2007.
[42]
A. Udupa, A. Raghavan, J. V. Deshmukh, S. Mador-Haim, M. M. K. Martin, and R. Alur. Transit: Specifying protocols with concolic snippets. In PLDI, 2013.
[43]
H. S. Warren, Jr. Hacker’s Delight. Addison-Wesley, 2007. Introduction Optimal Syntax-Guided Synthesis Metasketches The Metasketch Abstraction Properties of Metasketches Examples Optimal Synthesis Algorithm Global Search Local Searches Characterization Implementation Evaluation Benchmarks Is Synapse a practical approach to solving different kinds of synthesis problems? Does the fragmentation of the search space by a metasketch translate into parallel speedup? Is online completeness empirically useful? How beneficial are our metasketch and implementation optimizations? Can Synapse reason about dynamic cost functions? Related Work Conclusion

Cited By

View all
  • (2024)Data-Driven Insight Synthesis for Multi-Dimensional DataProceedings of the VLDB Endowment10.14778/3641204.364121117:5(1007-1019)Online publication date: 1-Jan-2024
  • (2024)Superfusion: Eliminating Intermediate Data Structures via Inductive SynthesisProceedings of the ACM on Programming Languages10.1145/36564158:PLDI(939-964)Online publication date: 20-Jun-2024
  • (2024)Recursive Program Synthesis using ParamorphismsProceedings of the ACM on Programming Languages10.1145/36563818:PLDI(102-125)Online publication date: 20-Jun-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '16: Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
January 2016
815 pages
ISBN:9781450335492
DOI:10.1145/2837614
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 51, Issue 1
    POPL '16
    January 2016
    815 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2914770
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
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 the author(s) 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].

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 January 2016

Permissions

Request permissions for this article.

Check for updates

Author Tag

  1. Program synthesis

Qualifiers

  • Research-article

Funding Sources

Conference

POPL '16
Sponsor:

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)355
  • Downloads (Last 6 weeks)30
Reflects downloads up to 27 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Data-Driven Insight Synthesis for Multi-Dimensional DataProceedings of the VLDB Endowment10.14778/3641204.364121117:5(1007-1019)Online publication date: 1-Jan-2024
  • (2024)Superfusion: Eliminating Intermediate Data Structures via Inductive SynthesisProceedings of the ACM on Programming Languages10.1145/36564158:PLDI(939-964)Online publication date: 20-Jun-2024
  • (2024)Recursive Program Synthesis using ParamorphismsProceedings of the ACM on Programming Languages10.1145/36563818:PLDI(102-125)Online publication date: 20-Jun-2024
  • (2024)Hydra: Generalizing Peephole Optimizations with Program SynthesisProceedings of the ACM on Programming Languages10.1145/36498378:OOPSLA1(725-753)Online publication date: 29-Apr-2024
  • (2024)Optimal Program Synthesis via Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/36328588:POPL(457-481)Online publication date: 5-Jan-2024
  • (2023)Trace-Guided Inductive Synthesis of Recursive Functional ProgramsProceedings of the ACM on Programming Languages10.1145/35912557:PLDI(860-883)Online publication date: 6-Jun-2023
  • (2023)Code Synthesis for Sparse Tensor Format Conversion and OptimizationProceedings of the 21st ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3579990.3580021(28-40)Online publication date: 17-Feb-2023
  • (2023)Comparative Synthesis: Learning Near-Optimal Network Designs by QueryProceedings of the ACM on Programming Languages10.1145/35711977:POPL(91-120)Online publication date: 11-Jan-2023
  • (2023)Synthesizing Trajectory Queries from ExamplesComputer Aided Verification10.1007/978-3-031-37706-8_23(459-484)Online publication date: 17-Jul-2023
  • (2022)Bind the gap: compiling real software to hardware FFT acceleratorsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523439(687-702)Online publication date: 9-Jun-2022
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media