The goal of inductive program synthesis is for a machine to automatically generate a program from user-supplied examples of the desired behaviour of the program. A key underlying assumption is that humans can provide examples of sufficient quality to teach a concept to a machine. However, as far as we are aware, this assumption lacks both empirical and theoretical support. To address this limitation, we explore the question `Can humans teach machines to code?'. To answer this question, we conduct a study where we ask humans to generate examples for six programming tasks, such as finding the maximum element of a list. We compare the performance of a program synthesis system trained on (i) human-provided examples, (ii) randomly sampled examples, and (iii) expert-provided examples. Our results show that, on most of the tasks, non-expert participants did not provide sufficient examples for a program synthesis system to learn an accurate program. Our results also show that non-experts need to provide more examples than both randomly sampled and expert-provided examples.
翻译:归纳式程序合成的目标是让机器能够根据用户提供的关于所需程序行为的示例自动生成程序。其关键前提假设是人类能够提供足够质量的示例来教会机器一项概念。然而,据我们所知,这一假设缺乏实证与理论支撑。为弥补这一不足,我们探究了“人类能否教会机器编程?”这一命题。为解答该问题,我们开展了一项研究,要求参与者为六个编程任务(例如查找列表中的最大元素)生成示例。我们比较了基于以下三类示例训练的程序合成系统的性能:(i)人类提供的示例;(ii)随机采样示例;(iii)专家提供的示例。结果表明,在多数任务中,非专家参与者提供的示例不足以使程序合成系统学习到准确的程序。同时,非专家需要提供的示例数量多于随机采样示例和专家提供的示例。