RbSyn: type- and effect-guided program synthesis
RbSyn: type- and effect-guided program synthesis
复制标题
RbSyn:类型和效果引导的程序合成
DOI:
10.1145/3453483.3454048
复制
发表时间:
2021
期刊:
影响因子:
--
通讯作者:
Van Horn, David
中科院分区:
文献类型:
--
作者:
Guria, Sankha Narayan;Foster, Jeffrey S.;Van Horn, David
In recent years, researchers have explored component-based synthesis, which aims to automatically construct programs that operate by composing calls to existing APIs. However, prior work has not considered efficient synthesis of methods with side effects, e.g., web app methods that update a database. In this paper, we introduce RbSyn, a novel type- and effect-guided synthesis tool for Ruby. An RbSyn synthesis goal is specified as the type for the target method and a series of test cases it must pass. RbSyn works by recursively generating well-typed candidate method bodies whose write effects match the read effects of the test case assertions. After finding a set of candidates that separately satisfy each test, RbSyn synthesizes a solution that branches to execute the correct candidate code under the appropriate conditions. We formalize RbSyn on a core, object-oriented language λsynand describe how the key ideas of the model are scaled-up in our implementation for Ruby. We evaluated RbSyn on 19 benchmarks, 12 of which come from popular, open-source Ruby apps. We found that RbSyn synthesizes correct solutions for all benchmarks, with 15 benchmarks synthesizing in under 9 seconds, while the slowest benchmark takes 83 seconds. Using observed reads to guide synthesize is effective: using type-guidance alone times out on 10 of 12 app benchmarks. We also found that using less precise effect annotations leads to worse synthesis performance. In summary, we believe type- and effect-guided synthesis is an important step forward in synthesis of effectful methods from test cases.
登录
查看更多内容
DOI:
10.1145/2908080.2908127
发表时间:
2016
期刊:
Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation
影响因子:
--
作者:
Brianna M. Ren;J. Foster
通讯作者:
J. Foster
影响因子:
--
作者:
Yu Feng;R. Martins;O. Bastani;Işıl Dillig
通讯作者:
Yu Feng;R. Martins;O. Bastani;Işıl Dillig
影响因子:
--
作者:
J. Brachthäuser;Philipp Schuster;K. Ostermann
通讯作者:
K. Ostermann
DOI:
--
发表时间:
1995
期刊:
IEEE Trans. Software Eng.
影响因子:
--
作者:
Alexander Borgida;J. Mylopoulos;R. Reiter
通讯作者:
R. Reiter
DOI:
10.1145/2001420.2001429
发表时间:
2011
期刊:
Proceedings of the 2015 International Symposium on Software Testing and Analysis
影响因子:
--
作者:
J. Nijjar;T. Bultan
通讯作者:
T. Bultan