arrow
返回

L2S: A Framework for Synthesizing the Most Probable Program under a Specification

delete2022-03-07
delete10
PRE
AI
Y
Yingfei Xiong *
B
Bo Wang
DOI:10.1145/3487570delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
In many scenarios, we need to find the most likely program that meets a specification under a local context, where the local context can be an incomplete program, a partial specification, natural language description, a rid so on. We call such a problem program estimation. In this article, we propose a framework, LingLong Synthesis Framework (L2S), to address this problem. Compared with existing work, our work is novel in the following aspects. (1) We propose a theory of expansion rules to describe how to decompose a program into choices. (2) We propose an approach based on abstract interpretation to efficiently prune off the program sub-space that does not satisfy the specification. (3) We prove that the probability of a program is the product of the probabilities of choosing expansion rules, regardless of the choosing order. (4) We reduce the program estimation problem to a pathfinding problem, enabling existing pathfinding algorithms to solve this problem. L2S has been applied to program generation and program repair. In this article, we report our instantiation of this framework for synthesizing conditional expressions (L2S-Cond) and repairing conditional statements (L2S-Hanabi). The experiments on L2S-Cond show that each option enabled by L2S, including the expansion rules, the pruning technique, and the use of different pathfinding algorithms, plays a major role in the performance of the approach. The default configuration of L2S-Cond correctly predicts nearly 60% of the conditional expressions in the top 5 candidates. Moreover, we evaluate L2S-Hanabi on 272 bugs from two real-world Java defects benchmarks, namely Defects4J and Bugs.jar. L2S-Hanabi correctly fixes 32 bugs with a high precision of 84%. In terms of repairing conditional statement bugs, L2S-Hanabi significantly outperforms all existing approaches in both precision and recall.
Keyword:
Program estimation
program synthesis
program repair
expansion rules

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.2K
被引数:
3.4K

机构

P
peking university
学者数:
11.9W
论文数: 8.7W
被引数: 146
引用论文

引用论文

Structure and function of negative-strand RNA virus polymerase complexes
err2021-01-01
err0
PREAI
errJesse D. Pyle; Sean P.J. Whelan; Louis-Marie Bloyet
err分享
err收藏
err分享
err收藏
err分享
err收藏
Discrimination of Maturity Stages of Cabernet Sauvignon Wine Grapes Using Visible–Near-Infrared Spectroscopy
err2023-12-04
err0
errOAAI
errXuejian Zhou; Wenzheng Liu; Kai Li; Dongqing Lu; Yuan Su; Yanlun Ju; Yulin Fang; Jihong Yang
err分享
err收藏
SequenceR: Sequence-to-Sequence Learning for End-to-End Program RepairSequenceR: 用于端到端程序修复的序列到序列学习
err2021-01-01
err217
errOAAI
errChen, Zimin; Kommrusch, Steve; Tufano, Michele; Pouchet, Louis-Noel; Poshyvanyk, Denys; Monperrus, Martin
err分享
err收藏
err分享
err收藏
The interpretation of the reasons for encounter 'cough' and 'sadness' in four international family medicine populations
err2013-12-20
err0
PREAI
errJean K Soler; Inge Okkes; Sibo Oskam; Kes Van Boven; Predrag Zivotic; Milan Jevtic; Frank Dobbs; Henk Lamberts
err分享
err收藏
学者 查看更多内容