Adaptive Concretization for Parallel Program Synthesis

  • Jinseong Jeon
  • Xiaokang Qiu
  • Armando Solar-Lezama
  • Jeffrey S. Foster
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9207)

Abstract

Program synthesis tools work by searching for an implementation that satisfies a given specification. Two popular search strategies are symbolic search, which reduces synthesis to a formula passed to a SAT solver, and explicit search, which uses brute force or random search to find a solution. In this paper, we propose adaptive concretization, a novel synthesis algorithm that combines the best of symbolic and explicit search. Our algorithm works by partially concretizing a randomly chosen, but likely highly influential, subset of the unknowns to be synthesized. Adaptive concretization uses an online search process to find the optimal size of the concretized subset using a combination of exponential hill climbing and binary search, employing a statistical test to determine when one degree of concretization is sufficiently better than another. Moreover, our algorithm lends itself to a highly parallel implementation, further speeding up search. We implemented adaptive concretization for Sketch and evaluated it on a range of benchmarks. We found adaptive concretization is very effective, outperforming Sketch in many cases, sometimes significantly, and has good parallel scalability.

References

  1. 1.
    Alur, R., Bodík, R., Juniwal, G., Martin, M.M.K., Raghothaman, M., Seshia, S.A., Singh, R., Solar-Lezama, A., Torlak, E., Udupa, A.: Syntax-guided synthesis. In: Formal Methods in Computer-Aided Design, FMCAD 2013, Portland, OR, USA, October 20–23, 2013, pp. 1–17 (2013). http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=6679385
  2. 2.
    Ansel, J., Kamil, S., Veeramachaneni, K., Ragan-Kelley, J., Bosboom, J., O’Reilly, U., Amarasinghe, S.P.: Opentuner: an extensible framework for program autotuning. In: International Conference on Parallel Architectures and Compilation, PACT 2014, Edmonton, AB, Canada, August 24–27, 2014, pp. 303–316. (2014). http://doi.acm.org/10.1145/2628071.2628092
  3. 3.
    Chaganty, A., Nori, A.V., Rajamani, S.K.: Efficiently sampling probabilistic programs via program analysis. In: Proceedings of the Sixteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2013, Scottsdale, AZ, USA, April 29 - May 1, 2013, pp. 153–160 (2013). http://jmlr.org/proceedings/papers/v31/chaganty13a.html
  4. 4.
    Chaudhuri, S., Clochard, M., Solar-Lezama, A.: Bridging boolean and quantitative synthesis using smoothed proof search. In: The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2014, San Diego, CA, USA, January 20–21, 2014, pp. 207–220 (2014). http://doi.acm.org/10.1145/2535838.2535859
  5. 5.
    Chaudhuri, S., Solar-Lezama, A.: Smooth interpretation. In: Proceedings of the 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2010, Toronto, Ontario, Canada, June 5–10 2010, pp. 279–291 (2010). http://doi.acm.org/10.1145/1806596.1806629
  6. 6.
    Cheung, A., Solar-Lezama, A., Madden, S.: Optimizing database-backed applications with query synthesis. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2013, Seattle, WA, USA, June 16–19, 2013, pp. 3–14 (2013). http://doi.acm.org/10.1145/2462156.2462180
  7. 7.
    Gaudin, W., Mallinson, A., Perks, O., Herdman, J., Beckingsale, D., Levesque, J., Jarvis, S.: Optimising hydrodynamics applications for the cray xc30 with the application tool suite. The Cray User Group, pp. 4–8 (2014)Google Scholar
  8. 8.
    Gulwani, S.: Automating string processing in spreadsheets using input-output examples. In: Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2011, Austin, TX, USA, January 26–28, 2011, pp. 317–330 (2011). http://doi.acm.org/10.1145/1926385.1926423
  9. 9.
    Hamadi, Y., Jabbour, S., Sais, L.: Manysat: a parallel SAT solver. JSAT 6(4), 245–262 (2009). http://jsat.ewi.tudelft.nl/content/volume6/JSAT6_12_Hamadi.pdf Google Scholar
  10. 10.
    Harris, W.R., Gulwani, S.: Spreadsheet table transformations from examples. In: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2011, San Jose, CA, USA, June 4–8, 2011, pp. 317–328 (2011). http://doi.acm.org/10.1145/1993498.1993536
  11. 11.
    Jeon, J., Qiu, X., Foster, J.S., Solar-Lezama, A.: Synthesizing Framework Models for Symbolic Execution, under submissionGoogle Scholar
  12. 12.
    Jha, S., Gulwani, S., Seshia, S.A., Tiwari, A.: Oracle-guided component-based program synthesis. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering, Vol. 1, ICSE 2010, pp. 215–224. ACM, New York (2010). http://doi.acm.org/10.1145/1806799.1806833
  13. 13.
    Qiu, X., Solar-Lezama, A.: Synthesizing Data-Structure Manipulations with Natural Proofs, under submissionGoogle Scholar
  14. 14.
    Schkufza, E., Sharma, R., Aiken, A.: Stochastic superoptimization. In: Architectural Support for Programming Languages and Operating Systems, ASPLOS 2013, Houston, TX, USA - March 16–20, 2013, pp. 305–316 (2013). http://doi.acm.org/10.1145/2451116.2451150
  15. 15.
    Schkufza, E., Sharma, R., Aiken, A.: Stochastic optimization of floating-point programs with tunable precision. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2014, Edinburgh, United Kingdom - June 09–11, 2014. p. 9 (2014). http://doi.acm.org/10.1145/2594291.2594302
  16. 16.
    Sharma, R., Aiken, A.: From invariant checking to invariant inference using randomized search. In: Computer Aided Verification - 26th International Conference, CAV 2014, Held as Part of the Vienna Summer of Logic, VSL 2014, Vienna, Austria, July 18–22, 2014, Proceedings, pp. 88–105 (2014). http://dx.doi.org/10.1007/978-3-319-08867-9_6
  17. 17.
    Singh, R., Gulwani, S.: Synthesizing number transformations from input-output examples. In: Computer Aided Verification - 24th International Conference, CAV 2012, Berkeley, CA, USA, July 7–13, 2012 , Proceedings, pp. 634–651 (2012). http://dx.doi.org/10.1007/978-3-642-31424-7_44
  18. 18.
    Singh, R., Gulwani, S., Solar-Lezama, A.: Automated feedback generation for introductory programming assignments. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2013, Seattle, WA, USA, June 16–19 2013, pp. 15–26 (2013). http://doi.acm.org/10.1145/2462156.2462195
  19. 19.
    Solar-Lezama, A.: Program sketching. Int. J. Softw. Tools Technol. Transf. 15(5–6), 475–495 (2013)CrossRefGoogle Scholar
  20. 20.
    Solar-Lezama, A., Jones, C.G., Bodik, R.: Sketching concurrent data structures. In: Proceedings of the 2008 ACM SIGPLAN conference on Programming language design and implementation, PLDI 2008, pp. 136–148 (2008)Google Scholar
  21. 21.
    Torlak, E., Bodík, R.: A lightweight symbolic virtual machine for solver-aided host languages. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2014, Edinburgh, United Kingdom - June 09–11, 2014, p. 54 (2014). http://doi.acm.org/10.1145/2594291.2594340
  22. 22.
    Udupa, A., Raghavan, A., Deshmukh, J.V., Mador-Haim, S., Martin, M.M.K., Alur, R.: TRANSIT: specifying protocols with concolic snippets. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2013, Seattle, WA, USA, June 16–19, 2013, pp. 287–296 (2013). http://doi.acm.org/10.1145/2462156.2462174
  23. 23.
    Vechev, M.T., Yahav, E.: Deriving linearizable fine-grained concurrent objects. In: Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation, Tucson, AZ, USA, June 7–13, 2008, pp. 125–135 (2008). http://doi.acm.org/10.1145/1375581.1375598
  24. 24.
    Wilcoxon, F.: Individual comparisons by ranking methods. Biometrics Bull. 1(6), 80–83 (1945)CrossRefGoogle Scholar
  25. 25.
    Wintersteiger, C.M., Hamadi, Y., de Moura, L.M.: A concurrent portfolio approach to SMT solving. In: Computer Aided Verification, 21st International Conference, CAV 2009, Grenoble, France, June 26 - July 2, 2009, Proceedings, pp. 715–720 (2009). http://dx.doi.org/10.1007/978-3-642-02658-4_60
  26. 26.
    Zhang, H., Bonacina, M.P., Hsiang, J.: Psato: A distributed propositional prover and its application to quasigroup problems. J. Symb. Comput. 21(4–6), 543–560 (1996). http://dx.doi.org/10.1006/jsco.1996.0030 MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Jinseong Jeon
    • 1
  • Xiaokang Qiu
    • 2
  • Armando Solar-Lezama
    • 2
  • Jeffrey S. Foster
    • 1
  1. 1.University of MarylandCollege ParkUSA
  2. 2.Massachusetts Institute of TechnologyCambridgeUSA

Personalised recommendations