Origami:为程序合成展开递归方案的抽象
Origami: (un)folding the abstraction of recursion schemes for program synthesis
AI总结:
本文研究利用递归方案中的 fold 和 unfold 模板简化遗传编程中的程序合成,通过在 GPSB 基准上的实验展示其优缺点,发现选定递归方案后缺失部分可归约为类型约束更强的简单函数。
摘要:
使用遗传编程进行程序合成时,需要搜索一个满足输入规范的正确程序,而输入规范通常以输入-输出示例的形式给出。其中一个特别的挑战是如何有效处理循环和递归,避免生成永不终止的程序。一个有助于缓解该问题的抽象是采用递归方案(Recursion Schemes),它推广了数据生产与数据消费的组合方式。递归方案非常强大,因为它们允许构造能够汇总数据、创建序列并执行高级计算的程序。使用递归方案编写程序的主要优势在于,程序由定义良好的模板组成,只有少数几个部分需要被合成。在本文中,我们对使用 fold 和 unfold 模板进行程序合成的优势进行了初步研究,并概述了一些初步实验结果。为了突出该方法的优缺点,我们使用递归方案手动解决了整个 GPSB 基准测试,并标出了与替代实现相比应当被演化的部分。我们注意到,一旦确定了选择哪种递归方案,合成过程就可以被简化,因为模板中每个缺失的部分都被归约为更简单的函数,而这些函数进一步受到其自身输入和输出类型的约束。
英文摘要:
Program synthesis with Genetic Programming searches for a correct program that satisfies the input specification, which is usually provided as input-output examples. One particular challenge is how to effectively handle loops and recursion avoiding programs that never terminate. A helpful abstraction that can alleviate this problem is the employment of Recursion Schemes that generalize the combination of data production and consumption. Recursion Schemes are very powerful as they allow the construction of programs that can summarize data, create sequences, and perform advanced calculations. The main advantage of writing a program using Recursion Schemes is that the programs are composed of well defined templates with only a few parts that need to be synthesized. In this paper we make an initial study of the benefits of using program synthesis with fold and unfold templates, and outline some preliminary experimental results. To highlight the advantages and disadvantages of this approach, we manually solved the entire GPSB benchmark using recursion schemes, highlighting the parts that should be evolved compared to alternative implementations. We noticed that, once the choice of which recursion scheme is made, the synthesis process can be simplified as each of the missing parts of the template are reduced to simpler functions, which are further constrained by their own input and output types.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。