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.
- Satisfiability modulo theories competition (smt-comp). \URLhttp://www.smtcomp.org/2009/index.shtml.Google Scholar
- SMTLIB: Satisfiability modulo theories lib. URLhttp://smtlib.org.Google Scholar
- Yices: An SMT solver. URLhttp://yices.csl.sri.com.Google Scholar
- The AHA! (A Hacker's Assistant) Superoptimizer, 2008. Download: URLhttp://www.hackersdelight.org/aha.zip, Documentation: URLhttp://www.hackersdelight.org/aha/aha.pdf.Google Scholar
- S. Bansal and A. Aiken. Automatic generation of peephole superoptimizers. In ASPLOS, 2006. Google Scholar
Digital Library
- S. Bansal and A. Aiken. Binary translation using peephole superoptimizers. In OSDI, 2008. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- B. Fischer and J. Schumann. Autobayes: A system for generating data analysis programs from statistical models. J. Funct. Program., 13(3):483--508, 2003. Google Scholar
Digital Library
- P. Flener and L. Popelmnsky. On the use of inductive reasoning in program synthesis: Prejudice and prospects. In LOBSTR. 1994. Google Scholar
Digital Library
- E. M. Gold. Language identification in the limit. Information and Control, 10(5):447--474, 1967.Google Scholar
Cross Ref
- T. Granlund and R. Kenner. Eliminating branches using a superoptimizer and %the gnu c compiler. In PLDI, 1992. Google Scholar
Digital Library
- S. Gulwani. Dimensions in program synthesis. In PPDP, pages 13--24. ACM, 2010. Google Scholar
Digital Library
- S. Gulwani. Automating string processing in spreadsheets using input-output examples. In POPL, 2011. Google Scholar
Digital Library
- S. Gulwani, V. Korthikanti, and A. Tiwari. Synthesizing geometry constructions. In PLDI, 2011. Google Scholar
Digital Library
- J. Hamza, B. Jobstmann, and V. Kuncak. Synthesis for regular specifications over unbounded domains. In FMCAD, 2010. Google Scholar
Digital Library
- B. Harris and S. Gulwani. Spreadsheet table transformations from examples. In PLDI, 2011. Google Scholar
Digital Library
- S. Itzhaky, S. Gulwani, N. Immerman, and M. Sagiv. A simple inductive synthesis methodology and its applications. In OOPSLA, pages 36--46, 2010. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- S. Jha, S. Gulwani, S. Seshia, and A. Tiwari. Oracle-guided component-based program synthesis. In ICSE, pages 215--224, 2010. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- T. A. Johnson and R. Eigenmann. Context-sensitive domain-independent algorithm composition and selection. In PLDI, 2006. Google Scholar
Digital Library
- R. Joshi, G. Nelson, and K. H. Randall. Denali: A goal-directed superoptimizer. In PLDI, 2002. Google Scholar
Digital Library
- D. E. Knuth. The art of computer programming. \URLhttp://www-cs-faculty.stanford.edu/ knuth/taocp.html.Google Scholar
- T. A. Lau, P. Domingos, and D. S. Weld. Version space algebra and its application to programming by demonstration. In ICML, 2000. Google Scholar
Digital Library
- Y. Lustig and M. Vardi. Synthesis from component libraries. In Proc. FoSSaCS, pages 395--409, 2009. Google Scholar
Digital Library
- D. Mandelin, L. Xu, R. Bodík, and D. Kimelman. Jungloid mining: helping to navigate the API jungle. In PLDI, pages 48--61, 2005. Google Scholar
Digital Library
- Z. Manna and R. Waldinger. A deductive approach to program synthesis. ACM TOPLAS, 2(1):90--121, 1980. Google Scholar
Digital Library
- H. Massalin. Superoptimizer - a look at the smallest program. In ASPLOS, pages 122--126, 1987. Google Scholar
Digital Library
- S. Muggleton, editor. Inductive Logic Programming, volume 38 of The APIC Series. Academic Press, 1992.Google Scholar
- E. Y. Shapiro. Algorithmic Program DeBugging. MIT Press, Cambridge, MA, USA, 1983. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- A. Solar-Lezama, R. Rabbah, R. Bodík, and K. Ebcioglu. Programming by sketching for bit-streaming programs. In PLDI, 2005. Google Scholar
Digital Library
- A. Solar-Lezama, L. Tancau, R. Bodík, S. Seshia, and V. Saraswat. Combinatorial sketching for finite programs. In ASPLOS, 2006. Google Scholar
Digital Library
- S. Srivastava, S. Gulwani, and J. S. Foster. From program verification to program synthesis. In POPL, pages 313--326, 2010. Google Scholar
Digital Library
- M. Stickel, R. Waldinger, M. Lowry, T. Pressburger, and I. Underwood. Deductive composition of astro. software from subroutine libraries. In CADE, '94. Google Scholar
Digital Library
- A. Taly, S. Gulwani, and A. Tiwari. Synthesizing switching logic using constraint solving. In VMCAI, pages 305--319. Springer, 2009. Google Scholar
Digital Library
- H. S. Warren. Hacker's Delight. Addison-Wesley, '02. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
Recommendations
Synthesis of loop-free programs
PLDI '11: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and ImplementationWe 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 ...
Algorithmic program synthesis: introduction
Program synthesis is a process of producing an executable program from a specification. Algorithmic synthesis produces the program automatically, without an intervention from an expert. While classical compilation falls under the definition of ...
FrAngel: component-based synthesis with control structures
In component-based program synthesis, the synthesizer generates a program given a library of components (functions). Existing component-based synthesizers have difficulty synthesizing loops and other control structures, and they often require formal ...







Comments