Cargando…

Solving Program Sketches with Large Integer Values

Program sketching is a program synthesis paradigm in which the programmer provides a partial program with holes and assertions. The goal of the synthesizer is to automatically find integer values for the holes so that the resulting program satisfies the assertions. The most popular sketching tool, S...

Descripción completa

Detalles Bibliográficos
Autores principales: Pan, Rong, Hu, Qinheping, Singh, Rishabh, D’Antoni, Loris
Formato: Online Artículo Texto
Lenguaje:English
Publicado: 2020
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7702261/
http://dx.doi.org/10.1007/978-3-030-44914-8_21
_version_ 1783616579126165504
author Pan, Rong
Hu, Qinheping
Singh, Rishabh
D’Antoni, Loris
author_facet Pan, Rong
Hu, Qinheping
Singh, Rishabh
D’Antoni, Loris
author_sort Pan, Rong
collection PubMed
description Program sketching is a program synthesis paradigm in which the programmer provides a partial program with holes and assertions. The goal of the synthesizer is to automatically find integer values for the holes so that the resulting program satisfies the assertions. The most popular sketching tool, Sketch, can efficiently solve complex program sketches, but uses an integer encoding that often performs poorly if the sketched program manipulates large integer values. In this paper, we propose a new solving technique that allows Sketch to handle large integer values while retaining its integer encoding. Our technique uses a result from number theory, the Chinese Remainder Theorem, to rewrite program sketches to only track the remainders of certain variable values with respect to several prime numbers. We prove that our transformation is sound and the encoding of the resulting programs are exponentially more succinct than existing Sketch encodings. We evaluate our technique on a variety of benchmarks manipulating large integer values. Our technique provides speedups against both existing Sketch solvers and can solve benchmarks that existing Sketch solvers cannot handle.
format Online
Article
Text
id pubmed-7702261
institution National Center for Biotechnology Information
language English
publishDate 2020
record_format MEDLINE/PubMed
spelling pubmed-77022612020-12-01 Solving Program Sketches with Large Integer Values Pan, Rong Hu, Qinheping Singh, Rishabh D’Antoni, Loris Programming Languages and Systems Article Program sketching is a program synthesis paradigm in which the programmer provides a partial program with holes and assertions. The goal of the synthesizer is to automatically find integer values for the holes so that the resulting program satisfies the assertions. The most popular sketching tool, Sketch, can efficiently solve complex program sketches, but uses an integer encoding that often performs poorly if the sketched program manipulates large integer values. In this paper, we propose a new solving technique that allows Sketch to handle large integer values while retaining its integer encoding. Our technique uses a result from number theory, the Chinese Remainder Theorem, to rewrite program sketches to only track the remainders of certain variable values with respect to several prime numbers. We prove that our transformation is sound and the encoding of the resulting programs are exponentially more succinct than existing Sketch encodings. We evaluate our technique on a variety of benchmarks manipulating large integer values. Our technique provides speedups against both existing Sketch solvers and can solve benchmarks that existing Sketch solvers cannot handle. 2020-04-18 /pmc/articles/PMC7702261/ http://dx.doi.org/10.1007/978-3-030-44914-8_21 Text en © The Author(s) 2020 Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
spellingShingle Article
Pan, Rong
Hu, Qinheping
Singh, Rishabh
D’Antoni, Loris
Solving Program Sketches with Large Integer Values
title Solving Program Sketches with Large Integer Values
title_full Solving Program Sketches with Large Integer Values
title_fullStr Solving Program Sketches with Large Integer Values
title_full_unstemmed Solving Program Sketches with Large Integer Values
title_short Solving Program Sketches with Large Integer Values
title_sort solving program sketches with large integer values
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7702261/
http://dx.doi.org/10.1007/978-3-030-44914-8_21
work_keys_str_mv AT panrong solvingprogramsketcheswithlargeintegervalues
AT huqinheping solvingprogramsketcheswithlargeintegervalues
AT singhrishabh solvingprogramsketcheswithlargeintegervalues
AT dantoniloris solvingprogramsketcheswithlargeintegervalues