paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Solving Program Sketches with Large Integer Values

求解含大整数值的程序草图
TOPLAS 44(2)2022匹配度 2/10 · 该论文属于程序合成/Sketch 求解器中的整数编码优化,虽与形式化方法相关,但未涉及用户核心关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析。引用 0 inbox
Qinheping Hu, Rishabh Singh, Loris D’Antoni
crossref: 2026-09-10

AI 速览

一句话:提出基于中国剩余定理的求解技术,使 Sketch 的整数编码能高效处理大整数值程序草图。

程序草图(program sketching)要求合成器为带洞和断言的程序自动找出整数填充值。主流工具 Sketch 虽能高效求解复杂草图,但其整数编码在程序操作大整数值时性能很差。本文提出一种新求解技术,在保留 Sketch 整数编码的前提下处理大整数:利用数论中的中国剩余定理(CRT)重写程序草图,使变量值仅按若干素数的余数进行跟踪。作者证明了该变换的可靠性,并说明所得程序的编码比现有 Sketch 编码指数级更紧凑。在大量操作大整数的基准上,该技术相较现有 Sketch 求解器取得加速,且能求解已有求解器无法处理的基准。

问题
Sketch 等程序草图求解器使用整数编码,但在草图操作大整数值时性能显著下降,难以求解此类程序。
方法
利用中国剩余定理将程序草图重写为只跟踪若干素数下余数的形式,同时保留 Sketch 的整数编码,并证明变换可靠且编码更紧凑。
评估
在多种大整数操作基准上评估,相比现有 Sketch 求解器取得加速,并能求解其无法处理的实例。
原文摘要(Abstract)

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 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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1614,
  title = {Solving Program Sketches with Large Integer Values},
  author = {Qinheping Hu and Rishabh Singh and Loris D’Antoni},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {44},
  number = {2},
  year = {2022},
  doi = {10.1145/3532849}
}