Bootstrapping Library-Based Synthesis

Constraint-based program synthesis techniques have been widely used in numerous settings. However, synthesizing programs that use libraries remains a major challenge. To handle complex or black-box libraries, the state of the art is to provide carefully crafted mocks or models to the synthesizer, re...

Full description

Saved in:
Bibliographic Details
Published inStatic Analysis pp. 272 - 298
Main Authors Huang, Kangjing, Qiu, Xiaokang
Format Book Chapter
LanguageEnglish
Published Cham Springer Nature Switzerland
SeriesLecture Notes in Computer Science
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:Constraint-based program synthesis techniques have been widely used in numerous settings. However, synthesizing programs that use libraries remains a major challenge. To handle complex or black-box libraries, the state of the art is to provide carefully crafted mocks or models to the synthesizer, requiring extra manual work. We address this challenge by proposing Toshokan, a new synthesis framework as an alternative approach in which library-using programs can be generated without any user-provided artifacts at the cost of moderate performance overhead. The framework extends the classic counterexample-guided synthesis framework with a bootstrapping, log-based library model. The model collects input-output samples from running failed candidate programs on witness inputs. We prove that the framework is sound when a sound, bounded verifier is available, and also complete if the underlying synthesizer and verifier promise to produce minimal outputs. We implement and incorporate the framework to JSketch, a Java sketching tool. Experiments show that Toshokan can successfully synthesize programs that use a variety of libraries, ranging from mathematical functions to data structures. Comparing to state-of-the-art synthesis algorithms which use mocks or models, Toshokan reduces up to 159 lines of code of required manual inputs, at the cost of less than 40 s of performance overheads.
ISBN:9783031223075
3031223071
ISSN:0302-9743
1611-3349
DOI:10.1007/978-3-031-22308-2_13