Solving Program Sketches with Large Integer Values
Solving Program Sketches with Large Integer Values
复制标题
DOI:
10.1145/3532849
复制
发表时间:
2022-01-01
影响因子:
1.3
通讯作者:
D'Antoni,Loris
中科院分区:
文献类型:
--
作者:
Hu,Qinheping;Singh,Rishabh;D'Antoni,Loris
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 article, we propose a new solving technique that allowsSketchto 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 existingSketchencodings. We evaluate our technique on a variety of benchmarks manipulating large integer values. Our technique provides speedups against both existingSketchsolvers and can solve benchmarks that existingSketchsolvers cannot handle.