Synthesizing Tasks for Block-based Programming

Block-based visual programming environments play a critical role in introducing computing concepts to K-12 students. One of the key pedagogical challenges in these environments is in designing new practice tasks for a student that match a desired level of difficulty and exercise specific programming concepts. In this paper, we formalize the problem of synthesizing visual programming tasks. In particular, given a reference visual task $\rm T^{in}$ and its solution code $\rm C^{in}$, we propose a novel methodology to automatically generate a set $\{(\rm T^{out}, \rm C^{out})\}$ of new tasks along with solution codes such that tasks $\rm T^{in}$ and $\rm T^{out}$ are conceptually similar but visually dissimilar. Our methodology is based on the realization that the mapping from the space of visual tasks to their solution codes is highly discontinuous; hence, directly mutating reference task $\rm T^{in}$ to generate new tasks is futile. Our task synthesis algorithm operates by first mutating code $\rm C^{in}$ to obtain a set of codes $\{\rm C^{out}\}$. Then, the algorithm performs symbolic execution over a code $\rm C^{out}$ to obtain a visual task $\rm T^{out}$; this step uses the Monte Carlo Tree Search (MCTS) procedure to guide the search in the symbolic tree. We demonstrate the effectiveness of our algorithm through an extensive empirical evaluation and user study on reference tasks taken from the \emph{Hour of the Code: Classic Maze} challenge by \emph{this http URL} and the \emph{Intro to Programming with Karel} course by \emph{this http URL}.

[1]  Leonidas J. Guibas,et al.  Learning Program Embeddings to Propagate Feedback on Student Code , 2015, ICML.

[2]  Adish Singla,et al.  Zero-shot Learning of Hint Policy via Reinforcement Learning and Program Synthesis , 2020, EDM.

[3]  Sumit Gulwani,et al.  Personalized Mathematical Word Problem Generation , 2015, IJCAI.

[4]  Barbara Hammer,et al.  The Continuous Hint Factory - Providing Hints in Vast and Sparsely Populated Edit Distance Spaces , 2017, ArXiv.

[5]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[6]  Stephen J. Guy,et al.  Data Driven Sokoban Puzzle Generation with Monte Carlo Tree Search , 2021, AIIDE.

[7]  Corina S. Pasareanu,et al.  Monte Carlo Tree Search for Finding Costly Paths in Programs , 2018, SEFM.

[8]  Sumit Gulwani,et al.  Automated feedback generation for introductory programming assignments , 2012, PLDI.

[9]  Thomas W. Price,et al.  Evaluation of a Data-driven Feedback Algorithm for Open-ended Programming , 2017, EDM.

[10]  Thomas W. Price,et al.  Exploring the Impact of Worked Examples in a Novice Programming Environment , 2019, SIGCSE.

[11]  Tiffany Barnes,et al.  Position paper: Block-based programming should offer intelligent support for learners , 2017, 2017 IEEE Blocks and Beyond Workshop (B&B).

[12]  David Weintrop,et al.  Comparing Block-Based and Text-Based Programming in High School Computer Science Classrooms , 2017, ACM Trans. Comput. Educ..

[13]  Sumit Gulwani,et al.  Learning Syntactic Program Transformations from Examples , 2016, 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE).

[14]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[15]  Eric Rosenbaum,et al.  Scratch: programming for all , 2009, Commun. ACM.

[16]  Csaba Szepesvári,et al.  Bandit Based Monte-Carlo Planning , 2006, ECML.

[17]  Cesare Tinelli,et al.  Satisfiability Modulo Theories , 2021, Handbook of Satisfiability.

[18]  Sumit Gulwani,et al.  Example-based learning in computer-aided STEM education , 2014, CACM.

[19]  Thomas W. Price,et al.  iSnap: Towards Intelligent Tutoring in Novice Programming Environments , 2017, SIGCSE.

[20]  Matthew J. Hausknecht,et al.  Leveraging Grammar and Reinforcement Learning for Neural Program Synthesis , 2018, ICLR.

[21]  Joseph Jay Williams,et al.  The Impact of Adding Textual Explanations to Next-step Hints in a Novice Programming Environment , 2019, ITiCSE.

[22]  Amey Karkare,et al.  A feasibility study of using automated program repair for introductory programming assignments , 2017, ESEC/SIGSOFT FSE.

[23]  Mitchel Resnick,et al.  Programming by choice: urban youth learning programming with scratch , 2008, SIGCSE '08.

[24]  Sumit Gulwani,et al.  Automatically Generating Algebra Problems , 2012, AAAI.

[25]  Chris Piech,et al.  Learning to Represent Student Knowledge on Programming Exercises Using Deep Learning , 2017, EDM.

[26]  Sumit Gulwani,et al.  Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence Automatically Generating Problems and Solutions for Natural Deduction , 2022 .

[27]  Andreas Zeller,et al.  Why Programs Fail, Second Edition: A Guide to Systematic Debugging , 2009 .

[28]  Sumit Gulwani,et al.  Synthesis of Geometry Proof Problems , 2014, AAAI.

[29]  Sumit Gulwani,et al.  A trace-based framework for analyzing and synthesizing educational progressions , 2013, CHI.

[30]  Leonidas J. Guibas,et al.  Autonomously Generating Hints by Inferring Problem Solving Policies , 2015, L@S.

[31]  Dawn Song,et al.  Execution-Guided Neural Program Synthesis , 2018, ICLR.

[32]  Mike Wu,et al.  Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference , 2018, AAAI.

[33]  Matthew J. Hausknecht,et al.  Neural Program Meta-Induction , 2017, NIPS.