Origami: (un)folding the abstraction of recursion schemes for program synthesis

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Fernandes, Matheus Campos, de Franca, Fabricio Olivetti, Francesquini, Emilio
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909120801538048
author Fernandes, Matheus Campos
de Franca, Fabricio Olivetti
Francesquini, Emilio
author_facet Fernandes, Matheus Campos
de Franca, Fabricio Olivetti
Francesquini, Emilio
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2402_13828
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Origami: (un)folding the abstraction of recursion schemes for program synthesis
Fernandes, Matheus Campos
de Franca, Fabricio Olivetti
Francesquini, Emilio
Neural and Evolutionary Computing
Programming Languages
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.
title Origami: (un)folding the abstraction of recursion schemes for program synthesis
topic Neural and Evolutionary Computing
Programming Languages
url https://arxiv.org/abs/2402.13828