arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.07965cs.SEcs.PL
收藏

让示例驱动编程(Programming by Example)变得简单

Programming by Example Made Easy

Jiarong Wu, Lili Wei, Yanyan Jiang, Shing-Chi Cheung, Luyao Ren, Chang Xu

AI总结:

针对示例驱动编程(PBE)工具开发门槛高、难以在行业普及的问题,提出基于关系表“实体-动作”模型的Bee框架,借助双向搜索与约束求解算法简化开发,实验验证其易用性与性能均表现优异。

摘要:

示例驱动编程(Programming by Example,简称PBE)是一种新兴的编程范式,能够自动合成由用户提供的输入-输出示例所指定的程序。尽管PBE为终端用户带来了便利,但实现PBE工具通常需要具备编程语言与合成算法方面的深厚专业知识,而这类知识水平在软件开发者中并不常见,这极大限制了PBE在行业中的广泛应用。为推动PBE技术的落地应用,我们提出了名为Bee的PBE框架,该框架采用基于关系表的“实体-动作”模型,可简化广泛但受限范围内领域的PBE开发工作。使用Bee实现PBE工具仅需将领域特定的数据实体和用户动作适配到表结构中,无需设计领域特定语言或高效的合成算法。Bee的合成算法利用双向搜索与约束求解技术,解决了表转换中嵌套值计算的难题。我们在来自三个不同领域的64个PBE任务上评估了Bee的有效性,并通过12名参与者的用户研究评估了其可用性。评估结果表明,Bee比当前最先进的PBE框架更易于学习和使用,且其双向算法的性能与针对特定领域优化的合成器相当。

英文摘要:

Programming by example (PBE) is an emerging programming paradigm that automatically synthesizes programs specified by user-provided input-output examples. Despite the convenience for end-users, implementing PBE tools often requires strong expertise in programming language and synthesis algorithms. Such a level of knowledge is uncommon among software developers. It greatly limits the broad adoption of PBE by the industry. To facilitate the adoption of PBE techniques, we propose a PBE framework called Bee, which leverages an "entity-action" model based on relational tables to ease PBE development for a wide but restrained range of domains. Implementing PBE tools with Bee only requires adapting domain-specific data entities and user actions to tables, with no need to design a domain-specific language or an efficient synthesis algorithm. The synthesis algorithm of Bee exploits bidirectional searching and constraint-solving techniques to address the challenge of value computation nested in table transformation. We evaluated Bee's effectiveness on 64 PBE tasks from three different domains and usability with a human study of 12 participants. Evaluation results show that Bee is easier to learn and use than the state-of-the-art PBE framework, and the bidirectional algorithm achieves comparable performance to domain-specifically optimized synthesizers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑