Proceedings

Synthesizing Pattern Programs from Examples

Download BibTeX Cite

Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence. Main track. Pages 1618-1624.

https://doi.org/10.24963/ijcai.2018/224

Abstract

We describe a programming-by-example system that automatically generates pattern programs from examples. Writing pattern programs, which produce various patterns of characters, is one of the most popular programming exercises for entry-level students. However, students often find it difficult to write correct solutions by themselves. In this paper, we present a method for synthesizing pattern programs from examples, allowing students to improve their programming skills efficiently. To that end, we first design a domain-specific language that supports a large class of pattern programs that students struggle with. Next, we develop a synthesis algorithm that efficiently finds a desired program by combining enumerative search, constraint solving, and program analysis. We implemented the algorithm in a tool and evaluated it on 40 exercises gathered from online forums. The experimental results and user study show that our tool can synthesize instructive solutions from 1–3 example patterns in 1.2 seconds on average.

  1. [Ellis and Gulwani, 2017] Kevin Ellis and Sumit Gulwani. Learning to learn programs from examples: Going beyond program structure. In Proceedings of International Joint Conference on Artificial Intelligence, IJCAI, pages 1638- 1645, 2017. IJCAI
  2. [Feng et al., 2017] Yu Feng, Ruben Martins, Jacob Van Gef- fen, Isil Dillig, and Swarat Chaudhuri. Component-based synthesis of table consolidation and transformation tasks from examples. In Proceedings of ACM SIGPLAN Confer- ence on Programming Language Design and Implementa- tion, PLDI, pages 422-436, 2017.
  3. [Feser et al., 2015] John K. Feser, Swarat Chaudhuri, and Isil Dillig. Synthesizing data structure transformations from input-output examples. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 229-239, 2015.
  4. [Gerdes et al., 2017] Alex Gerdes, Bastiaan Heeren, Johan Jeuring, and L. Thomas van Binsbergen. Ask-elle: an adaptable programming tutor for haskell giving auto- mated feedback. I. J. Artificial Intelligence in Education, 27(1):65-100, 2017.
  5. [Gulwani et al., 2014] Sumit Gulwani, Ivan Radiček, and Florian Zuleger. Feedback generation for performance problems in introductory programming assignments. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE, pages 41-51, 2014.
  6. [Gulwani et al., 2017] Sumit Gulwani, Oleksandr Polozov, and Rishabh Singh. Program synthesis. Foundations and Trends in Programming Languages, 4(1-2):1-119, 2017.
  7. [Gulwani, 2011] Sumit Gulwani. Automating string process- ing in spreadsheets using input-output examples. In Pro- ceedings of Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 317-330, 2011.
  8. [Kaleeswaran et al., 2016] Shalini Kaleeswaran, Anirudh Santhiar, Aditya Kanade, and Sumit Gulwani. Semi- supervised verified feedback generation. In Proceedings of ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE, pages 739-750, 2016.
  9. [Kim et al., 2016] Dohyeong Kim, Yonghwi Kwon, Peng Liu, I. Luk Kim, David Mitchel Perry, Xiangyu Zhang, and Gustavo Rodriguez-Rivera. Apex: Automatic pro- gramming assignment error explanation. In Proceedings of ACM SIGPLAN International Conference on Object- Oriented Programming, Systems, Languages, and Appli- cations, OOPSLA, pages 311-327, 2016.
  10. [Kini and Gulwani, 2015] Dileep Kini and Sumit Gulwani. Flashnormalize: Programming by examples for text nor- malization. In Proceedings of International Conference on Artificial Intelligence, IJCAI, pages 776-783, 2015. IJCAI
  11. [Lee et al., 2016] Mina Lee, Sunbeom So, and Hakjoo Oh. Synthesizing regular expressions from examples for intro- ductory automata assignments. In Proceedings of ACM SIGPLAN International Conference on Generative Pro- gramming: Concepts and Experiences, GPCE, pages 70- 80, 2016.
  12. [Raza and Gulwani, 2017] Mohammad Raza and Sumit Gul- wani. Automated data extraction using predictive program synthesis. In Proceedings of AAAI Conference on Artificial Intelligence, pages 882-890, 2017.
  13. [Raza et al., 2015] Mohammad Raza, Sumit Gulwani, and Natasa Milic-Frayling. Compositional program synthesis from natural language and examples. In Proceedings of International Conference on Artificial Intelligence, IJCAI, pages 792-800, 2015. IJCAI
  14. [Rivers and Koedinger, 2017] Kelly Rivers and Kenneth R. Koedinger. Data-driven hint generation in vast solution spaces: a self-improving python programming tutor. I. J. Artificial Intelligence in Education, 27(1):37-64, 2017.
  15. [Singh et al., 2013] Rishabh Singh, Sumit Gulwani, and Ar- mando Solar-Lezama. Automated feedback generation for introductory programming assignments. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 15-26, 2013.
  16. [So and Oh, 2017] Sunbeom So and Hakjoo Oh. Synthesiz- ing imperative programs from examples guided by static analysis. In Static Analysis -International Symposium, SAS, pages 364-381, 2017.
  17. [Udupa et al., 2013] Abhishek Udupa, Arun Raghavan, Jy- otirmoy V. Deshmukh, Sela Mador-Haim, Milo M.K. Mar- tin, and Rajeev Alur. Transit: Specifying protocols with concolic snippets. In Proceedings of ACM SIGPLAN Con- ference on Programming Language Design and Implemen- tation, PLDI, pages 287-296, 2013.
  18. [Wang et al., 2017] Chenglong Wang, Alvin Cheung, and Rastislav Bodik. Synthesizing highly expressive sql queries from input-output examples. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 452-466, 2017.
  19. [Wu and Knoblock, 2015] Bo Wu and Craig A. Knoblock. An iterative approach to synthesize data transformation programs. In Proceedings of International Conference on Artificial Intelligence, IJCAI, pages 1726-1732, 2015. IJCAI
  20. [Yaghmazadeh et al., 2016] Navid Yaghmazadeh, Christian Klinger, Isil Dillig, and Swarat Chaudhuri. Synthesizing transformations on hierarchically structured data. In Pro- ceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI, pages 508- 521, 2016.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards