MuSynth: Program Synthesis via Code Reuse and Code Manipulation

  • Vineeth Kashyap
  • Rebecca Swords
  • Eric Schulte
  • David Melski
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10452)


MuSynth takes a draft C program with “holes”, a test suite, and optional simple hints—that together specify a desired functionality—and performs program synthesis to auto-complete the holes. First, MuSynth leverages a similar-code-search engine to find potential “donor” code (similar to the required functionality) from a corpus. Second, MuSynth applies various synthesis mutations in an evolutionary loop to find and modify the donor code snippets to fit the input context and produce the expected functionality. This paper focuses on the latter, and our preliminary evaluation shows that MuSynth’s combination of type-based heuristics, simple hints, and evolutionary search are each useful for efficient program synthesis.


Program synthesis Evolutionary computation Code reuse Big code 


  1. 1.
  2. 2.
    The Clang Project.
  3. 3.
    Alur, R., Bodik, R., Juniwal, G., Martin, M.M., Raghothaman, M., Seshia, S.A., Singh, R., Solar-Lezama, A., Torlak, E., Udupa, A.: Syntax-guided synthesis. In: FMCAD. IEEE (2013)Google Scholar
  4. 4.
    Balog, M., Gaunt, A.L., Brockschmidt, M., Nowozin, S., Tarlow, D.: DeepCoder: Learning to Write Programs. ArXiv e-prints., November 2016Google Scholar
  5. 5.
    Barr, E.T., Brun, Y., Devanbu, P., Harman, M., Sarro, F.: The plastic surgery hypothesis. In: FSE. ACM (2014)Google Scholar
  6. 6.
    Błądek, I., Krawiec, K.: Evolutionary program sketching. In: McDermott, J., Castelli, M., Sekanina, L., Haasdijk, E., García-Sánchez, P. (eds.) EuroGP 2017. LNCS, vol. 10196, pp. 3–18. Springer, Cham (2017). doi: 10.1007/978-3-319-55696-3_1 CrossRefGoogle Scholar
  7. 7.
    Gulwani, S.: Dimensions in program synthesis. In: PPDP. ACM (2010)Google Scholar
  8. 8.
    Kashyap, V., Brown, D.B., Liblit, B., Melski, D., Reps, T.: Source Forager: A Search Engine for Similar Source Code. ArXiv e-prints (2017)Google Scholar
  9. 9.
    Katz, G., Peled, D.A.: Synthesis of parametric programs using genetic programming and model checking. In: INFINITY (2013)Google Scholar
  10. 10.
    Le Goues, C., Nguyen, T., Forrest, S., Weimer, W.: GenProg: a generic method for automatic software repair. IEEE Trans. Softw. Eng. 38(1), 54–72 (2012)CrossRefGoogle Scholar
  11. 11.
    Lu, Y., Chaudhuri, S., Jermaine, C., Melski, D.: Data-Driven Program Completion. ArXiv e-prints, May 2017Google Scholar
  12. 12.
    Murali, V., Chaudhuri, S., Jermaine, C.: Bayesian Sketch Learning for Program Synthesis. ArXiv e-prints (2017)Google Scholar
  13. 13.
    Raychev, V., Vechev, M., Krause, A.: Predicting program properties from “Big Code”. In: POPL. ACM (2015)Google Scholar
  14. 14.
    Schulte, E.: Neutral networks of real-world programs and their application to automated software evolution. Ph.D. thesis, University of New Mexico, Albuquerque, USA, July 2014.
  15. 15.
    Spector, L.: Assessment of problem modality by differential performance of lexicase selection in genetic programming: a preliminary report. In: GECCO. ACM (2012)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Vineeth Kashyap
    • 1
  • Rebecca Swords
    • 1
  • Eric Schulte
    • 1
  • David Melski
    • 1
  1. 1.GrammaTech, Inc.IthacaUSA

Personalised recommendations