Abstract Learning Frameworks for Synthesis

  • Christof Löding
  • P. Madhusudan
  • Daniel NeiderEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9636)


We develop abstract learning frameworks for synthesis that embody the principles of the CEGIS (counterexample-guided inductive synthesis) algorithms in current literature. Our framework is based on iterative learning from a hypothesis space that captures synthesized objects, using counterexamples from an abstract sample space, and a concept space that abstractly defines the semantics of synthesis. We show that a variety of synthesis algorithms in current literature can be embedded in this general framework. We also exhibit three general recipes for convergent synthesis: the first two recipes based on finite spaces and Occam learners generalize all techniques of convergence used in existing engines, while the third, involving well-founded quasi-orderings, is new, and we instantiate it to concrete synthesis problems.



This work was partially supported by NSF Expeditions in Computing ExCAPE Award #1138994.


  1. 1.
    Alur, R., Bodík, R., Dallal, E., Fisman, D., Garg, P., Juniwal, G., Kress-Gazit, H., Madhusudan, P., Martin, M.M.K., Raghothaman, M., Saha, S., Seshia, S.A., Singh, R., Solar-Lezama, A., Torlak, E., Udupa, A.: Syntax-guided synthesis. In: Dependable Software Systems Engineering, NATO Science for Peace and Security Series, D: Information and Communication Security, vol. 40, pp. 1–25. IOS Press (2015)Google Scholar
  2. 2.
    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: FMCAD 2013, pp. 1–8. IEEE (2013)Google Scholar
  3. 3.
    Alur, R., Cerný, P., Madhusudan, P., Nam, W.: Synthesis of interface specifications for java classes. In: POPL 2005, pp. 98–109. ACM (2005)Google Scholar
  4. 4.
    Alur, R., Fisman, D., Singh, R., Solar-Lezama, A.: Results and analysis of sygus-comp 2015. Technical report, University of Pennsylvania (2015). fisman/documents/AFSS_SYNT15.pdf
  5. 5.
    Angluin, D.: Computational learning theory: survey and selected bibliography. In: STOC 1992, pp. 351–369. ACM (1992)Google Scholar
  6. 6.
    Baker, A.: Simplicity. In: Zalta, E.N. (ed.) The Stanford Encyclopedia of Philosophy. Fall 2013 edn. (2013).
  7. 7.
    Barnett, M., Chang, B.-Y.E., DeLine, R., Jacobs, B., M. Leino, K.R.: Boogie: a modular reusable verifier for object-oriented programs. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 364–387. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  8. 8.
    Betts, A., Chong, N., Donaldson, A.F., Qadeer, S., Thomson, P.: Gpuverify: a verifier for GPU kernels. In: OOPSLA 2012, pp. 113–132. ACM (2012)Google Scholar
  9. 9.
    Blum, A.: Learning boolean functions in an infinite attribute space. Mach. Learn. 9, 373–386 (1992)zbMATHGoogle Scholar
  10. 10.
    Černý, P., Clarke, E.M., Henzinger, T.A., Radhakrishna, A., Ryzhyk, L., Samanta, R., Tarrach, T.: From non-preemptive to preemptive scheduling using synchronization synthesis. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9207, pp. 180–197. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  11. 11.
    Cheung, A., Madden, S., Solar-Lezama, A., Arden, O., Myers, A.C.: Using program analysis to improve database applications. IEEE Data Eng. Bull. 37(1), 48–59 (2014)Google Scholar
  12. 12.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL, pp. 238–252. ACM (1977)Google Scholar
  13. 13.
    Domingos, P.M.: The role of occam’s razor in knowledge discovery. Data Min. Knowl. Discov. 3(4), 409–425 (1999)CrossRefGoogle Scholar
  14. 14.
    Flanagan, C., M. Leino, K.R.: Houdini, an annotation assistant for ESC/Java. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, pp. 500–517. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  15. 15.
    Garg, P., Löding, C., Madhusudan, P., Neider, D.: Learning universally quantified invariants of linear data structures. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 813–829. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  16. 16.
    Garg, P., Löding, C., Madhusudan, P., Neider, D.: ICE: a robust framework for learning invariants. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 69–87. Springer, Heidelberg (2014)Google Scholar
  17. 17.
    Garg, P., Madhusudan, P., Neider, D., Roth, D.: Learning invariants using decision trees and implication counterexamples. In: POPL 2016 (2016, to appear)Google Scholar
  18. 18.
    Gulwani, S.: Automating string processing in spreadsheets using input-output examples. In: POPL 2011, pp. 317–330. ACM (2011)Google Scholar
  19. 19.
    Gulwani, S., Jha, S., Tiwari, A., Venkatesan, R.: Synthesis of loop-free programs. In: PLDI 2011, pp. 62–73. ACM (2011)Google Scholar
  20. 20.
    Higman, G.: Ordering by divisibility in abstract algebras. Proc. London Math. Soc. 3–2(1), 326–336 (1952)MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Jha, S., Gulwani, S., Seshia, S.A., Tiwari, A.: Oracle-guided component-based program synthesis. In: ICSE 2010, pp. 215–224. ACM (2010)Google Scholar
  22. 22.
    Jin, X., Donzé, A., Deshmukh, J.V., Seshia, S.A.: Mining requirements from closed-loop control models. In: HSCC 2013, pp. 43–52. ACM (2013)Google Scholar
  23. 23.
    Karaivanov, S., Raychev, V., Vechev, M.T.: Phrase-based statistical translation of programming languages. In: Onward!, SLASH 2014, pp. 173–184. ACM (2014)Google Scholar
  24. 24.
    Kearns, M.J., Vazirani, U.V.: An Introduction to Computational Learning Theory. MIT Press, Cambridge, MA, USA (1994)Google Scholar
  25. 25.
    Kitzelmann, E.: Inductive programming: a survey of program synthesis techniques. In: Schmid, U., Kitzelmann, E., Plasmeijer, R. (eds.) AAIP 2009. LNCS, vol. 5812, pp. 50–73. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  26. 26.
    Kneuss, E., Koukoutos, M., Kuncak, V.: Deductive program repair. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9207, pp. 217–233. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  27. 27.
    Kneuss, E., Kuraj, I., Kuncak, V., Suter, P.: Synthesis modulo recursive functions. In: OOPSLA 2013, pp. 407–426. ACM (2013)Google Scholar
  28. 28.
    Kuncak, V.: Verifying and synthesizing software with recursive functions. In: Esparza, J., Fraigniaud, P., Husfeldt, T., Koutsoupias, E. (eds.) ICALP 2014. LNCS, vol. 8572, pp. 11–25. Springer, Heidelberg (2014)Google Scholar
  29. 29.
    Lal, A., Qadeer, S.: Powering the static driver verifier using corral. In: (FSE-22), pp. 202–212. ACM (2014)Google Scholar
  30. 30.
    Lal, A., Qadeer, S., Lahiri, S.K.: A solver for reachability modulo theories. In: Madhusudan, P., Seshia, S.A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 427–443. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  31. 31.
    Löding, C., Madhusudan, P., Neider, D.: Abstract learning frameworks for synthesis. Technical report, University of Illinois at Urbana-Champaign (2016).
  32. 32.
    Manna, Z., Waldinger, R.: A deductive approach to program synthesis. ACM Trans. Program. Lang. Syst. 2(1), 90–121 (1980)CrossRefzbMATHGoogle Scholar
  33. 33.
    Mitchell, T.M.: Machine Learning. McGraw-Hill, New York (1997)Google Scholar
  34. 34.
    Neider, D.: Applications of Automata Learning in Verification and Synthesis. Ph.D. thesis, RWTH Aachen University (April 2014)Google Scholar
  35. 35.
    Neider, D., Saha, S., Madhusudan, P.: Synthesizing piece-wise functions by learning classifiers. In: TACAS 2016, LNCS. Springer (to appear, 2016)Google Scholar
  36. 36.
    Osera, P., Zdancewic, S.: Type-and-example-directed program synthesis. In: PLDI 2015, pp. 619–630. ACM (2015)Google Scholar
  37. 37.
    Pnueli, A., Rosner, R.: On the synthesis of a reactive module. In: POPL 1989, pp. 179–190 (1989)Google Scholar
  38. 38.
    Quinlan, J.R.: C4.5: programs for machine learning. Morgan Kaufmann, Burlington (1993)Google Scholar
  39. 39.
    Saha, S., Garg, P., Madhusudan, P.: Alchemist: learning guarded affine functions. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9206, pp. 440–446. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  40. 40.
    Schkufza, E., Sharma, R., Aiken, A.: Stochastic superoptimization. In: ASPLOS 2013, pp. 305–316. ACM (2013)Google Scholar
  41. 41.
    Sharma, R., Aiken, A.: From invariant checking to invariant inference using randomized search. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 88–105. Springer, Heidelberg (2014)Google Scholar
  42. 42.
    Solar-Lezama, A.: Program synthesis by sketching. Ph.D. thesis, University of California at Berkeley (2008)Google Scholar
  43. 43.
    Solar-Lezama, A., Tancau, L., Bodík, R., Seshia, S.A., Saraswat, V.A.: Combinatorial sketching for finite programs. In: ASPLOS, pp. 404–415 (2006)Google Scholar
  44. 44.
    Thakur, A., Lal, A., Lim, J., Reps, T.: PostHat and all that: Attaining most-precise inductive invariants. Technical report TR1790, University of Wisconsin, Madison (April 2013)Google Scholar
  45. 45.
    Udupa, A., Raghavan, A., Deshmukh, J.V., Mador-Haim, S., Martin, M.M.K., Alur, R.: TRANSIT: specifying protocols with concolic snippets. In: PLDI 2013, pp. 287–296. ACM (2013)Google Scholar
  46. 46.
    Vardhan, A., Sen, K., Viswanathan, M., Agha, G.: Learning to verify safety properties. In: Davies, J., Schulte, W., Barnett, M. (eds.) ICFEM 2004. LNCS, vol. 3308, pp. 274–289. Springer, Heidelberg (2004)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  • Christof Löding
    • 1
  • P. Madhusudan
    • 2
  • Daniel Neider
    • 2
    • 3
    Email author
  1. 1.RWTH AachenAachenGermany
  2. 2.University of Illinois, Urbana-ChampaignChampaignUSA
  3. 3.University of CaliforniaLos AngelesUSA

Personalised recommendations