We propose a novel approach to program synthesis, focusing on synthesizing database queries. At a high level, our proposed algorithm takes as input a sketch with soft constraints encoding user intent, and then iteratively interacts with the user to refine the sketch. At each step, our algorithm proposes a candidate refinement of the sketch, which the user can either accept or reject. By leveraging this rich form of user feedback, our algorithm is able to both resolve ambiguity in user intent and improve scalability. In particular, assuming the user provides accurate inputs and responses, then our algorithm is guaranteed to converge to the true program (i.e., one that the user approves) in polynomial time. We perform a qualitative evaluation of our algorithm, showing how it can be used to synthesize a variety of queries on a database of academic publications.
翻译:我们提出一种新的方案合成方法,侧重于综合数据库查询。在高层次上,我们提议的算法将软约束编码用户意图作为素描输入,然后与用户进行迭接,以完善素描。在每一步,我们的算法都提议对素描进行候选性改进,用户可以接受也可以拒绝。通过利用这种丰富的用户反馈形式,我们的算法既能解决用户意图的模糊性,又能提高可缩放性。特别是,假设用户提供准确的投入和答复,那么我们的算法就能保证在多元时与真正的程序(即用户认可的程序)相融合。我们对我们的算法进行定性评估,展示如何利用它来综合学术出版物数据库上的各种查询。